gcc-3.4.4-r1 does not compile on embedded x86 (uclibc). Seems like this bug is related to iconv. Reproducible: Always Steps to Reproduce: 1. emerge sync && emerge gcc 2. 3. Actual Results: In file included from /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/bits/codecvt.h:475, from /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/bits/locale_facets.h:1533, from /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/locale:46, from /var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/libstdc++-v3/src/codecvt.cc:30: /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:52: error: `iconv_t' does not name a type /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:64: error: `__desc_type' does not name a type /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:66: error: `__desc_type' does not name a type /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:170: error: expected `;' before '*' token /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:174: error: expected `;' before "const" /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:174: error: expected `;' before '*' token /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:178: error: expected `;' before "int" /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h: In constructor `std::__enc_traits::__enc_traits()': /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:76: error: class `std::__enc_traits' does not have any field named `_M_in_desc' /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:76: error: class `std::__enc_traits' does not have any field named `_M_out_desc' /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h: In constructor `std::__enc_traits::__enc_traits(const char*, const char*, int, int)': /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:84: error: class `std::__enc_traits' does not have any field named `_M_in_desc' /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:84: error: class `std::__enc_traits' does not have any field named `_M_out_desc' /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h: In copy constructor `std::__enc_traits::__enc_traits(const std::__enc_traits&)': /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:99: error: class `std::__enc_traits' does not have any field named `_M_in_desc' /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:99: error: class `std::__enc_traits' does not have any field named `_M_out_desc' /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h: In member function `void std::__enc_traits::_M_init()': /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:128: error: `__desc_type' does not name a type /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:129: error: `_M_in_desc' undeclared (first use this function) /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:129: error: (Each undeclared identifier is reported only once for each function it appears in.) /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:131: error: `iconv_open' undeclared (first use this function) /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:132: error: `__err' undeclared (first use this function) /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:136: error: `_M_out_desc' undeclared (first use this function) /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h: In member function `void std::__enc_traits::_M_destroy()': /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:148: error: `__desc_type' does not name a type /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:149: error: `_M_in_desc' undeclared (first use this function) /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:149: error: `__err' undeclared (first use this function) /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:151: error: `iconv_close' undeclared (first use this function) /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:154: error: `_M_out_desc' undeclared (first use this function) /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h: In member function `bool std::__enc_traits::_M_good()': /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:164: error: `__desc_type' does not name a type /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:165: error: `_M_in_desc' undeclared (first use this function) /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:165: error: `__err' undeclared (first use this function) /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:166: error: `_M_out_desc' undeclared (first use this function) /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h: At global scope:/var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:208: error: type `std::__enc_traits' is not derived from type `std::codecvt<_InternT, _ExternT, std::__enc_traits>' /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:208: error: expected `;' before "__desc_type" /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:268: error: `std::__iconv_adaptor' declared as an `inline' variable /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:268: error: template declaration of `size_t std::__iconv_adaptor' /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:268: error: `__func' was not declared in this scope /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:268: error: `iconv_t' was not declared in this scope /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:268: error: expected primary-expression before ',' token /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:268: error: expected primary-expression before '*' token /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:268: error: expected primary-expression before ',' token /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:268: error: expected primary-expression before "char" /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:268: error: expected primary-expression before '*' token /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:268: error: expected primary-expression before ')' token /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:268: error: `(size_t)(<expression error>)' cannot be used as a function /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:269: error: `iconv_t' was not declared in this scope /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:269: error: expected primary-expression before "char" /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:269: error: expected primary-expression before '*' token /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:269: error: `__inbytes' was not declared in this scope /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:270: error: expected primary-expression before "char" /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:270: error: expected primary-expression before '*' token /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:270: error: `__outbytes' was not declared in this scope /var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/i386-gentoo-linux-uclibc/bits/codecvt_specializations.h:271: confused by earlier errors, bailing out make[4]: *** [codecvt.lo] Error 1 make[4]: Leaving directory `/var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/src' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3' make[2]: *** [all] Error 2 make[2]: Leaving directory `/var/tmp/portage/gcc-3.4.4-r1/work/build/i386-gentoo-linux-uclibc/libstdc++-v3' make[1]: *** [all-target-libstdc++-v3] Error 2 make[1]: Leaving directory `/var/tmp/portage/gcc-3.4.4-r1/work/build' make: *** [profiledbootstrap] Error 2 Expected Results: successful compile # emerge --info Portage 2.0.51.22-r2 (uclibc/x86/hardened, gcc-3.4.4, uclibc-0.9.27-r0, 2.6.8-2-686-smp i686) ================================================================= System uname: 2.6.8-2-686-smp i686 Intel(R) Xeon(TM) CPU 2.40GHz Gentoo Base System version 1.12.0_pre6 distcc 2.18.3 i386-gentoo-linux-uclibc (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.4 [disabled] dev-lang/python: 2.3.4-r1, 2.4.1-r1 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i386-gentoo-linux-uclibc" CFLAGS="-march=i386 -Os -pipe -fomit-frame-pointer" CHOST="i386-gentoo-linux-uclibc" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-Os -pipe" DISTDIR="/var/cache/distfiles" FEATURES="autoconfig buildpkg distcc distlocks nodoc noinfo noman sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j4" PKGDIR="/var/cache/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/src/alpine/apks/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X509 berkdb bitmap-fonts cdr cracklib curl gd hardened jpeg mad minimal ncurses ogg pcmcia pic png python readline rrdtool sqlite ssl truetype truetype-fonts uclibc vorbis xml2 zlib userland_GNU kernel_linux elibc_uclibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
This happens probably because you have installed libiconv. I propose to save libiconv.so.*, remove libiconv pkg, put libiconv.so.* back to /usr/lib (but not libiconv.so/.la/.a), the earlier compiler could depend on it already (check ldd /usr/arch*/gcc-bin/gcc* for libiconv) and build now gcc. To be sure run also revdep-rebuild --soname libiconv.so.<major-version> before you remove finally your libiconv shared libs. Generally having libiconv and/or gettext on your uclibc system is not a working configuration, these 2 packages should be masked in all uclibc profiles.
localization support isnt really supported atm with uClibc
Removing gettext and libiconv and recompiling solved this. (I also needed to recompile all apps linked to gettext and libiconv - with some fuzz but Peter's explenation on how to keep the .so's solved it) Thanks! This bug can be closed.
locale stuff is currently unsupported in uclibc