From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 7F54B3B5 for ; Fri, 27 Jan 2017 15:45:24 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 27 Jan 2017 06:45:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,295,1477983600"; d="scan'208";a="1099721979" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by fmsmga001.fm.intel.com with ESMTP; 27 Jan 2017 06:45:06 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.173]) by irsmsx110.ger.corp.intel.com ([169.254.15.101]) with mapi id 14.03.0248.002; Fri, 27 Jan 2017 14:45:05 +0000 From: "De Lara Guarch, Pablo" To: Olivier Matz , "dev@dpdk.org" , "Marohn, Byron" Thread-Topic: [PATCH] efd: fix compilation by removing dep to libmath Thread-Index: AQHSeKj7mViAa5/eCEm3hm2Bpiki4aFMZmRw Date: Fri, 27 Jan 2017 14:45:04 +0000 Message-ID: References: <1485526997-31111-1-git-send-email-olivier.matz@6wind.com> In-Reply-To: <1485526997-31111-1-git-send-email-olivier.matz@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiN2MzYWQxNGYtODc2OC00OGEyLWEwMTItYjI0NWNhNzNmMTRiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6InVNRUZWSG1jblM5XC9FSU56eVpnalp5R2dLR3NhU0IwR2d3ZXpaV000SUJrPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] efd: fix compilation by removing dep to libmath X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jan 2017 14:45:24 -0000 > -----Original Message----- > From: Olivier Matz [mailto:olivier.matz@6wind.com] > Sent: Friday, January 27, 2017 2:23 PM > To: dev@dpdk.org; Marohn, Byron; De Lara Guarch, Pablo > Subject: [PATCH] efd: fix compilation by removing dep to libmath >=20 > When we compile the dpdk with: > CONFIG_RTE_LIBRTE_EFD=3Dy > CONFIG_RTE_LIBRTE_NFP_PMD=3Dn > CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=3Dn > CONFIG_RTE_LIBRTE_SCHED=3Dn > CONFIG_RTE_LIBRTE_METER=3Dn >=20 > The linker gives the following error: > lib/librte_efd.a(rte_efd.o): In function `rte_efd_create': > lib/librte_efd/rte_efd.c:560: undefined reference to `log2' > collect2: error: ld returned 1 exit status >=20 > This is because the '-lm' is missing in mk/rte.app.mk. >=20 > An alternative, which is proposed by this patch, is to use the compiler > builtin rte_bsf32() to process log2 instead of the libmath log2() that > requires to include math.h and link with -lm. >=20 > Signed-off-by: Olivier Matz Acked-by: Pablo de Lara Nice catch, thanks!