CFLAGS=-fno-stack-protector CXXFLAGS=-fno-stack-protector emerge gcc .... checking for C locale to use... configure: error: Unknown argument to enable/disable clocale make[2]: *** [configure-target-libstdc++-v3] Error 1 make[2]: Leaving directory `/var/tmp/portage/gcc-4.1.1/work/build' make[1]: *** [all] Error 2 make[1]: Leaving directory `/var/tmp/portage/gcc-4.1.1/work/build' make: *** [profiledbootstrap] Error 2 !!! ERROR: sys-devel/gcc-4.1.1 failed. -------------------------------------------------------------------------------- tinderbox / # emerge -pvq uclibc gcc [ebuild R ] sys-libs/uclibc-0.9.28 [ebuild NS ] sys-devel/gcc-4.1.1 tinderbox / # gcc-config -l|grep '*' [3] i386-gentoo-linux-uclibc-3.4.6-hardenednopiessp * -------------------------------------------------------------------------------- I've not looked at what patches you guys are including in gcc-4.1 so I'm going to give it another run and attempt to force USE=nocxx (which should work for initial testing) then try with few other tests. One key thing here that this gcc prevents is the appeneding of -fno-stack-protector in a few vital places. This gcc hates to be built with a gcc that is ssp enabled as it triggers in x86_split_parts() while building pretty deep into the compile phase. To work around that we have to attempt to rebuild gcc with something other than the a gcc-config 1 entry (which is kinda bad as that will export GCC_SPECS=) So it's kinda key that we find a solution for that here soon for building gcc without ssp enabled on it.
USE=nocxx worked around the problem at hand but of course yeilds a c-only compiler.
I'm slightly lost. So, what is the real problem here? The bug seems to be about clocale with uclibc, and then you are talking about -fno-stack-protector not being passed in parts...are these related? Where is -fno-stack-protector not being passed that it should be? Can you throw the config.log up so I can hopefully see more information on the clocale failure? If the two aren't related, can you open another bug so we can track them as separate issues.
ignore the later half about ssp for the moment. It's a mental note to self as I encounted it before getting onto the second error which is the uclibc-locale stuff. I think we just need to update the uclibc patchball with some newer patches for the moment. I'll try to squeeze those into my testing later today.
Any news on this? I just encountered it.
Nevermind, I found the new patches and applied them myself. However, I also needed to apply this patch from 4.2 to get it to work. I don't know why they didn't backport this patch to 4.1.1. http://www.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/toolchain/gcc/4.2/204-uclibc-locale-wchar_fix.patch
4.1.1 should work now
I tried to compile gcc-4.1.1 both with gcc-3.4.6-r1 and gcc-4.1.1 previously compiled with USE=nocxx. The new error I get after the patch has been applied is: monetary_members.cc: In member function 'void std::moneypunct<_CharT, _Intl>::_M_initialize_moneypunct(int*, const char*) [with _CharT = wchar_t, bool _Intl = true]': monetary_members.cc:409: error: '__global_locale' was not declared in this scope monetary_members.cc: In member function 'void std::moneypunct<_CharT, _Intl>::_M_initialize_moneypunct(int*, const char*) [with _CharT = wchar_t, bool _Intl = false]': monetary_members.cc:564: error: '__global_locale' was not declared in this scope make[5]: *** [monetary_members.lo] Error 1 -------------------------------------------------------------------------------- popiel / # emerge -pvq uclibc gcc ~gcc-3.4.6 [ebuild R ] sys-libs/uclibc-0.9.28 -build -debug -hardened (-iconv) -ipv6 -minimal (-nls) -pregen -savedconfig -uclibc-compat -userlocales -wordexp 0 kB [ebuild R ] sys-devel/gcc-4.1.1 (-altivec) -bootstrap -build -doc -fortran -gcj -gtk -hardened -ip28 -ip32r10k -mudflap (-multilib) -multislot (-n32) (-n64) (-nls) -nocxx* -objc -objc++ -objc-gc -vanilla 0 kB [ebuild R ] sys-devel/gcc-3.4.6-r1 (-altivec) -bootstrap -boundschecking -build -doc -fortran -gcj -gtk -hardened -ip28 -ip32r10k (-multilib) -multislot (-n32) (-n64) (-nls) -nocxx -nopie -nossp -objc -vanilla 0 kB popiel / # gcc-config -l | grep '*' [2] i686-gentoo-linux-uclibc-3.4.6 *
(In reply to comment #7) > I tried to compile gcc-4.1.1 both with gcc-3.4.6-r1 and gcc-4.1.1 previously > compiled with USE=nocxx. The new error I get after the patch has been applied > is: > > monetary_members.cc: In member function 'void std::moneypunct<_CharT, > _Intl>::_M_initialize_moneypunct(int*, const char*) [with _CharT = wchar_t, > bool _Intl = true]': > monetary_members.cc:409: error: '__global_locale' was not declared in this > scope > monetary_members.cc: In member function 'void std::moneypunct<_CharT, > _Intl>::_M_initialize_moneypunct(int*, const char*) [with _CharT = wchar_t, > bool _Intl = false]': > monetary_members.cc:564: error: '__global_locale' was not declared in this > scope > make[5]: *** [monetary_members.lo] Error 1 > > -------------------------------------------------------------------------------- > popiel / # emerge -pvq uclibc gcc ~gcc-3.4.6 > [ebuild R ] sys-libs/uclibc-0.9.28 -build -debug -hardened (-iconv) -ipv6 > -minimal (-nls) -pregen -savedconfig -uclibc-compat -userlocales -wordexp 0 kB > [ebuild R ] sys-devel/gcc-4.1.1 (-altivec) -bootstrap -build -doc -fortran > -gcj -gtk -hardened -ip28 -ip32r10k -mudflap (-multilib) -multislot (-n32) > (-n64) (-nls) -nocxx* -objc -objc++ -objc-gc -vanilla 0 kB > [ebuild R ] sys-devel/gcc-3.4.6-r1 (-altivec) -bootstrap -boundschecking > -build -doc -fortran -gcj -gtk -hardened -ip28 -ip32r10k (-multilib) -multislot > (-n32) (-n64) (-nls) -nocxx -nopie -nossp -objc -vanilla 0 kB > > popiel / # gcc-config -l | grep '*' > [2] i686-gentoo-linux-uclibc-3.4.6 * >
(In reply to comment #7) [Sorry about the previous addition] On my system I can confirm the report of comment #7, so this bug needs to be reopened.
*** Bug 141719 has been marked as a duplicate of this bug. ***
This is not fixed really.
okay the patch i mentioned in the duplicate bug fixed the __global_locale symbol issue. my emerge --info from the system ========================================================== Portage 2.1-r1 (uclibc/x86, gcc-3.4.6, uclibc-0.9.28-r0, 2.6.17-beyond2.2 i686) ================================================================= System uname: 2.6.17-beyond2.2 i686 unknown Gentoo Base System version 1.12.1 app-admin/eselect-compiler: [Not Present] dev-lang/python: 2.3.4-r1, 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.60 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.3.13-r3 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-gentoo-linux-uclibc" CFLAGS="-march=i686 -O2 -pipe" CHOST="i686-gentoo-linux-uclibc" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo" CXXFLAGS="-march=i686 -O2 -pipe" DISTDIR="/home/gentoo/distfiles" FEATURES="autoconfig distlocks metadata-transfer nodoc noinfo noman sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="pl_PL.UTF-8" LC_ALL="pl_PL.UTF-8" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 bitmap-fonts bittorrent bzip2 cli dlloader dri finger ftp gnutls gpm ncurses nntp pcre pregen readline reflection session slang spl ssl truetype-fonts type1-fonts uclibc unicode xorg zlib elibc_uclibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS ========================================================== btw. why does portage add -r0 to uclibc version? the patch is here http://www.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/toolchain/gcc/4.1.1/200-uclibc-locale.patch?rev=15550&view=log (rev 15550)
sorry for double posting. i forgot to mention that gcc 4.1.1 built fine, i'm in the middle of rebuilding my system with it. so the patch rev 15550 works fine for me.
The patch specified in comment #12 is in gentoo cvs http://viewcvs.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.1.1/uclibc/90_all_200-uclibc-locale.patch?rev=1.2&view=log however, the uclibc patch tarball (version 1.0) downloaded by the current 4.1.1 ebuild does not contain the above specified version and instead has revision 1.1 The patch tarball needs to be updated, along with the associated ebuild. I'm performing a build right now with a locally modified uclibc patch tarball however my machine is slow and cannot confirm whether this is successful.
Unfortunatly one month has passed but nothins seem to be changed... I have the same problem here: /usr/i686-gentoo-linux-uclibc/sys-include -I/var/tmp/portage/gcc-4.1.1/work/build/i686-gentoo-linux-uclibc/libstdc++-v3/include/i686-gentoo-linux-uclibc -I/var/tmp/portage/gcc-4.1.1/work/build/i686-gentoo-linux-uclibc/libstdc++-v3/include -I/var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/libstdc++-v3/libsupc++ -g -Os -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -c monetary_members.cc -fPIC -DPIC -o .libs/monetary_members.o monetary_members.cc: In member function 'void std::moneypunct<_CharT, _Intl>::_M_initialize_moneypunct(int*, const char*) [with _CharT = wchar_t, bool _Intl = true]': monetary_members.cc:409: error: '__global_locale' was not declared in this scope monetary_members.cc: In member function 'void std::moneypunct<_CharT, _Intl>::_M_initialize_moneypunct(int*, const char*) [with _CharT = wchar_t, bool _Intl = false]': monetary_members.cc:564: error: '__global_locale' was not declared in this scope make[5]: *** [monetary_members.lo] Error 1 make[5]: Leaving directory `/var/tmp/portage/gcc-4.1.1/work/build/i686-gentoo-linux-uclibc/libstdc++-v3/src' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/var/tmp/portage/gcc-4.1.1/work/build/i686-gentoo-linux-uclibc/libstdc++-v3' make[3]: *** [all] Error 2 make[3]: Leaving directory `/var/tmp/portage/gcc-4.1.1/work/build/i686-gentoo-linux-uclibc/libstdc++-v3' make[2]: *** [all-target-libstdc++-v3] Error 2 make[2]: Leaving directory `/var/tmp/portage/gcc-4.1.1/work/build' make[1]: *** [all] Error 2 make[1]: Leaving directory `/var/tmp/portage/gcc-4.1.1/work/build' make: *** [profiledbootstrap] Error 2 !!! ERROR: sys-devel/gcc-4.1.1 failed. Call stack: ebuild.sh, line 1539: Called dyn_compile ebuild.sh, line 939: Called src_compile ebuild.sh, line 1248: Called toolchain_src_compile toolchain.eclass, line 24: Called gcc_src_compile toolchain.eclass, line 1528: Called gcc_do_make toolchain.eclass, line 1402: Called die This is my emerge --info Portage 2.1-r2 (uclibc/x86/2005.1, gcc-3.3.5-20050130, uclibc-0.9.28-r0, 2.6.17-gentoo-r4-lightweight i686) ================================================================= System uname: 2.6.17-gentoo-r4-lightweight i686 Intel(R) Pentium(R) M processor 1400MHz Gentoo Base System version 1.4.16 app-admin/eselect-compiler: [Not Present] dev-lang/python: 2.3.4-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.4 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r3 sys-devel/libtool: 1.5.14 virtual/os-headers: 2.4.22-r1 ACCEPT_KEYWORDS="x86" ACCEPT_LICENSE="" ARCH="x86" AUTOCLEAN="yes" CBUILD="i686-gentoo-linux-uclibc" CFLAGS="-march=pentium2 -Os -pipe" CHOST="i686-gentoo-linux-uclibc" CLASSPATH="." CLEAN_DELAY="5" COLORTERM="" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo" CVS_RSH="ssh" CXXFLAGS="-march=pentium2 -Os -pipe" DCOP_YAKUAKE_SESSION="0" DESKTOP_SESSION="default" DISPLAY=":0" DISTDIR="/usr/portage/distfiles" DM_CONTROL="/var/run/xdmctl" EDITOR="/bin/nano" ELIBC="uclibc" EMERGE_DEFAULT_OPTS="-Dv" EMERGE_WARNING_DELAY="10" FEATURES="autoconfig ccache distcc distlocks fixpackages metadata-transfer nodoc noinfo noman sandbox sfperms strict" FETCHCOMMAND="/usr/bin/wget -t 5 -T 60 --passive-ftp -P ${DISTDIR} ${URI}" GCC_SPECS="" GDK_USE_XFT="1" GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo http://distfiles.gentoo.org" GPG_AGENT_INFO="/tmp/gpg-qIQ39l/S.gpg-agent:7519:1" GRP_STAGE23_USE="ncurses readline zlib uclibc" GS_LIB="/home/deadhead/.fonts" G_BROKEN_FILENAMES="1" G_FILENAME_ENCODING="UTF-8" HOME="/root" INFODIR="/usr/share/info" INFOPATH="/usr/share/info:/usr/share/gcc-data/i386-gentoo-linux-uclibc/3.3.5-20050130/info" INPUTRC="/etc/inputrc" INPUT_DEVICES="evdev mouse keyboard" JAVAC="/opt/blackdown-jdk-1.4.2.03/bin/javac" JAVA_HOME="/opt/blackdown-jdk-1.4.2.03" JDK_HOME="/opt/blackdown-jdk-1.4.2.03" KERNEL="linux" LANG="it_IT@euro" LC_ALL="it_IT@euro" LC_MESSAGES="it_IT@euro" LESS="-R" LESSOPEN="|lesspipe.sh %s" LINGUAS="it" LOGNAME="root" MAKEOPTS="-j2" MANPATH="/usr/share/man:/usr/local/share/man:/usr/share/gcc-data/i386-gentoo-linux-uclibc/3.3.5-20050130/man" MM_CHARSET="ISO-8859-15" OLDPWD="/" OPENGL_PROFILE="nvidia" PAGER="/usr/bin/less" PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/opt/bin:/usr/i386-gentoo-linux-uclibc/gcc-bin/3.3.5-20050130" PKGDIR="/usr/portage/packages" PORTAGE_ARCHLIST="ppc s390 amd64 ppc64 x86-fbsd m68k arm sparc sh mips ia64 alpha ppc-macos hppa x86" PORTAGE_BINHOST_CHUNKSIZE="3000" PORTAGE_BIN_PATH="/usr/lib/portage/bin" PORTAGE_CALLER="emerge" PORTAGE_CONFIGROOT="/" PORTAGE_ELOG_CLASSES="info warn error log" PORTAGE_ELOG_MAILFROM="portage" PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}" PORTAGE_ELOG_MAILURI="root" PORTAGE_ELOG_SYSTEM="save" PORTAGE_GID="250" PORTAGE_INST_GID="0" PORTAGE_INST_UID="0" PORTAGE_LIBC="uClibc" PORTAGE_PYM_PATH="/usr/lib/portage/pym" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_RSYNC_RETRIES="3" PORTAGE_TMPDIR="/var/tmp" PORTAGE_WORKDIR_MODE="0700" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" PRELINK_PATH="" PRELINK_PATH_MASK="/usr/lib/klibc" PS1="\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]" PWD="/etc" PYTHONPATH="/usr/lib/portage/pym" ROOT="/" SHELL="/bin/bash" SHLVL="4" SSH_AGENT_PID="7522" SSH_AUTH_SOCK="/tmp/ssh-fLZDdL7521/agent.7521" STAGE1_USE="uclibc" TERM="xterm" UCLIBC_CPU="PENTIUMII" UCLIBC_CPU_DEFAULT="GENERIC_386" USE="x86 X aac alsa apm asf bash-completion bzip2 cairo cpudetection crypt cups curl dbus exif fam firefox flac foomaticdb ftp geoip gif gs gtk gtk2 hal icq idn imagemagick ithreads jabber java javascript jbig jpeg jpeg2k kde kdeenablefinal kdexdeltas minimal mmx mp3 mp4 mpeg mplayer musepack ncurses no-old-linux nsplugin ogg openal pam pcmcia pdf png posix ppds qt3 qt4 quicktime sdl ssl svg theora threads tiff truetype uclibc usb userlocales vorbis wifi win32codecs wma wmf xpm xvid zlib elibc_uclibc input_devices_evdev input_devices_mouse input_devices_keyboard kernel_linux linguas_it userland_GNU video_cards_neomagic" USER="root" USERLAND="GNU" USE_EXPAND="DVB_CARDS ELIBC FCDSL_CARDS FRITZCAPI_CARDS INPUT_DEVICES KERNEL LINGUAS LIRC_DEVICES USERLAND VIDEO_CARDS" USE_EXPAND_HIDDEN="ELIBC KERNEL USERLAND" USE_ORDER="env:pkg:conf:defaults" VIDEO_CARDS="neomagic" WINDOWID="23068857" XARGS="xargs -r" XAUTHORITY="/root/.xauthPqkLmQ" _="/usr/bin/emerge" If you need more info just ask.
that's because no one uploaded new patch tarball info distfile servers you will need to: download all the patches from here: http://viewcvs.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.1.1/uclibc/ put them into "uclibc" directory somewhere tar this dir up : tar -cvjf gcc-4.1.1-uclibc-patches-1.0.tar.bz2 uclibc/* copy this file into distfiles dir, and do emerge --digest =gcc-4.1.1 to redigest the ebuild. it builds for me. i had a major system breakage after rebuilding ~20 packages when using gcc-config-2 - this package is said to cause trouble with gcc on many systems. so i presume that it was to blame. i'll try with 4.1.1 again today. can someone put out a new patch tarball into distfile servers?
fixes are in cvs