Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 55900 - gimp 2.0.0 fails to compile on PIII w/hardened gcc 3.3.3 in two ways (50% fixed)
Summary: gimp 2.0.0 fails to compile on PIII w/hardened gcc 3.3.3 in two ways (50% fixed)
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
: 47177 54724 55389 (view as bug list)
Depends on:
Blocks: 47177
  Show dependency tree
 
Reported: 2004-07-02 10:27 UTC by Seth Robertson
Modified: 2004-12-17 13:27 UTC (History)
13 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Preprocessed source stored into /var/tmp/portage/gimp-2.0.0/temp/ccR6W29W.out fi le, please attach this to your bugreport. (gimp,269.71 KB, text/plain)
2004-07-15 15:44 UTC, Seth Robertson
Details
cpu-accel.c from /tmp/portage/gimp-2.0.0/work/gimp-2.0.0/app/base (cpu-accel.c,9.01 KB, text/plain)
2004-07-15 16:01 UTC, Seth Robertson
Details
emerge --info output (emerge.hardened.info,1.88 KB, text/plain)
2004-10-10 22:03 UTC, Jocelyn Mayer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Seth Robertson 2004-07-02 10:27:57 UTC
I tried to emerge gimp and it failed in ways described by <a href="http://bugs.gentoo.org/show_bug.cgi?id=47177">47177</a>  Reading this ticket, I used the USE flags to disable sse and mmx, and then failed in a different way.  Note that this latter failure is described in <a href="http://bugs.gentoo.org/show_bug.cgi?id=54068">54068</a> as relating to gcc being more picky.  Reading the information provided in that ticket, the two error may be related (assembler clobber lists).

USE="-sse -mmx"
----------------------------
gimp-2.0.0/work/gimp-2.0.0/app/base

startide root> make
if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../app -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include -DG_LOG_DOMAIN=\"Gimp-Base\"  -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE  -O2 -march=pentium3 -fomit-frame-pointer -Wall -MT cpu-accel.o -MD -MP -MF ".deps/cpu-accel.Tpo" \
  -c -o cpu-accel.o `test -f 'cpu-accel.c' || echo './'`cpu-accel.c; \
then mv -f ".deps/cpu-accel.Tpo" ".deps/cpu-accel.Po"; \
else rm -f ".deps/cpu-accel.Tpo"; exit 1; \
fi
cpu-accel.c: In function `arch_get_vendor':
cpu-accel.c:124: error: can't find a register in class `BREG' while reloading `asm'
cpu-accel.c: At top level:
cpu-accel.c:330: warning: `sigill_handler' defined but not used
make: *** [cpu-accel.o] Error 1
-----------------------------


Error without USE manipulation:
-------------------------------
gimp-2.0.0/work/gimp-2.0.0/app/composite
startide root> make
if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../app -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include -DG_LOG_DOMAIN=\"Gimp-Composite\"  -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE  -O2 -march=pentium3 -fomit-frame-pointer -Wall -MT gimp-composite-sse.o -MD -MP -MF ".deps/gimp-composite-sse.Tpo" \
  -c -o gimp-composite-sse.o `test -f 'gimp-composite-sse.c' || echo './'`gimp-composite-sse.c; \
then mv -f ".deps/gimp-composite-sse.Tpo" ".deps/gimp-composite-sse.Po"; \
else rm -f ".deps/gimp-composite-sse.Tpo"; exit 1; \
fi
gimp-composite-sse.c: In function `gimp_composite_scale_rgba8_rgba8_rgba8_sse':
gimp-composite-sse.c:1045: internal compiler error: asm clobber conflict with input operand
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
Preprocessed source stored into /tmp/ccDgDHkB.out file, please attach this to your bugreport.
make: *** [gimp-composite-sse.o] Error 1
-------------------------------


Reproducible: Always
Steps to Reproduce:
1. emerge gimp || USE="-mmx -sse" emerge gimp
2.
3.

Actual Results:  
Two different compile errors, depending on whether mmx/sse was defined or not.

Expected Results:  
Emerged


Portage 2.0.50-r8 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0,
2.6.7-gentoo-r7)
=================================================================
System uname: 2.6.7-gentoo-r7 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo
ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://gentoo.mirrored.ca/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X Xaw3d aalib acpi alsa apache2 apm arts audiofile avi berkdb caps
cdr crypt cscope cups curl dga directfb doc emacs encode esd ethereal fdftk flac
foomaticdb gd gdbm gif gmp gnome gphoto2 gpm gtk gtk2 hardened imagemagick imlib
java joystick jpeg kde lcms ldap lesstif libg++ libwww mad mbox mikmod mmx motif
mozilla mpeg mysql ncurses nls nocardbus nocd oggvorbis opengl oss pam pdflib
perl plotutils png postgres ppds prelude python qt quicktime readline samba sdl
slang snmp socks5 speex spell sse ssl svga tcltk tcpd tetex theora tiff truetype
unicode usb videos wmf x86 xinerama xml xml2 xmms xosd xv zlib"
Comment 1 Seth Robertson 2004-07-03 12:14:33 UTC
Due to problems compiling openoffice (bugid 52642) I tried compiling openoffice using gcc without hardening which successfully completed.  Hurrah.  It didn't install for other reasons, but that is besides the point.  Afterwards I tried compiling gimp with the unhardened gcc (USE="-hardened" emerge gcc) and it successfully compiled without either sse, mme, or asm clobbering problems.  Furthermore, it even installed correctly!  Hurrah!

Thus, this bug appears to be a hardened gcc bug and gimp is just marginal.

Comment 2 Spider (RETIRED) gentoo-dev 2004-07-09 11:55:24 UTC
Okay, this seems to be gcc + USE="hardened" related,  Can somone from toolchain please have a look at this?
Comment 3 Brandon Hale (RETIRED) gentoo-dev 2004-07-09 19:32:37 UTC
For reference:
http://bugs.gnome.org/show_bug.cgi?id=132999

The first issue you encountered was "fixed", but it cropped back up in the next
release.
Comment 4 Nathan Adams 2004-07-13 19:41:50 UTC
Doing this:

USE="-hardened -mmx -sse" emerge -uv gimp

still leads to this for me:

cpu-accel.c: In function `arch_get_vendor':
cpu-accel.c:124: error: can't find a register in class `BREG' while reloading `asm'
cpu-accel.c: At top level:
cpu-accel.c:330: warning: `sigill_handler' defined but not used
make[3]: *** [cpu-accel.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/var/tmp/portage/gimp-2.0.0/work/gimp-2.0.0/app/base'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/gimp-2.0.0/work/gimp-2.0.0/app'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/gimp-2.0.0/work/gimp-2.0.0'
make: *** [all] Error 2

!!! ERROR: media-gfx/gimp-2.0.0 failed.
!!! Function src_compile, Line 92, Exitcode 2
!!! (no error message)

Is there a work around for this bug?
Comment 5 Nathan Adams 2004-07-15 04:56:44 UTC
I recompiled gcc as follows:

USE="-hardened" emerge gcc

And now GIMP emerges just fine.
Comment 6 solar (RETIRED) gentoo-dev 2004-07-15 08:56:14 UTC
wow... you like to do things the hardway ? :)

In the future to disable ssp or pie you can use the -fno FLAGS
so for this case. 
CFLAGS="-fno-pie" emerge gimp

Should of solved the problem you encountered without having to remerge gcc.

Or to disable ssp in the future.
CFLAGS="-fno-stack-protector-all"

Anyway can somebody please attach a copy of cpu-accel.c so that we may take a peek and see whats going on.
Comment 7 Seth Robertson 2004-07-15 15:44:41 UTC
Created attachment 35509 [details]
Preprocessed source stored into /var/tmp/portage/gimp-2.0.0/temp/ccR6W29W.out fi
le, please attach this to your bugreport.

Because I am stupid, almost baka you might say, I failed to specify the
-sse/-mmx USE flags to generate the error case I was asked for.  However, since
presumably this error needs to be fixed as well, I will proactively attach this
error as well.

if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../app
-I/usr/include/glib-2
.0 -I/usr/lib/glib-2.0/include	 -I/usr/include
-DG_LOG_DOMAIN=\"Gimp-Composite\
"  -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE  -O2 -march=pentium3
-fomit-frame-p
ointer -Wall -MT gimp-composite.o -MD -MP -MF ".deps/gimp-composite.Tpo" \
  -c -o gimp-composite.o `test -f 'gimp-composite.c' || echo
'./'`gimp-composite
.c; \
then mv -f ".deps/gimp-composite.Tpo" ".deps/gimp-composite.Po"; \
else rm -f ".deps/gimp-composite.Tpo"; exit 1; \
fi
Preprocessed source stored into /var/tmp/portage/gimp-2.0.0/temp/ccR6W29W.out
fi
le, please attach this to your bugreport.
make[3]: *** [gimp-composite-sse.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory
`/n/startide/proj/st/tmp/portage/gimp-2.0.0/work/gimp
-2.0.0/app/composite'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/n/startide/proj/st/tmp/portage/gimp-2.0.0/work/gimp
-2.0.0/app'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/n/startide/proj/st/tmp/portage/gimp-2.0.0/work/gimp
-2.0.0'
make: *** [all] Error 2

!!! ERROR: media-gfx/gimp-2.0.0 failed.
!!! Function src_compile, Line 92, Exitcode 2
!!! (no error message)

gcc version 3.3.3 20040412 (Gentoo Hardened Linux 3.3.3-r6, ssp-3.3.2-2,
pie-8.7.6)
Comment 8 Seth Robertson 2004-07-15 16:01:41 UTC
Created attachment 35513 [details]
cpu-accel.c from /tmp/portage/gimp-2.0.0/work/gimp-2.0.0/app/base

Here is the requested cpu-accel.c

It appears to be part of the gimp distribution, so I am kinda bemused as to why
I have to produce it, but I am your servant in these matters.

To be clear, this is with hardened gcc with USE="-sse -mmx" emerge gimp

if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../app
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include
-DG_LOG_DOMAIN=\"Gimp-Base\"  -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE  -O2
-march=pentium3 -fomit-frame-pointer -Wall -MT cpu-accel.o -MD -MP -MF
".deps/cpu-accel.Tpo" \
  -c -o cpu-accel.o `test -f 'cpu-accel.c' || echo './'`cpu-accel.c; \
then mv -f ".deps/cpu-accel.Tpo" ".deps/cpu-accel.Po"; \
else rm -f ".deps/cpu-accel.Tpo"; exit 1; \
fi
cpu-accel.c: In function `arch_get_vendor':
cpu-accel.c:124: error: can't find a register in class `BREG' while reloading
`asm'
cpu-accel.c: At top level:
cpu-accel.c:330: warning: `sigill_handler' defined but not used
make: *** [cpu-accel.o] Error 1

gcc version 3.3.3 20040412 (Gentoo Hardened Linux 3.3.3-r6, ssp-3.3.2-2,
pie-8.7.6)

Let me know if there is something else I can do to help
Comment 9 solar (RETIRED) gentoo-dev 2004-07-15 19:09:09 UTC
hrmm seems the patch has been reverted or is MIA from gimp source.

Anyway can somebody patch with this attachment and try again? 
This should solve the BREG problem.

http://bugs.gnome.org/attachment.cgi?id=23916&action=view
Comment 10 Seth Robertson 2004-07-15 20:15:23 UTC
Well, the patch you provided did not apply cleanly.  Having successfully avoided understanding assembler to this point in my career, I rolled some dice and tried to guess what you were going for.  Either I failed utterly, or the patch doesn't work.  Below you will see the patch I used and the error it generated:

---------------------------------------------------------------------
if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../app -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include -DG_LOG_DOMAIN=\"Gimp-Base\"  -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE  -O2 -march=pentium3 -fomit-frame-pointer -Wall -MT cpu-accel.o -MD -MP -MF ".deps/cpu-accel.Tpo" \
  -c -o cpu-accel.o `test -f 'cpu-accel.c' || echo './'`cpu-accel.c; \
then mv -f ".deps/cpu-accel.Tpo" ".deps/cpu-accel.Po"; \
else rm -f ".deps/cpu-accel.Tpo"; exit 1; \
fi
cpu-accel.c: In function `arch_get_vendor':
cpu-accel.c:108: error: can't find a register in class `BREG' while reloading `asm'
cpu-accel.c: At top level:
cpu-accel.c:334: warning: `sigill_handler' defined but not used
make: *** [cpu-accel.o] Error 1
--------------------------------------------------------------

--- cpu-accel.c.orig    2004-03-10 10:10:29.000000000 -0500
+++ cpu-accel.c 2004-07-15 23:13:11.476433271 -0400
@@ -85,9 +85,12 @@
            : "0" (op))
 #else
 #define cpuid(op,eax,ebx,ecx,edx)  \
-  __asm__ ("cpuid"                 \
+  __asm__ ("pushl %%ebx"           \
+           "cpuid"                 \
+           "movl %%ebx,%1"         \
+           "popl %%ebx"            \
            : "=a" (eax),           \
-             "=b" (ebx),           \
+             "=r" (ebx),           \
              "=c" (ecx),           \
              "=d" (edx)            \
            : "0" (op))
@@ -113,6 +116,7 @@
            "popl %0\n\t"
            "popfl"
            : "=a" (eax),
+            "=b" (ebx),
              "=c" (ecx)
            :
            : "cc");
Comment 11 Brandon Hale (RETIRED) gentoo-dev 2004-07-16 03:36:11 UTC
The patch "provided" was against a prerelease of gimp 2.0, not your
particular code. It was meant as a reference point, not a fix.
Comment 12 Brandon Hale (RETIRED) gentoo-dev 2004-07-16 13:30:47 UTC
Since you are missing my subtle hinting here with "references" for you to
help you help yourself, I'll lay the next steps out for you. First, test with -DPIC as the gimp devels promote. If this gives you some resolution, good deal, report that here. Otherwise, please reopen the upstream ticket, as the fix appears
to have been reverted.

Thanks.
Comment 13 Seth Robertson 2004-07-24 22:22:55 UTC
Compiling with:

CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -DPIC" emerge gimp

(my normal CFLAGS plus -DPIC) allows a successful emerge.  Thank you for the information you provided.
Comment 14 Brandon Hale (RETIRED) gentoo-dev 2004-07-25 14:23:04 UTC
Great, I'll look into adding this to Portage somehow (perhaps append-flags)
in the future. Thanks for testing.
Comment 15 Dominik Stadler (RETIRED) gentoo-dev 2004-08-06 02:21:01 UTC
*** Bug 54724 has been marked as a duplicate of this bug. ***
Comment 16 foser (RETIRED) gentoo-dev 2004-08-29 07:27:01 UTC
i believe this got fixed in 2.0.4, can someone who had the problem confirm ?
Comment 17 foser (RETIRED) gentoo-dev 2004-08-29 07:30:58 UTC
*** Bug 55389 has been marked as a duplicate of this bug. ***
Comment 18 foser (RETIRED) gentoo-dev 2004-08-29 07:31:04 UTC
*** Bug 47177 has been marked as a duplicate of this bug. ***
Comment 19 solar (RETIRED) gentoo-dev 2004-08-29 14:27:19 UTC
Re comment #16

Confirmed working with a hardened toolchain which emits fPIC by default.

media-gfx/gimp-2.0.4  +X +aalib -altivec -debug -doc -gimpprint +gtkhtml +jpeg -mmx -mng +png +python -sse -svg +tiff -wmf

file `which gimp-2.0`
/usr/bin/gimp-2.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), stripped
Comment 20 foser (RETIRED) gentoo-dev 2004-08-31 07:26:52 UTC
good enough for me, closing.

@ CC-ed arches, I suggest you also mark 2.0.4 stable on your arch to avoid possible problems.
Comment 21 Seth Robertson 2004-09-01 21:13:14 UTC
This is not fixed for me (original submitter).  Using hardened gcc, I still get an error (actually two), even if it is slightly different:

star seth> gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/specs
Configured with: /var/tmp/portage/gcc-3.3.4-r1/work/gcc-3.3.4/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/info --enable-shared --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++ --enable-threads=posix --enable-long-long --disable-checking --disable-libunwind-exceptions --enable-cstdio=stdio --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext --disable-multilib --enable-__cxa_atexit --enable-clocale=generic
Thread model: posix
gcc version 3.3.4 20040623 (Gentoo Hardened Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)

if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../app -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include -DG_LOG_DOMAIN=\"Gimp-Composite\"  -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE  -O2 -march=pentium3 -fomit-frame-pointer -Wall -MT gimp-composite-mmx.o -MD -MP -MF ".deps/gimp-composite-mmx.Tpo" \
  -c -o gimp-composite-mmx.o `test -f 'gimp-composite-mmx.c' || echo './'`gimp-composite-mmx.c; \
then mv -f ".deps/gimp-composite-mmx.Tpo" ".deps/gimp-composite-mmx.Po"; \
else rm -f ".deps/gimp-composite-mmx.Tpo"; exit 1; \
fi
gimp-composite-mmx.c: In function `gimp_composite_scale_rgba8_rgba8_rgba8_mmx':
gimp-composite-mmx.c:1006: internal compiler error: asm clobber conflict with input operand
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../app -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include -DG_LOG_DOMAIN=\"Gimp-Composite\"  -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE  -O2 -march=pentium3 -fomit-frame-pointer -Wall -MT gimp-composite-sse.o -MD -MP -MF ".deps/gimp-composite-sse.Tpo" \
  -c -o gimp-composite-sse.o `test -f 'gimp-composite-sse.c' || echo './'`gimp-composite-sse.c; \
then mv -f ".deps/gimp-composite-sse.Tpo" ".deps/gimp-composite-sse.Po"; \
else rm -f ".deps/gimp-composite-sse.Tpo"; exit 1; \
fi
Preprocessed source stored into /var/tmp/portage/gimp-2.0.4/temp/cccbQARf.out file, please attach this to your bugreport.
make[3]: *** [gimp-composite-mmx.o] Error 1
make[3]: *** Waiting for unfinished jobs....
gimp-composite-sse.c: In function `gimp_composite_burn_rgba8_rgba8_rgba8_sse':
gimp-composite-sse.c:227: error: can't find a register in class `GENERAL_REGS' while reloading `asm'
gimp-composite-sse.c:281: error: can't find a register in class `GENERAL_REGS' while reloading `asm'
gimp-composite-sse.c: At top level:
gimp-composite-sse.c:884: warning: `sse_op_overlay' defined but not used
make[3]: *** [gimp-composite-sse.o] Error 1
make[3]: Leaving directory `/n/startide/proj/st/tmp/portage/gimp-2.0.4/work/gimp-2.0.4/app/composite'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/n/startide/proj/st/tmp/portage/gimp-2.0.4/work/gimp-2.0.4/app'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/n/startide/proj/st/tmp/portage/gimp-2.0.4/work/gimp-2.0.4'
make: *** [all] Error 2

!!! ERROR: media-gfx/gimp-2.0.4 failed.
!!! Function src_compile, Line 97, Exitcode 2
!!! (no error message)

star seth> emerge info
Portage 2.0.50-r10 (default-x86-2004.0, gcc-3.3.4, glibc-2.3.3.20040420-r1, 2.6.8-gentoo-r3)
=================================================================
System uname: 2.6.8-gentoo-r3 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://gentoo.mirrored.ca/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow X aalib acpi alsa apache2 apm arts audiofile avi berkdb caps cdr crypt cscope cups curl dga directfb emacs encode esd ethereal fdftk flac foomaticdb gd gdbm gif gmp gnome gphoto2 gpm gtk gtk2 hardened imagemagick imlib java joystick jpeg kde lcms ldap lesstif libg++ libwww mad mbox mikmod mmx motif mozilla mpeg mysql ncurses nls nocardbus nocd oggvorbis opengl oss pam pdflib perl plotutils png postgres ppds prelude python qt quicktime readline samba sdl slang snmp socks5 speex spell sse ssl svga tcltk tcpd tetex theora tiff truetype unicode usb videos wmf x86 xinerama xml xml2 xmms xosd xv zlib"


Comment 22 Brandon Hale (RETIRED) gentoo-dev 2004-09-02 15:03:01 UTC
This is a second bug with USE=mmx enabled.
Comment 23 Seth Robertson 2004-09-02 21:03:47 UTC
USE="-mmx" indeed fixed the problem.  I would suggest fixing the ebuild so that users do not have to figure this out by themselves (as indeed was suggested in other tickets related to this problem.

However, thanks for resolving the hardened gcc problem.
Comment 24 solar (RETIRED) gentoo-dev 2004-09-02 22:22:12 UTC
This bug is not really fixed per say. We only confirmed the fPIC problem is resolved thus far. USE="-mmx" and maybe USE="-sse" is still required for the
-fstack-protector-all flag that is colliding with the mmx code.

Way I understand things and what I think I have learned about the root of the 
problem is we get the asm clobber with GENERAL_REGS when we have to many inline 
__asm__ instructions in a row and then put ssp ontop of it which adds a few 
more instructions to some inline MACRO(?) max. This may be fixable by simply 
breaking up the single __asm__ statement into two or more sections. (untested)

So at bare min I would hope this ebuild would bail in the src_unpack() function 
under these conditions till such a time as a secure and cleaner work around 
exists.

pseudo example.
((is-flag-fstack-protector-all || is-flag -fstack-protector|| use hardened) \
 && use mmx) && \
 die "USE=\"mmx\" is not compatible with the options you have for $PN  at this time. Try USE=-mmx emerge $PN"
Comment 25 Henrik Brix Andersen 2004-09-05 04:54:04 UTC
Could someone using hardened Gentoo please see if this problem is fixed by the patch attached to bug #62489 comment #8 and USE="mmx sse"?
Comment 26 solar (RETIRED) gentoo-dev 2004-09-17 23:54:26 UTC
Not a toolchain bug and not a hardened bug. 
This is a gimp bug reassigning bug to gentoo gimp maintainers.
Comment 27 Pieter Van den Abeele (RETIRED) gentoo-dev 2004-09-22 15:46:56 UTC
comment #20: ppc stable
Comment 28 Alexander Gabert (RETIRED) gentoo-dev 2004-10-07 02:27:36 UTC
not a toolchain bug and not a gimp bug.
so maybe a hardened bug.

looking at it now for STABLE and UNSTABLE
Comment 29 Alexander Gabert (RETIRED) gentoo-dev 2004-10-08 05:29:25 UTC
14:18:19 <@pappy->  # file $(which gimp-2.0) 
14:18:19 <@pappy-> /usr/bin/gimp-2.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), stripped
14:18:31 -!- dragonheart [~dragonhea@ppp37-184.lns1.adl1.internode.on.net] has joined #gentoo-hardened
14:19:06 <@pappy-> [ebuild   R   ] media-gfx/gimp-2.0.4  -aalib -altivec -debug -doc -gimpprint -jpeg -mmx -mng +png +python -sse -svg -tiff 
                   -wmf  9,178 kB [1]
14:19:09 <@pappy-> WORKSFORME
14:29:30 <@pappy-> gcc version 3.4.2  (Gentoo Hardened Linux 3.4.2-r2, ssp-3.4.1-1, pie-8.7.6.5)
Comment 30 solar (RETIRED) gentoo-dev 2004-10-08 09:52:28 UTC
pappy you did not test with +mmx or +sse as brix requested.
Can you try that please?
Comment 31 Jocelyn Mayer 2004-10-10 22:01:43 UTC
Same error when trying to merge watchdog-5.2 with hardened gcc-3.3.4:
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include    -march=pentium3 -O2 -pipe -fexpensive-optimizations -c quotactl.c
quotactl.c: In function `quotactl':
quotactl.c:41: error: can't find a register in class `BREG' while reloading `asm'
make[1]: *** [quotactl.o] Error 1

Tried to use CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -DPIC" but it didn't solve the problem:
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include    -O2 -march=pentium3 -fomit-frame-pointer -DPIC -c quotactl.c
quotactl.c: In function `quotactl':
quotactl.c:41: error: can't find a register in class `BREG' while reloading `asm

There's no mmx nor sse here, just a syscall definition:
#include <linux/unistd.h>

_syscall4(int, quotactl, int, cmd, const char *, special, int, id, caddr_t, addr
);

I'll attach my emerge --info output
Comment 32 Jocelyn Mayer 2004-10-10 22:03:43 UTC
Created attachment 41503 [details]
emerge --info output
Comment 33 Markus Rothe (RETIRED) gentoo-dev 2004-12-17 13:27:38 UTC
comment #20: ppc64 stable