Compile errors on bootstrap, using avenj's new x86 stage1 tarball dated 0806. The platform is an AMD K6-2. Compile excerpt: make[2]: Entering directory `/var/tmp/portage/gettext-0.11.5-r1/work/gettext-0.11.5/intl' /bin/sh ../libtool --mode=compile gcc -c -DLOCALEDIR=\"/usr/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl -O3 -march=k6-2 -funroll-loops -pipe intl-compat.c /bin/sh ../libtool --mode=compile gcc -c -DLOCALEDIR=\"/usr/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl -O3 -march=k6-2 -funroll-loops -pipe bindtextdom.c gcc -c -DLOCALEDIR=\"/usr/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl -O3 -march=k6-2 -funroll-loops -pipe intl-compat.c -o intl-compat.o gcc -c -DLOCALEDIR=\"/usr/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl -O3 -march=k6-2 -funroll-loops -pipe bindtextdom.c -o bindtextdom.o echo timestamp > intl-compat.lo /bin/sh ../libtool --mode=compile gcc -c -DLOCALEDIR=\"/usr/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl -O3 -march=k6-2 -funroll-loops -pipe dcgettext.c gcc -c -DLOCALEDIR=\"/usr/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl -O3 -march=k6-2 -funroll-loops -pipe dcgettext.c -o dcgettext.o echo timestamp > dcgettext.lo /bin/sh ../libtool --mode=compile gcc -c -DLOCALEDIR=\"/usr/share/locale\" -DLOC ALE_ALIAS_PATH=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl -O3 -march=k6-2 -funroll-loops -pipe dgettext.c bindtextdom.c: In function `set_binding_values': bindtextdom.c:363: internal error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugs.gentoo.org/> for instructions. make[2]: *** [bindtextdom.lo] Error 1 make[2]: *** Waiting for unfinished jobs.... gcc -c -DLOCALEDIR=\"/usr/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl -O3 -march=k6-2 -funroll-loops -pipe dgettext.c -o dgettext.o echo timestamp > dgettext.lo make[2]: Leaving directory `/var/tmp/portage/gettext-0.11.5-r1/work/gettext-0.11.5/intl' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/gettext-0.11.5-r1/work/gettext-0.11.5' make: *** [all] Error 2 !!! ERROR: sys-devel/gettext-0.11.5-r1 failed. !!! Function src_compile, Line 34, Exitcode 2 !!! (no error message) USE in /etc/make.conf is: USE="3dfx 3dnow alsa gnome gtk X alsa" CHOST is /etc/make.conf is: CHOST="i586-pc-linux-gnu" CFLAGS in /etc/make.conf is: CFLAGS="-O3 -march=k6-2 -funroll-loops -pipe"
Still seeing fails with: USE="3dnow gnome gtk X" CHOST="i586-pc-linux-gnu" CFLAGS="-O3 -mcpu=k6-2 -pipe -fomit-frame-pointer" (same errors when -march is used) creating build/temp.linux-i586-2.2 gcc -DNDEBUG -fPIC -I/usr/include/python2.2 -c missingos.c -o build/temp.linux-i586-2.2/missingos.o -O3 -mcpu=k6-2 -pipe -fomit-frame-pointer missingos.c: In function `missingos_mknod': missingos.c:110: internal error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugs.gentoo.org/> for instructions. error: command 'gcc' failed with exit status 1 !!! ERROR: sys-apps/portage-2.0.48-r5 failed. !!! Function src_install, Line 75, Exitcode 1 !!! (no error message)
Check for proper cooling of the CPU and test your ram with memtest, this will most likely be the reason, because you get random segfaults.
The segfaults have been reproducable with the varying CFLAG and USE lines. I will do some hardware tests tonight.
Further tests indicate that segfaults occur at the same point in the portage compile depending on CFLAGS, and at another point in the gettext compile with other CFLAGS. I've also noticed that the compiles segfault out at diffent points when different -O* CFLAGS are used. So far, the best success appears to be with -O1, O2 and O3 producing the earliest failures. A note regarding hardware. CPU heatsink/fan is cool to the touch after hours of compiling, I've got it cooled very well. Memory could be an issue, I haven't been able to run a memtest yet, however the system ran fine with Solaris 9 x86. The system is powered by an AMD K6-2 running at 550 MHz, and has not had cooling or instability issues in the past. I am beginning a new bootstrap run with the following settings: USE="X gtk gnome 3dnow ssl 3dfx alsa" CHOST="i586-pc-linux-gnu" CFLAGS="-march=k6-2 -O1 -funroll-loops -pipe -fomit-frame-pointer" So far it is proceeding very smoothly. The issue appears to be related to the optimizations the CPU can handle, and may therefore not be a bug but an issue requiring more research and/or documentation (it would be nice to see a "Gentoo Optimizaing Guide" for a variety of CPU architectures. Unfortunately, I don't have time to work on this so if someone reading this desparately needs a new project, then its an idea I think worth exploring ;)
I'll put money on the -funroll-loops, personally I think that option should be filtered distro wide for k6 marches. Please remove it from your cflags as it will cause you serious problems throughout with your proc, try it and report back :)
The previous configs quoted aboves still resulted in compile failures eventually. I'm now running a bootstrap with: USE="X gtk gnome" CHOST="i586-pc-linux-gnu" CFLAGS="-mcpu=k6-2 -O" Thats about as unoptimized as you can get. I'll report further. Is there any other information that I can provide that might help figure out what the problem is, or is this kind of PITA typical of the K6 architectures and optimized gcc compiling?
This is related to Bug 24379
see these forum threads for further details on the issue: http://forums.gentoo.org/viewtopic.php?t=66820 http://forums.gentoo.org/viewtopic.php?t=40132
Memtest 3.0 detects no problems with RAM, however I removed one stick anyways leaving only 1 128 MB stick of Micron RAM installed. Compile segfaults persisted, varying in "location" as previously described. The segfaults are not random, and are reproducable. I've tried extremely unoptimzed CFLAGS (-mcpu=i586 -pipe) with no greater success. I've also clocked my CPU down to a conservative 500 MHz despite it running very cool at 550 MHz (some forum threads have suggested that underclocking the K6-2 helps). Bootstrap from stage1 using CFLAGS of -mcpu=i586 -pipe and -Os appers to be working more successfully (at least it is getting past the texinfo sys-app). Like others have pointed out, the flags for my CPU in /proc/cpuinfo do not conform to a single "K6-2" expectation. They are: fpu vme de pse tsc msr mce cx8 pge mmx syscall 3dnow k6_mtrr. So far so good, I will post results of the bootstrap in a while.
it would seem that you have a 500 MHz k6, not k6-2 (compare bug #24379 ) so the mcpu=i586 (march=i586 too probably) should work for you. I think the k6 was one of the biggest mistakes in AMD's history in this sense..
"So far so good" turned into "ERROR: sys-devel/binutils-2.14.90.0.2 failed" while I was out. I've tried emerging gcc so it is up to version 3.2.3, and it successfully compiled with CFLAGS="-mcpu=k6-2 -O3 -pipe". It didn't help for bootstrap compiles despite GCC compiling with no errors. I don't believe that I have any hardware problems, at least none glaring enough to absolve GCC and the source. I have a system which works great for any other operating system, but seems to become useless when building Gentoo. I'm going to try a stage3 install now and see if I can get any semblance of usefulness out of Gentoo 1.4 with this processor, otherwise I'm going to write off Gentoo 1.4 as simply not working properly for my K6"-2" hardware.
I've changed the summary to reflect the fact that the compile errors are occuring in stage2 installs with GCC 3.2.x (see previous regarding emerge of new GCC). I should note (in case I've overstated other theories) that research indicates that the AMD K6-2 and family are notorious for variations of the core within marketing label family, and GCC 3.x is not considered to be extremely friendly with this CPU architecture. I am of the opinion that the root cause of the problems I am experiencing (and I'm sure others are seeing this too, although other bug reports and forum threads suggest that they have been able to resolve the difficulties) is my CPU, marked as a K6-2 but baring flags suggesting it is a K6 core clocked in the K6-2 range. My kernel is unable to compile (it is erroring out in make dep, scripts/mkdep.c:221 'PATH_MAX' undeclared, etc... exiting with error 1). I've compiled enough kernels that I am confident that I haven't made an error in configuration. At this point, I don't see the value in continuing to fight with Gentoo on this architecture and may do an install on my dual ppro box if I decide that I want to sacrifice FreeBSD for the cause.
As a note (I thought I should update seeing drobbins' assignment change): Debian using GCC 3.0.x isn't having any problems with compiling on the K6-2 host. I'm also having no problems with Gentoo 1.4 on the previously mentioned ppro host.
I've downloaded the a new 0911 livecd ISO, and I'm attempting a stage1 install on the K6-2 hardware. I still get the initial segfault during bootstrap on bindtextdom.c with the -march=k6-2 CFLAG. I've change this to -mcpu=i586, and I'm taking another run at it... ... same thing, same output from the bootstrap compile as my initial submission on 2003-08-07 08:56 UTC.
I am now about to get a system running properly. I have had great success with a stage2 install from the x86 install ISO, but after emerge synce I emerge portage. I am using the following in make.conf: CHOST="i486-pc-linux-gnu" CFLAGS="-mcpu=k6-2 -O2" Everything compiles reliably, and the system is running on its own.
As per Comment #15, it looks like this issue has....fixed itself, thus, resolving as FIXED.