#572 check_disk does not compile on uclibc (OpenWrt)

open
nobody
5
2012-09-19
2012-09-19
Bernd Krumböck
No

When you try to compile nagios-plugins for OpenWrt you get following linker error:

libtool: link: mips-openwrt-linux-uclibc-gcc -DNP_VERSION=\"1.4.16\" -Os -pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time -fhonour-copts -msoft-float -o check_disk check_disk.o utils.o popen.o -L/home/bek/develop/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/lib -L/home/bek/develop/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/lib -L/home/bek/develop/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/lib -L/home/bek/develop/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/nagios-plugins-1.4.16/plugins ../lib/libnagiosplug.a ../gl/libgnu.a -lpthread -ldl
check_disk.o: In function `get_stats':
check_disk.c:(.text+0x57c): undefined reference to `get_fs_usage'
check_disk.o: In function `main':
check_disk.c:(.text+0x1c84): undefined reference to `get_fs_usage'
collect2: ld returned 1 exit status

I don't know how uclibc implements statvfs, so my patch could have a side effect (described in fsusage.m4).

regards,
Bernd

Discussion

  •  
    Attachments