I tried several times to emerge xfree4.2.1-r2.ebuild (and similar ebuilds), but it reproducibly breaks at this point: installing in lib/GL/mesa/src/OSmesa... make[4]: Entering directory `/var/tmp/portage/xfree-4.2.1-r2/ work/xc/lib/GL/mesa/src/OSmesa' make[4]: *** No rule to make target `../../../../../lib/GL/mesa/ src/unshared/vertices.o', needed by `libOSMesa.a'. Stop. make[4]: Leaving directory `/var/tmp/portage/xfree-4.2.1-r2/ work/xc/lib/GL/mesa/src/OSmesa' make[3]: *** [install] Error 2 make[3]: Leaving directory `/var/tmp/portage/xfree-4.2.1-r2/ work/xc/lib/GL' make{2]: *** [install] Error 2 make[2]: Leaving directory `/var/tmp/portage/xfree-4.2.1-r2/ work/xc/lib' make[1]: *** [install] Error 2 make[1]: Leaving directory `/var/tmp/portage/xfree-4.2.1-r2/ work/xc' make: *** [install] Error 2 !!! ERROR: x11-base/xfree-4.2.1-r2 failed. !!! Function src_install, Line 206, Exitcode 2 !!! (no error message) I'm using gcc 3.2.1, portage 2.0.46-r2, CFLAGS="-march=k6-2 -Os -pipe" and haven't set any USE parameters in /etc/make.conf.
Please include a more extensive log, thanks.
I logged the whole emerging process. The log comprises ~50000 lines and there are a number of error messages in it, so I don't know how much to quote. Would it be okay to send the compressed log file (~200 KB) to you?
Just bzip2 it and attatch here, thanks.
Created attachment 6802 [details] Error log
Ok, here are the real problem: -------------------------------------------------------------------------------- gcc -c -march=k6-2 -Os -pipe -ansi -pedantic -Wall -Wpointer-arith -I../../../../../../exports/include/X11 -I../../../../../../include/extensions -I../../../../../../extras/Mesa/src -I../../../../../../lib/GL/mesa/src/drv/gamma -I../../../../../../lib/GL/dri -I../../../../../../lib/GL/glx -I../../../../../../exports/include -I../../../../../../exports/include/GL -I../../../../../../lib/GL/mesa/dri -I../../../../../../programs/Xserver/GL/dri -I../../../../../../programs/Xserver/hw/xfree86/drivers/glint -I../../../../../../programs/Xserver/hw/xfree86/os-support -I../../../../../.. -I../../../../../../exports/include -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DFUNCPROTO=15 -DNARROWPROTO -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DMALLOC_0_RETURNS_NULL -DGLXEXT -DXF86DRI -DGLX_DIRECT_RENDERING -DGLX_USE_DLOPEN -DGLX_USE_MESA -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_KATMAI_ASM -fPIC ../../../../../../lib/GL/mesa/src/vertices.c {standard input}: Assembler messages: {standard input}:70: Error: value of ffffffffffffff7f too large for field of 1 bytes at 000000000000009c make[6]: *** [../../../../../../lib/GL/mesa/src/vertices.o] Error 1 make[6]: Target `all' not remade because of errors. make[6]: Target `all' not remade because of errors. make[6]: Leaving directory `/var/tmp/portage/xfree-4.2.1-r2/work/xc/lib/GL/mesa/src/drv/gamma' -------------------------------------------------------------------------------- Usually this is caused by buggy gcc/binutils. Either: 1) Try to merge with CFLAGS="-march=k6-2 -O2 -pipe" 2) Try to merge with CFLAGS="-march=i586 -O2 -pipe" 3) Remerge binutils with CFLAGS="-march=i586 -O2 -pipe", and then xfree. Let me know, thanks.
Now I tried to merge with CFLAGS="-march=k6-2 -O2 -pipe", and that worked. Thanks a lot for your help.
Ok, thanks, I will update the ebuild to look for -Os.
i did some testing with -Os with gcc 3.2.2 and 3.2.3 both seem to not have this problem on athlon-xp, k6-2, and pentium2
My experience corroborates comment #8: gcc 3.2.3 with -Os compiles xfree86 fine(ebuild xfree-4.3.0-r2) and as far as I can tell so far, the result runs without problems too. Can we make the replace-flags command in the ebuild conditional on the gcc version being one that's known to cause the compile failure?
*** Bug 41443 has been marked as a duplicate of this bug. ***
Is this bug really fixed? The ebuild still can't cope with -Os even tough comments #8 and #9 indicate that it is possible to do so.
By the way, I'm trying to compile XFree-4.3.0r5 but the problem is the same (-Os gets replaced by -O2 unconditionally).
works fine here with -Os, maybe we can include it again?
-Os will be filtered by strip-flags unless you are running on ~${ARCH} (ie ~x86) However if you are running on ~x86 then -Os is perfectly legal, but xfree-4.3.0-r6 is the only 4.3.0 or earlier version we have in portage that uses ~x86. So if you are using 4.2.1 or 4.3.0-r5 then -Os will be striped from strip-flags not the actual ebuild itself. In other words if you want to run in the stable profile you cant have -Os (among others). Lanius when you said it works fine with -Os which versions of xfree and gcc were you refering to?
My impression was that it doesn't matter what the keyword on the ebuild is, it matters what the person's ACCEPT_KEYWORDS setting is. For example, ACCEPT_KEYWORDS=~x86 emerge =xfree-4.3.0-r5 would allow -Os. But I haven't read the code and don't have access to it now.
i successfully compile xorg-x11 with -march=athlon-xp -Os There currently is the following line in all xfree and xorg-x11 ebuilds: replace-flags "-Os" "-O2" so i think it is always replaced
Ah yes, forgot about that. I was just thinking of the strip-flags.
Yes I was only thinking of strip-flags aswell. So what do we want to do? 1) Filter -march=k6* and replace it with -march=i586 2) Replace -Os with -O2 only on k6*? The first one is probably more simple and we could then get rid of the replace-flags "-Os" "-O2" all together... Oppinions?
comment #8 says, that recent versions compile with -march=k6-2 -Os as well
I was getting the same error on a Pentium 4. I tried rebuilding binutils and gcc to no avail, and finally ended up bootstrapping. I started with stage2. Previously, I built this system from scratch (stage1) and had gotten no errors at all, and had gnome and xfree working just fine. I didn't leave enough space on my hard drive and was trying to save a little time on the rebuild by starting with stage2. Isn't that always the way? After bootstrapping, the system and xfree have compiled quite happily.
so can you finally remove it donnie?
fyi. I have just altered the ebuild and compiled xorg-x11-6.7.0-r2 with -Os. The compiles were successful and X runs just fine. Using cflags -Os -pipe -march=pentium4 -fomit-frame-pointer. I'm on glibc-2.3.4.20040619-r1 (nptl) and gcc-3.3.4-r1. Running kernel gentoo-dev-sources-2.6.7-r12. So this is looking more and more like a K6 only problem.
spyderous: i know you are busy, but this one is quite easy to fix ;)
Let me get this straight: The combination of k6* and -Os is broken with earlier gcc versions than 3.2.2. So we'll check for >=3.2.2 || strip -Os. Sound good?
sounds really good ;)
Added to 6.8.0-r2.
I think the same fix should be applied to xfree just as well. However, the ebuild still replaces all -Os with -O2: grep '\-Os' /usr/portage/x11-base/xfree/xfree-4.3.0-r8.ebuild # Bug #12775 .. fails with -Os. replace-flags "-Os" "-O2 Moreover, -Os is not in ALLOWED_FLAGS, I think that should also be changed. [Additional verification note: I have successfully compiled (and am using ;) the above mentioned ebuild with the appropriate changes to allow -Os. (I also allowed -march=pentium4; just mentioning for the sake of completeness ;) ]
xfree is deprecated and will not be getting anything even resembling a new feature, sorry. By the way, your grep can screw things up pretty easily because it won't catch whether something's inside an `if;then` construct.