From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH 1/8] app: link the whole rte_cfgfile library Date: Wed, 27 Sep 2017 13:01:02 +0100 Message-ID: <20170927120102.GA27076@bricha3-MOBL3.ger.corp.intel.com> References: <1506418805-12117-1-git-send-email-tdu@semihalf.com> <1506418805-12117-2-git-send-email-tdu@semihalf.com> <20170926143117.GA24952@bricha3-MOBL3.ger.corp.intel.com> <20170927073603.GA30028@tdu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, mw@semihalf.com, dima@marvell.com, nsamsono@marvell.com, Jacek Siuda To: Tomasz Duszynski Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 8A8D96D45 for ; Wed, 27 Sep 2017 14:01:08 +0200 (CEST) Content-Disposition: inline In-Reply-To: <20170927073603.GA30028@tdu> 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 Wed, Sep 27, 2017 at 09:36:03AM +0200, Tomasz Duszynski wrote: > On Tue, Sep 26, 2017 at 03:31:18PM +0100, Bruce Richardson wrote: > > On Tue, Sep 26, 2017 at 11:39:58AM +0200, Tomasz Duszynski wrote: > > > Since MRVL NET PMD needs librte_cfgfile to parse QoS configuration file > > > link it as the whole library. > > > > > > Signed-off-by: Jacek Siuda > > > Signed-off-by: Tomasz Duszynski > > > --- > > > > Can you clarify a bit more why this is needed? For a static build, the > > cfgfile should be linked in to the after the PMDs, so the dependencies > > in the driver should be satisfied in the link. For a dynamic build, the > > PMD should depend upon the cfgfile directly, and use it at runtime > > appropriately. > > Am I missing something? > > > > /Bruce > Hi Bruce, > > You are correct, all dependencies in the driver will be satisfied. > The reason this change was introduced is that, librte_pmd_mrvl.a > contains undefined symbols from librte_cfgfile.a thus linking > applications under app/ directory will fail as librte_cfgfile.a comes > before librte_pmd_mrvl.a during the linking stage. > > Linking librte_cfgfile.a with --whole-archive solves the issue. > > -- Thanks for the explanation. I believe the proper fix in this case is to ensure that when linking apps that cfgfile comes after librte_pmd_mrvl. The drivers should always come first when linking, then the DPDK libs. /Bruce