Build tcpdump version 4.9.3 on OpenWrt 18.06.5

i get the following error message when building the package tcpdump version 4.9.3 under OpenWRT version 18.06.5:

configure: error: This is a bug, please follow the guidelines in CONTRIBUTING and include the config.log file in your report.  If you have downloaded libpcap from, and built it yourself, please also include the config.log
file from the libpcap source directory, the Makefile from the libpcap
source directory, and the output of the make process for libpcap, as
this could be a problem with the libpcap that was built, and we will
not be able to determine why this is happening, and thus will not be
able to fix it, without that information, as we have not been able to
reproduce this problem ourselves.
Makefile:88: recipe for target '/home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3/.configured_68b329da9893e34099c7d8ad5cb9c940' failed
make[3]: *** [/home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3/.configured_68b329da9893e34099c7d8ad5cb9c940] Error 1
make[3]: Leaving directory '/home/stefan.harbich/Downloads/apu/openwrt/package/network/utils/tcpdump'
time: package/network/utils/tcpdump/full/compile#9.65#4.93#16.72
package/Makefile:111: recipe for target 'package/network/utils/tcpdump/compile' failed
make[2]: *** [package/network/utils/tcpdump/compile] Error 2
make[2]: Leaving directory '/home/stefan.harbich/Downloads/apu/openwrt'
package/Makefile:107: recipe for target '/home/stefan.harbich/Downloads/apu/openwrt/staging_dir/target-x86_64_glibc/stamp/.package_compile' failed
make[1]: *** [/home/stefan.harbich/Downloads/apu/openwrt/staging_dir/target-x86_64_glibc/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/stefan.harbich/Downloads/apu/openwrt'
/home/stefan.harbich/Downloads/apu/openwrt/include/ recipe for target 'world' failed
make: *** [world] Error 2

What can I do at libpcap?

Greetings from Stefan Harbich

The real error message should be immediately above the log you've pasted.

make[3]: Entering directory '/home/stefan.harbich/Downloads/apu/openwrt/package/network/utils/tcpdump'
rm -f /home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3/.configured_*
rm -f /home/stefan.harbich/Downloads/apu/openwrt/staging_dir/target-x86_64_glibc/stamp/.tcpdump.full_installed
(cd /home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3/./; if [ -x ./configure ]; then find /home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3/ -name config.guess | xargs -r chmod u+w; find /home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3/ -name config.guess | xargs -r -n1 cp --remove-destination /home/stefan.harbich/Downloads/apu/openwrt/scripts/config.guess; find /home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3/ -name config.sub | xargs -r chmod u+w; find /home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3/ -name config.sub | xargs -r -n1 cp --remove-destination /home/stefan.harbich/Downloads/apu/openwrt/scripts/config.sub; AR="x86_64-openwrt-linux-gnu-gcc-ar" AS="x86_64-openwrt-linux-gnu-gcc -c -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -iremap/home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3:tcpdump-4.9.3 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections" LD=x86_64-openwrt-linux-gnu-ld NM="x86_64-openwrt-linux-gnu-gcc-nm" CC="x86_64-openwrt-linux-gnu-gcc" GCC="x86_64-openwrt-linux-gnu-gcc" CXX="x86_64-openwrt-linux-gnu-g++" RANLIB="x86_64-openwrt-linux-gnu-gcc-ranlib" STRIP=x86_64-openwrt-linux-gnu-strip OBJCOPY=x86_64-openwrt-linux-gnu-objcopy OBJDUMP=x86_64-openwrt-linux-gnu-objdump SIZE=x86_64-openwrt-linux-gnu-size CFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -iremap/home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3:tcpdump-4.9.3 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections " CXXFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -iremap/home/stefan.harbich/Downloads/apu/openwrt/build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3:tcpdump-4.9.3 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections " CPPFLAGS="-I/home/stefan.harbich/Downloads/apu/openwrt/staging_dir/target-x86_64_glibc/usr/include -I/home/stefan.harbich/Downloads/apu/openwrt/staging_dir/target-x86_64_glibc/include -I/home/stefan.harbich/Downloads/apu/openwrt/staging_dir/toolchain-x86_64_gcc-7.3.0_glibc/usr/include -I/home/stefan.harbich/Downloads/apu/openwrt/staging_dir/toolchain-x86_64_gcc-7.3.0_glibc/include " LDFLAGS="-L/home/stefan.harbich/Downloads/apu/openwrt/staging_dir/target-x86_64_glibc/usr/lib -L/home/stefan.harbich/Downloads/apu/openwrt/staging_dir/target-x86_64_glibc/lib -L/home/stefan.harbich/Downloads/apu/openwrt/staging_dir/toolchain-x86_64_gcc-7.3.0_glibc/usr/lib -L/home/stefan.harbich/Downloads/apu/openwrt/staging_dir/toolchain-x86_64_gcc-7.3.0_glibc/lib -znow -zrelro -Wl,--gc-sections "  BUILD_CC="x86_64-openwrt-linux-gnu-gcc" HOSTCC="gcc" td_cv_buggygetaddrinfo="no" ac_cv_linux_vers= ac_cv_header_rpc_rpcent_h=no ac_cv_lib_rpc_main=no ac_cv_path_PCAP_CONFIG=""  ./configure --target=x86_64-openwrt-linux --host=x86_64-openwrt-linux --build=x86_64-pc-linux-gnu --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls  --without-cap-ng --without-crypto --enable-ipv6 ; fi; )
configure: WARNING: unrecognized options: --disable-nls, --enable-ipv6
configure: loading site script /home/stefan.harbich/Downloads/apu/openwrt/include/site/x86_64
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-openwrt-linux-gnu
checking for x86_64-openwrt-linux-gcc... x86_64-openwrt-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-openwrt-linux-gnu-gcc accepts -g... yes
checking for x86_64-openwrt-linux-gnu-gcc option to accept ISO C89... none needed
checking whether the compiler supports the -ffloat-store option... yes
checking for inline... inline
checking for __attribute__... yes
checking whether __attribute__((unused)) can be used without warnings... yes
checking whether __attribute__((noreturn)) can be applied to function pointers without warnings... yes
checking whether __attribute__((format)) can be used without warnings... yes
checking whether __attribute__((format)) can be applied to function pointers... yes
checking how to run the C preprocessor... x86_64-openwrt-linux-gnu-gcc -E
checking for grep that handles long lines and -e... /home/stefan.harbich/Downloads/apu/openwrt/staging_dir/host/bin/grep
checking for egrep... /home/stefan.harbich/Downloads/apu/openwrt/staging_dir/host/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking rpc/rpc.h usability... yes
checking rpc/rpc.h presence... yes
checking for rpc/rpc.h... yes
checking for rpc/rpcent.h... (cached) no
checking for net/pfvar.h... no
checking for netinet/if_ether.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking smi.h usability... no
checking smi.h presence... no
checking for smi.h... no
checking whether to enable the possibly-buggy SMB printer... no
checking whether to drop root privileges by default... no
checking whether to chroot... no
checking for cap_enter... no
checking for cap_rights_limit... no
checking for cap_ioctls_limit... no
checking for openat... yes
checking whether to sandbox using capsicum... no
checking for library containing gethostbyname... none required
checking for library containing socket... none required
checking for library containing putmsg... none required
checking whether the operating system supports IPv6... yes
checking ipv6 stack type... linux-glibc
checking for vfprintf... yes
checking for strlcat... no
checking for strlcpy... no
checking for strdup... yes
checking for strsep... yes
checking for getopt_long... yes
checking for fork... yes
checking for vfork... yes
checking for strftime... (cached) yes
checking for setlinebuf... yes
checking for alarm... yes
checking for vsnprintf... (cached) yes
checking for snprintf... yes
checking return type of signal handlers... void
checking for sigaction... yes
checking for main in -lrpc... (cached) no
checking for library containing getrpcbynumber... none required
checking for x86_64-openwrt-linux-pcap-config... (cached) no
checking for pcap-config... no
checking for main in -lpcap... no
checking for pcap-config... (cached) no
checking for pcap_loop... no
configure: error: This is a bug, . . . 

Hello, here is the error log file from tcpdump.
stefan.harbich@nmanme01:~/Downloads/apu/openwrt$ nano build_dir/target-x86_64_glibc/tcpdump-full/tcpdump-4.9.3/config.log

. .
gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7407-1cd945ea22)
configure:2879: $? = 0
configure:2868: x86_64-openwrt-linux-gnu-gcc -V >&5
x86_64-openwrt-linux-gnu-gcc: error: unrecognized command line option '-V'
x86_64-openwrt-linux-gnu-gcc: fatal error: no input files
. .
configure:2868: x86_64-openwrt-linux-gnu-gcc -qversion >&5
x86_64-openwrt-linux-gnu-gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
x86_64-openwrt-linux-gnu-gcc: fatal error: no input files
. .
/home/stefan.harbich/Downloads/apu/openwrt/tmp/cczLcLzL.o: In function `main':
conftest.c:(.text.startup.main+0x8): undefined reference to `cap_rights_limit'
collect2: error: ld returned 1 exit status
configure:4590: $? = 1

Hello, I don't want to give up tcpdump. Can you give me a hint on how to install the software? Create the building without tcpdump and install the package after that over the packet manager?

Can nobody really help me? I'm using the stable version. Well then I have to fall back on another router software. Too bad.

Great, a new stable version is coming out and the version 18.06 still has bugs. thank you for your help. really great the support here. that's it with openwrt!

Hi there,
after I made the following change under make menuconfig the build works again.
Under Advanced configuration Options / Toolchain Options / C Library implementation / Use msul)
Change from Use glibc to Use musl

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.