[dpdk-dev] [PATCH] efd: fix compilation by removing dep to libmath

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Fri Jan 27 15:45:04 CET 2017

> -----Original Message-----
> From: Olivier Matz [mailto:olivier.matz at 6wind.com]
> Sent: Friday, January 27, 2017 2:23 PM
> To: dev at dpdk.org; Marohn, Byron; De Lara Guarch, Pablo
> Subject: [PATCH] efd: fix compilation by removing dep to libmath
> When we compile the dpdk with:
> 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
> This is because the '-lm' is missing in mk/rte.app.mk.
> 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.
> Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>

Acked-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>

Nice catch, thanks!

More information about the dev mailing list