From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 63923A0C4B; Sun, 8 Aug 2021 21:52:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D555B4068A; Sun, 8 Aug 2021 21:52:06 +0200 (CEST) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by mails.dpdk.org (Postfix) with ESMTP id C0EDA40683 for ; Sun, 8 Aug 2021 21:52:05 +0200 (CEST) Received: by mail-lj1-f178.google.com with SMTP id h2so8268936lji.6 for ; Sun, 08 Aug 2021 12:52:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oYbqbjUREpRZZDhkxK/omZ6BhlNJ6WR5QTn1oedp3S0=; b=D6h9Zsmx8kmgglU8/YAVrLZNaQc7tY/tVgoQgRcs/DqeKJnBc0JGNT2w5C1ICfl2sw rRsEysS0UotC0HF90ifoil8XQG32/OuPZUs5Op8SYTxXI8kj7W3Jy3mfoF1GEGf1Wnke 9hRULSVkcBBZNDv4kmS2Jpq6RQ7T4rY2SID3nP6fOEjHKT2xBa9I8fgKfiQWrdMQx0qq jDMJNAOrTcjYbPPdisJ0yedNFa6yKI6qfXUBZTuHuvvArb0EskEv7ggGs2ZDMNysG1eI kdYYQCbTBtL5d418UOxdODAsqfUOW9M6PemtXfnffho8bcbchDNiw9I6u0vqT+nJ7XUi 4KrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oYbqbjUREpRZZDhkxK/omZ6BhlNJ6WR5QTn1oedp3S0=; b=fa6ULZy6QONGoxcir96vlLSOVCb7bMNZcBSLgsWI2wr6qodcM0M/nLIC6AIanAPuVO lqojvAfIad4EBzbgjgodrlxr/nH09UgV5kSRDHpjM/fQktLiC/+O0g0fG/MWb97nshe5 Q7G1wgU07NistuPF/XcVTna9X0J7Cx2IVCyYhIXAPjzKP8imAfToYUB1DaciXNkeuKV2 TNDn6nBct7Qa18yAZoomXvXFEYGDX/xh8G7ND1iMSVZyEP5Rfjs7VIX2e7QtnivOf8lt i9f2OCuBA3mrqf1SQBdxda+JmIJx2QpI9sD40uM/CRjaCmGSaPKCXOxcYJoHogn9b34x 3KfQ== X-Gm-Message-State: AOAM532oztkkZQxxrGXnalMGZb4gXdAmSj3/yhovqOHTJnijaZhWB4IW t/v6EovG5Wzi6oemHU6VdX4= X-Google-Smtp-Source: ABdhPJxGplW+6BWJJ5nQHmTIqnun78uG8Bexavj5gPGmPj3DAp4AWqzD0nuRgwBNOPxlIjZm5Y9G9w== X-Received: by 2002:a2e:89c4:: with SMTP id c4mr13063988ljk.275.1628452325240; Sun, 08 Aug 2021 12:52:05 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id a13sm1509052lfu.13.2021.08.08.12.52.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Aug 2021 12:52:04 -0700 (PDT) Date: Sun, 8 Aug 2021 22:52:03 +0300 From: Dmitry Kozlyuk To: William Tu Cc: dpdk-dev , Sergey Madaminov Message-ID: <20210808225203.56fce7c7@sovereign> In-Reply-To: References: X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] Linker error on rte_dump_stack() on Windows X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2021-08-08 10:45 (UTC-0700), William Tu: > Hi, > > While linking OVS to Windows DPDK library, static link to > librte_eal.a, we hit some error about rte_dump_stack(). > I don't know why other symbols work, but only a couple symbols showed > errors here. > Any suggestions about how to debug/fix this? Thank you! > > [5/15] Linking target utilities/ovs-vsctl.exeFAILED: > utilities/ovs-vsctl.exe"clang" -Wl,/MACHINE:X64 > -Wl,/OUT:utilities/ovs-vsctl.exe > utilities/ovs-vsctl.exe.p/ovs-vsctl.c.obj "-Wl,/nologo" "-Wl,/release" > "-Wl,/nologo" "-Wl,/OPT:REF" "lib\libopenvswitch.a" > "-Wl,--no-undefined" "C:/dpdk/install/lib/librte_eal.a" > "C:/dpdk/install/lib/librte_ethdev.a" > "C:/dpdk/install/lib/librte_mempool.a" > "C:/dpdk/install/lib/librte_mbuf.a" > "C:/dpdk/install/lib/librte_meter.a""C:/dpdk/install/lib/librte_telemetry.a" > "C:/dpdk/install/lib/librte_kvargs.a" > "C:/PTHREADS-BUILT/lib/libpthreadVC3.lib" "-lWs2_32" "-lWbemUuid" > "-lShlwapi" "-lIphlpapi" "-Wl,/SUBSYSTEM:CONSOLE" "-lkernel32" > "-luser32" "-lgdi32" "-lwinspool" "-lshell32" "-lole32" "-loleaut32" > "-luuid" "-lcomdlg32" "-ladvapi32" > LINK : warning LNK4044: unrecognized option '/-no-undefined'; ignored > librte_eal.a(eal_windows_eal_debug.c.obj) : error LNK2019: unresolved > external symbol __imp_SymInitialize referenced in function > rte_dump_stack Hi William, `rte_dump_stack()` implementation requires linking DbgHelp system library. There are other required libraries, see `add_project_link_arguments()` in `config/meson.build`. I also noticed that these libraries are not added to pkg-config `Libs.private`. We must use `ext_deps` and `cc.find_library()` instead of `add_project_link_arguments('-l...')`. IIRC you don't use pkg-config, but still.