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

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


iproute2 version 5.11.0 introduced in commit b048a30 now uses libbpf, which introduces a new set of checks in the iproute2 configure script. The check for libbpf fails silently with a linker error due to an unresolved symbol in libintl, leading the script to conclude that there is no valid libbpf installed. 

This patch introduces specific handling for the case where libintl-full is enabled.

The linker error is shown below.

The patch has been compile-tested on x86_64 glibc and run-tested on the same. 

make[3]: Entering directory '/opt/openwrt/build_dir/target-x86_64_glibc/linux-x86_64/iproute2-ipfull/iproute2-5.11.0'
sh configure /opt/openwrt/build_dir/target-x86_64_glibc/linux-x86_64/linux-5.4.106/user_headers/include
TC schedulers
 ATM	no
 IPT	using xtables
 IPSET  yes

iptables modules directory: /usr/lib/iptables
libc has setns: yes
SELinux support: no
libbpf support: no
	libbpf version 0.3.0 is too low, please update it to at least 0.1.0
	LIBBPF_FORCE=on set, but couldn't find a usable libbpf
make[3]: *** [Makefile:84: config.mk] Error 1
make[3]: Leaving directory '/opt/openwrt/build_dir/target-x86_64_glibc/linux-x86_64/iproute2-ipfull/iproute2-5.11.0'
make[2]: *** [Makefile:235: /opt/openwrt/build_dir/target-x86_64_glibc/linux-x86_64/iproute2-ipfull/iproute2-5.11.0/.built] Error 2
make[2]: Leaving directory '/opt/openwrt/package/network/utils/iproute2'
time: package/network/utils/iproute2/ipfull/compile#0.41#0.12#0.62
    ERROR: package/network/utils/iproute2 failed to build (build variant: ipfull).
make[1]: *** [package/Makefile:114: package/network/utils/iproute2/compile] Error 1
make[1]: Leaving directory '/opt/openwrt'
make: *** [/opt/openwrt/include/toplevel.mk:230: package/iproute2/compile] Error 2

Patching the iproute2 configure script to remove the stderr redirect to /dev/null, we can see that the error is as follows

/opt/openwrt/staging_dir/toolchain-x86_64_gcc-9.3.0_glibc/lib/gcc/x86_64-openwrt-linux-gnu/9.3.0/../../../../x86_64-openwrt-linux-gnu/bin/ld: warning: libintl.so.8, needed by /opt/openwrt/staging_dir/target-x86_64_glibc/usr/lib/libbpf.so, not found (try using -rpath or -rpath-link)
/opt/openwrt/staging_dir/toolchain-x86_64_gcc-9.3.0_glibc/lib/gcc/x86_64-openwrt-linux-gnu/9.3.0/../../../../x86_64-openwrt-linux-gnu/bin/ld: /opt/openwrt/staging_dir/target-x86_64_glibc/usr/lib/libelf.so.1: undefined reference to `libintl_dgettext'

Ian Cooper (1):
  iproute2: fix compilation failure when using libintl-full

 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

-- 
2.25.1




More information about the openwrt-devel mailing list