From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.mhcomputing.net (master.mhcomputing.net [74.208.46.186]) by dpdk.org (Postfix) with ESMTP id DDC7F58E6 for ; Sun, 3 Aug 2014 23:36:59 +0200 (CEST) Received: from 22-145-216-21.pools.spcsdns.net (unknown [66.87.119.22]) by mail.mhcomputing.net (Postfix) with ESMTPSA id 10EB780C764; Sun, 3 Aug 2014 14:38:27 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: <5D695A7F6F10504DBD9B9187395A21797D0F92FA@ORSMSX112.amr.corp.intel.com> References: <20140801175138.GA31733@mhcomputing.net> <20140802152904.GA9064@mhcomputing.net> <20140802154310.GA9104@mhcomputing.net> <20140802164600.GA9312@mhcomputing.net> <5D695A7F6F10504DBD9B9187395A21797D0F92FA@ORSMSX112.amr.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 From: Matthew Hall Date: Sun, 03 Aug 2014 14:39:03 -0700 To: "Jayakumar, Muthurajan" , Alex Markuze Message-ID: <65a7dd00-34f6-4e8a-b9be-4c0363d33450@email.android.com> Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] Debugging EAL PCI / Driver Init X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Aug 2014 21:37:00 -0000 Yes, that's the one! It made a lot of my linking problems go away when I used that along with the whole-archive flags. Matthew -- Sent from my mobile device. On August 3, 2014 11:13:55 AM PDT, "Jayakumar, Muthurajan" wrote: > >Are you referring to CONFIG_RTE_BUILD_COMBINE_LIBS ? > >(ps: referenced here >http://dpdk.org/ml/archives/dev/2013-October/000639.html) > >Thanks, >M Jay > > >-----Original Message----- >From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Matthew Hall >Sent: Sunday, August 03, 2014 10:23 AM >To: Alex Markuze >Cc: dev@dpdk.org >Subject: Re: [dpdk-dev] Debugging EAL PCI / Driver Init > >There is an option in the DPDK build config which compiles every DPDK >lib into a single static lib. I don't have the name of the option in >front of me but it had COMBINE in its name. When this option is used >you can get every function in the whole DPDK with a single library. >After that I had a lot fewer linking issues. > >Matthew. >-- >Sent from my mobile device. > >On August 3, 2014 4:41:51 AM PDT, Alex Markuze wrote: >>Resolved just as Matt has described. >>To remove any ambiguity (for future reference). >> >>This line in the gcc command resolves the issue in my case (a >different >>nic may need a different lib): >>--whole-archive -Wl,--start-group -lrte_pmd_ixgbe -Wl,--end-group -Wl, >> >>The problem is that the probe command polls over all pci devices and >>tries to find a matching driver, these drivers register With these >>macros which will only be called when the --whole-archive option is >>provided and its actually the reason for this flags existence. Without > >>this flag the driver list is empty. >> >>PMD_REGISTER_DRIVER(rte_ixgbe_driver); >>PMD_REGISTER_DRIVER(rte_ixgbevf_driver); >> >> >>On Sun, Aug 3, 2014 at 1:38 PM, Alex Markuze wrote: >>> Hi Matt, Dev >>> I'm Trying to compile ann app linking to dpdk and dpdk based libs. >>> And I'm seeing the same issue you've reported. >>> The probe function doesn't seem to find any ixgbevf(SRIOV VM) ports. >>> Same code compiled as a dpdk app works fine. >>> >>> In your solution to this issue you are referring to -lintel_dpdk? I > >>> couldn't find any reference to it. >>> >>> Thanks >>> Alex. >>> >>> >>> On Sat, Aug 2, 2014 at 7:46 PM, Matthew Hall >>wrote: >>>> On Sun, Aug 03, 2014 at 01:37:06AM +0900, Masaru Oki wrote: >>>>> cc links library funtion from archive only if call from other >>object. >>>>> but new dpdk pmd library has constractor section and not call >>directly. >>>>> ld always links library funtion with constractor section. >>>>> use -Xlinker, or use ld instead of cc. >>>> >>>> Hello Oki-san, >>>> >>>> The trick to fix it was this, I finally found it in the example >>Makefiles with >>>> V=1 flag. >>>> >>>> -Wl,--whole-archive -Wl,--start-group -lintel_dpdk -Wl,--end-group >>-Wl,--no-whole-archive >>>> >>>> Thank you for the advice you provided, I couldn't have fixed it >>without your >>>> suggestions... it got me to look more closely at the linking. >>Importantly, >>>> "-Wl,--whole-archive" includes the entire archive whether or not >>it's called >>>> from other objects, so we don't lose the constructors, just like >you >>said. >>>> >>>> Matthew.