ntopng: Avoid linking libm statically

This fixes build on x86

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2022-02-15 14:31:39 -08:00
parent 33efb90737
commit cd60040144
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,39 @@
From a913b85f720f41bf7e5819c0dc4acc252467a8a4 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 15 Feb 2022 14:25:07 -0800
Subject: [PATCH] configure.ac.in: Allow dynamic linking against ndpi 3.0
Linking statically is problematic since NDPI_LIBS is '-lndpi -lm'
and when we use -Bstatic it also brings in -lm to use libm.a and on some
architectures ( x86 ) which this does not work and results in missing symbols
Fixes
ipe-sysroot/usr/lib/libm.a(e_logf.o): in function `logf_ifunc_selector':
/usr/src/debug/glibc/2.35-r0/git/math/../sysdeps/i386/i686/multiarch/ifunc-sse2.h:30: undefined reference to `_dl_x86_cpu_features'
Upstream-Status: Submitted [https://github.com/ntop/ntopng/pull/6318]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
configure.ac.in | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/configure.ac.in b/configure.ac.in
index 7f4c0f893..c3299fda2 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -193,10 +193,8 @@ if test -d /usr/local/include/ndpi ; then :
fi
PKG_CHECK_MODULES([NDPI], [libndpi >= 2.0], [
- NDPI_INC=`echo $NDPI_CFLAGS | sed -e "s/[ ]*$//"`
- # Use static libndpi library as building against the dynamic library fails
- NDPI_LIB="-Wl,-Bstatic $NDPI_LIBS -Wl,-Bdynamic"
- #NDPI_LIB="$NDPI_LIBS"
+ NDPI_INC="$NDPI_CFLAGS"
+ NDPI_LIB="$NDPI_LIBS"
NDPI_LIB_DEP=
], [
AC_MSG_CHECKING(for nDPI source)
--
2.35.1

View File

@ -18,6 +18,7 @@ SRC_URI = "git://github.com/ntop/ntopng.git;protocol=https;branch=5.2-stable \
file://0001-Makefile.in-don-t-use-the-internal-lua.patch \
file://0001-autogen.sh-generate-configure.ac-only.patch \
file://0001-configure.ac.in-not-check-clang-on-host.patch \
file://0001-configure.ac.in-Allow-dynamic-linking-against-ndpi-3.patch \
file://ntopng.service \
"