libiconv-full undefined reference compile-time linking error for x86/_64 using GCC7 Musl
Username: Jake Staehle
Origin: https://bugs.openwrt.org/index.php?do=details&task_id=1091
LEDE Trunk using latest commit fbde9ac7
Feeds all using latest trunk sources, though that shouldn't affect this
Target is "x86" Generic (also tried x86_64)
Selected GCC 7 for compiler options
.config is attached
Problem discovered when enabling the 'minidlna' package, which has a dependency on 'libiconv-full' - a core LEDE package.
Compilation fails on 'libiconv-full' with undefined reference errors (linking errors) for objects 'aliases_lookup' and 'aliases2_lookup' in "libiconv.so":
make[5]: Entering directory '/home/jstaehle/prem2/depot/lede/build_dir/target-i386_pentium4_musl/libiconv-1.11.1/src'
/bin/sh ../libtool --mode=link i486-openwrt-linux-musl-gcc -L/home/jstaehle/prem2/depot/lede/staging_dir/target-i386_pentium4_musl/usr/lib -L/home/jstaehle/prem2/depot/lede/staging_dir/target-i386_pentium4_musl/lib -L/home/jstaehle/prem2/depot/lede/staging_dir/toolchain-i386_pentium4_gcc-7.2.0_musl/usr/lib -L/home/jstaehle/prem2/depot/lede/staging_dir/toolchain-i386_pentium4_gcc-7.2.0_musl/lib -znow -zrelro iconv_no_i18n.o ../srclib/libicrt.a ../lib/libiconv.la -o iconv_no_i18n
i486-openwrt-linux-musl-gcc -znow -zrelro iconv_no_i18n.o -o iconv_no_i18n -L/home/jstaehle/prem2/depot/lede/staging_dir/target-i386_pentium4_musl/usr/lib -L/home/jstaehle/prem2/depot/lede/staging_dir/target-i386_pentium4_musl/lib -L/home/jstaehle/prem2/depot/lede/staging_dir/toolchain-i386_pentium4_gcc-7.2.0_musl/usr/lib -L/home/jstaehle/prem2/depot/lede/staging_dir/toolchain-i386_pentium4_gcc-7.2.0_musl/lib ../srclib/libicrt.a ../lib/.libs/libiconv.so -Wl,--rpath -Wl,/home/jstaehle/prem2/depot/lede/build_dir/target-i386_pentium4_musl/libiconv-1.11.1/lib/.libs
../lib/.libs/libiconv.so: undefined reference to aliases_lookup' ../lib/.libs/libiconv.so: undefined reference to
aliases2_lookup'
collect2: error: ld returned 1 exit status
Makefile:64: recipe for target 'iconv_no_i18n' failed
make[5]: *** [iconv_no_i18n] Error 1
Full build log is also attached
Tested with a full default configuration and only options enabled being GCC 7 and a modular option for the libiconv-full package, so that should rule out any external influence.
I did find one other reference to this issue on the LEDE forums a few months ago here:
LEDE Forums: compilation fails on libiconv-full