[PATCH 1/1] iproute2: fix compilation failure when using libintl-full

Ian Cooper iancooper at hotmail.com
Sat Mar 27 12:11:09 GMT 2021


Version 5.11.0 introduces a new check for libbpf. This check fails
during link with an undefined reference to `libintl_dgettext'. Patch
the Makefile and configure script to handle the case where libintl
is used.

Signed-off-by: Ian Cooper <iancooper at hotmail.com>
---
 package/network/utils/iproute2/Makefile             |  3 ++-
 .../utils/iproute2/patches/400-intl-full.patch      | 13 +++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100644 package/network/utils/iproute2/patches/400-intl-full.patch

diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile
index b1a137c18f..456d5aab57 100644
--- a/package/network/utils/iproute2/Makefile
+++ b/package/network/utils/iproute2/Makefile
@@ -47,7 +47,7 @@ $(call Package/iproute2/Default)
   VARIANT:=ipfull
   PROVIDES:=ip
   ALTERNATIVES:=300:/sbin/ip:/usr/libexec/ip-full
-  DEPENDS:=+libnl-tiny +libbpf +(PACKAGE_devlink||PACKAGE_rdma):libmnl
+  DEPENDS:=+libnl-tiny +libbpf +(PACKAGE_devlink||PACKAGE_rdma):libmnl $(INTL_DEPENDS)
 endef
 
 define Package/tc-tiny
@@ -157,6 +157,7 @@ MAKE_FLAGS += \
 	HAVE_ELF=$(HAVE_ELF) \
 	HAVE_MNL=$(HAVE_MNL) \
 	HAVE_CAP=$(HAVE_CAP) \
+	INTL="$(if $(INTL_FULL),$(INTL_LDFLAGS) -lintl)" \
 	IPT_LIB_DIR=/usr/lib/iptables \
 	XT_LIB_DIR=/usr/lib/iptables \
 	FPIC="$(FPIC)" \
diff --git a/package/network/utils/iproute2/patches/400-intl-full.patch b/package/network/utils/iproute2/patches/400-intl-full.patch
new file mode 100644
index 0000000000..fe88aeed38
--- /dev/null
+++ b/package/network/utils/iproute2/patches/400-intl-full.patch
@@ -0,0 +1,13 @@
+Index: iproute2-5.11.0/configure
+===================================================================
+--- iproute2-5.11.0.orig/configure
++++ iproute2-5.11.0/configure
+@@ -259,7 +259,7 @@ int main(int argc, char **argv) {
+ }
+ EOF
+
+-    $CC -o $TMPDIR/libbpf_test $TMPDIR/libbpf_test.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS >/dev/null 2>&1
++    $CC -o $TMPDIR/libbpf_test $TMPDIR/libbpf_test.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS $INTL >/dev/null 2>&1
+     local ret=$?
+
+     rm -f $TMPDIR/libbpf_test.c $TMPDIR/libbpf_test
-- 
2.25.1




More information about the openwrt-devel mailing list