coreutils-.8.20 introduced a dependence on iconv in lib/striconv.c. On uclibc system with iconv.h, the check for iconv succeeds, HAVE_ICONV is defined, etc, but the build fails with missing symbols because libiconv needs to be linked in --- see below. This is fixed by setting CFLAGS+="-Wl,-liconv" and a check in configure.ac could be added. make all-recursive make[1]: Entering directory `/var/tmp/portage/sys-apps/coreutils-8.20/work/coreutils-8.20' Making all in po make[2]: Entering directory `/var/tmp/portage/sys-apps/coreutils-8.20/work/coreutils-8.20/po' make[2]: Leaving directory `/var/tmp/portage/sys-apps/coreutils-8.20/work/coreutils-8.20/po' Making all in . make[2]: Entering directory `/var/tmp/portage/sys-apps/coreutils-8.20/work/coreutils-8.20' CCLD src/factor lib/libcoreutils.a(striconv.o): In function `mem_cd_iconv': striconv.c:(.text+0x4f): undefined reference to `libiconv' striconv.c:(.text+0xc3): undefined reference to `libiconv' striconv.c:(.text+0x10e): undefined reference to `libiconv' striconv.c:(.text+0x15e): undefined reference to `libiconv' striconv.c:(.text+0x1b0): undefined reference to `libiconv' lib/libcoreutils.a(striconv.o):striconv.c:(.text+0x26e): more undefined references to `libiconv' follow lib/libcoreutils.a(striconv.o): In function `str_iconv': striconv.c:(.text+0x561): undefined reference to `libiconv_open' striconv.c:(.text+0x585): undefined reference to `libiconv_close' striconv.c:(.text+0x5b4): undefined reference to `libiconv_close' collect2: ld returned 1 exit status make[2]: *** [src/factor] Error 1 make[2]: Leaving directory `/var/tmp/portage/sys-apps/coreutils-8.20/work/coreutils-8.20' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/sys-apps/coreutils-8.20/work/coreutils-8.20' make: *** [all] Error 2 Reproducible: Always
This is because I'm using the breakout libiconv and need to pass -liconv, so invalid.