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 A67ABA0C4D; Mon, 9 Aug 2021 04:30:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 246C84069D; Mon, 9 Aug 2021 04:30:59 +0200 (CEST) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) by mails.dpdk.org (Postfix) with ESMTP id E015E4068A for ; Mon, 9 Aug 2021 04:30:57 +0200 (CEST) Received: by mail-lf1-f43.google.com with SMTP id g30so26532644lfv.4 for ; Sun, 08 Aug 2021 19:30:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ezTbHRTcK3kyNEOnveFaiIn9diVIGVC3kS1aYF+0bds=; b=Pw9ANNcegraDF5pPOJ+nSs+RcX66ndxnHScL09sxYgH0YB5sHLD462/s52bcnXW6Wp /0CVA+roCNLOmcNiBkCa5hMnIIu3mNmM8JmZwRD93hYbzXivuJDNMmz0FDXH8MTP8Yg2 JDvhGPzO9gQsmT5nw1Vi+bJcNZFNEA+MLwjfNXYqlR6VhzwD/6dCQOahO1iZVvQVuRRn 3e+Nu4WcH5O3OuBfnBVNHl3KQ8cZmM10KOw7sdvyOODcf33cKbhyymU91tMLmyAvsYxC KwJ9DdNjJMdwNJ1VrZLEtsxdXEnTUxjKFU14nV0NHGL3vUqGFESrXGJomQRyrLZHwJU4 SNaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ezTbHRTcK3kyNEOnveFaiIn9diVIGVC3kS1aYF+0bds=; b=EM4iELpP808Xla1FRWcJf7j8AIHnOgtRpJRUC1mRD42ZWvEkDGcUrDguJvUHDrAnE3 RbbF0uyfC9sIuVV+wNPHBzt3ClYJ2GvF26/cYEBrpDySSMp1OY9P0xfDzFAyecsr0PWK IFD8AZdorEviChSy/Vw2c3g+EJUyItM0VCs6owC23yV16+ZZHLVr4F62XuJcELN6kzaj Es/mPXZcGVz8/4poJt9nmnlQgQ+9DCAJUcEjRRPGDQqxyfbYSombUAjErRXkG0GaJpXd JbKd6wht87T0wKGQSCA2GPgcfiX24nTDRpqNUdiw3A5+PzxiTJRTfvalJbMdzbwM88TE G94Q== X-Gm-Message-State: AOAM532eOcgtRtlAoFZ/1REuwYOwtk2DTL2WQPMqpCMtWdy4AtNztN6Y fCwJnfuNpQTjZ+z2I+EPDUEAcMFhI/fhIv2MlbI= X-Google-Smtp-Source: ABdhPJzrA/hbXZ8OLyrgC6r/koZCOkQxJWgFAUAcUu1JzTPXOyi2kzWNwLSHXuTEH5MfffEh/2d1ssffy+KYcWq1NA0= X-Received: by 2002:a05:6512:3fa8:: with SMTP id x40mr507058lfa.0.1628476257377; Sun, 08 Aug 2021 19:30:57 -0700 (PDT) MIME-Version: 1.0 References: <20210808225203.56fce7c7@sovereign> In-Reply-To: <20210808225203.56fce7c7@sovereign> From: William Tu Date: Sun, 8 Aug 2021 19:30:21 -0700 Message-ID: To: Dmitry Kozlyuk Cc: dpdk-dev , Sergey Madaminov Content-Type: text/plain; charset="UTF-8" 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" On Sun, Aug 8, 2021 at 12:52 PM Dmitry Kozlyuk wrote: > > 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`. Thanks, pass linking stage now. > > 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. Thanks, and yes, the pkg-config on my system still doesn't work. Regards, William