From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 1262B2BF5; Thu, 6 Apr 2017 18:20:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491495637; x=1523031637; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Dz5pJ7+tKXjcnWcqYZVCmRh59z7CGLPIWXmCOYcIm0I=; b=pP0X0iyzZWY8tiEKK9Fyx+cqpP5CWTXPdT5AihihpuK3cbS9lgNTsG4W Pmzhl0mBBOPvgN5fdM6/z6X+uznOaA==; Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Apr 2017 09:20:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,160,1488873600"; d="scan'208";a="1152193066" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.140]) by fmsmga002.fm.intel.com with SMTP; 06 Apr 2017 09:20:33 -0700 Received: by (sSMTP sendmail emulation); Thu, 06 Apr 2017 17:20:31 +0100 Date: Thu, 6 Apr 2017 17:20:31 +0100 From: Bruce Richardson To: Thomas Monjalon Cc: Olivier Matz , dev@dpdk.org, stable@dpdk.org Message-ID: <20170406162029.GA8360@bricha3-MOBL3.ger.corp.intel.com> References: <20170406141455.14894-1-olivier.matz@6wind.com> <497164429.X1217vCfaY@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <497164429.X1217vCfaY@xps13> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.8.0 (2017-02-23) Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] mk: fix lib filtering X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Apr 2017 16:20:37 -0000 On Thu, Apr 06, 2017 at 04:48:11PM +0200, Thomas Monjalon wrote: > 2017-04-06 16:14, Olivier Matz: > > I get the following error when linking the test application: > > build/lib/librte_pmd_thunderx_nicvf.a(nicvf_hw.o): > > In function `nicvf_qsize_regbit': > > drivers/net/thunderx/base/nicvf_hw.c:451: undefined reference to `log2' > > build/lib/librte_pmd_thunderx_nicvf.a(nicvf_hw.o): > > In function `nicvf_rss_reta_update': > > drivers/net/thunderx/base/nicvf_hw.c:804: undefined reference to `log2' > > build/lib/librte_pmd_thunderx_nicvf.a(nicvf_hw.o): > > In function `nicvf_rss_reta_query': > > drivers/net/thunderx/base/nicvf_hw.c:825: undefined reference to `log2' > > > > While I don't know why it does not happen for a default build, the error > > can be explained. The link command line is: > > > > gcc -o test ... *.o ... -Wl,-lm ... -Wl,-lrte_pmd_thunderx_nicvf ... > > > > rte_pmd_thunderx_nicvf needs the math library, and it should be > > added after. This is not the case because the test application also > > adds the math library. > > > > The makefile already filters the libraries, but it keeps the first > > occurrence of the lib. Instead, the last one should be kept. > > > > Fixes: edf4d331dcdb ("mk: eliminate duplicates from libraries list") > > > > Cc: stable@dpdk.org > > Signed-off-by: Olivier Matz > > Acked-by: Thomas Monjalon > > It is a really nice Makefile recursive function :) > "nice Makefile recursive function" I recognise those words individually, but having them together just doesn't make any sense :-)