Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 128547 - media-gfx/gimp-2.2.10 doesn't compile with GCC 4.1 when USE="mmx" is set.
Summary: media-gfx/gimp-2.2.10 doesn't compile with GCC 4.1 when USE="mmx" is set.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: John N. Laliberte (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 117482
  Show dependency tree
 
Reported: 2006-04-02 11:38 UTC by Samuli Suominen (RETIRED)
Modified: 2006-04-23 02:25 UTC (History)
3 users (show)

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


Attachments
Buildlog. (5413-gimp-2.2.10.log,237.04 KB, text/plain)
2006-04-02 11:39 UTC, Samuli Suominen (RETIRED)
Details
append-flags "-fomit-frame-pointer" (gimp-2.2.10-build-with-gcc-4.1.patch,424 bytes, patch)
2006-04-02 12:39 UTC, Samuli Suominen (RETIRED)
Details | Diff
gimp-composite-sse-mmx-vs-gcc41.patch (gimp-composite-sse-mmx-vs-gcc41.patch,6.39 KB, patch)
2006-04-13 18:57 UTC, Ryan Hill (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Samuli Suominen (RETIRED) gentoo-dev 2006-04-02 11:38:47 UTC
Doesn't build with GCC 4.1 when USE="mmx" is set.

[ebuild   R   ] media-gfx/gimp-2.2.10  USE="aalib gimpprint jpeg mmx* png python sse svg tiff -debug -doc -gtkhtml -hardened -lcms -mng -smp -wmf" 0 kB

Portage 2.1_pre7-r3 (default-linux/x86/2006.0, gcc-4.1.0, glibc-2.4-r1, 2.6.16-gentoo i686)
=================================================================
System uname: 2.6.16-gentoo i686 AMD Athlon(tm) XP 2200+
Gentoo Base System version 1.12.0_pre16
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2-r1
sys-apps/sandbox:    1.2.17
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-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/"
LANG="en_US.utf8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://trumpetti.atm.tut.fi/gentoo-portage"
USE="x86 3dnow 3dnowext X a52 aac aalib alsa apm asf avi bash-completion berkdb bitmap-fonts bzip2 cairo cdparanoia cli compositor crypt ctype cups dba dbus dri dts dvd dvdread emboss encode expat fastbuild ffmpeg firefox flac foomaticdb force-cgi-redirect fortran ftp gd gdbm gif gimpprint glitz glut gphoto2 gstreamer gtk gtk2 hal imagemagick imlib insecure-savers ipv6 isdnlog jpeg libcaca libg++ libwww mad matroska memlimit mikmod mmx mmxext motif mp3 mpeg mplayer ncurses nls nptl nptlonly offensive ogg opengl oss pam pcre pdf pdflib perl pic png posix ppds pppd python quicktime readline rtc sdl session simplexml soap sockets speex spl sse ssl startup-notification svg tcpd theora tiff tokenizer truetype truetype-fonts type1-fonts udev unicode userlocales v4l vidix vorbis win32codecs xanim xml xml2 xscreensaver xsl xv xvid zlib elibc_glibc input_devices_keyboard input_devices_evdev kernel_linux userland_GNU video_cards_ati"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LC_ALL, LDFLAGS, LINGUAS
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2006-04-02 11:39:26 UTC
Created attachment 83735 [details]
Buildlog.
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2006-04-02 11:39:55 UTC
if i686-pc-linux-gnu-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\"  -DGIMP_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE -mmmx -march=athlon-xp -O3 -pipe -Wall -MT libcompositemmx_a-gimp-composite-mmx.o -MD -MP -MF ".deps/libcompositemmx_a-gimp-composite-mmx.Tpo" -c -o libcompositemmx_a-gimp-composite-mmx.o `test -f 'gimp-composite-mmx.c' || echo './'`gimp-composite-mmx.c; \
then mv -f ".deps/libcompositemmx_a-gimp-composite-mmx.Tpo" ".deps/libcompositemmx_a-gimp-composite-mmx.Po"; else rm -f ".deps/libcompositemmx_a-gimp-composite-mmx.Tpo"; exit 1; fi
if i686-pc-linux-gnu-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\"  -DGIMP_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE -mmmx -msse -march=athlon-xp -O3 -pipe -Wall -MT libcompositesse_a-gimp-composite-sse.o -MD -MP -MF ".deps/libcompositesse_a-gimp-composite-sse.Tpo" -c -o libcompositesse_a-gimp-composite-sse.o `test -f 'gimp-composite-sse.c' || echo './'`gimp-composite-sse.c; \
then mv -f ".deps/libcompositesse_a-gimp-composite-sse.Tpo" ".deps/libcompositesse_a-gimp-composite-sse.Po"; else rm -f ".deps/libcompositesse_a-gimp-composite-sse.Tpo"; exit 1; fi
gimp-composite-sse.c: In function 
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2006-04-02 11:39:55 UTC
if i686-pc-linux-gnu-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\"  -DGIMP_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE -mmmx -march=athlon-xp -O3 -pipe -Wall -MT libcompositemmx_a-gimp-composite-mmx.o -MD -MP -MF ".deps/libcompositemmx_a-gimp-composite-mmx.Tpo" -c -o libcompositemmx_a-gimp-composite-mmx.o `test -f 'gimp-composite-mmx.c' || echo './'`gimp-composite-mmx.c; \
then mv -f ".deps/libcompositemmx_a-gimp-composite-mmx.Tpo" ".deps/libcompositemmx_a-gimp-composite-mmx.Po"; else rm -f ".deps/libcompositemmx_a-gimp-composite-mmx.Tpo"; exit 1; fi
if i686-pc-linux-gnu-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\"  -DGIMP_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE -mmmx -msse -march=athlon-xp -O3 -pipe -Wall -MT libcompositesse_a-gimp-composite-sse.o -MD -MP -MF ".deps/libcompositesse_a-gimp-composite-sse.Tpo" -c -o libcompositesse_a-gimp-composite-sse.o `test -f 'gimp-composite-sse.c' || echo './'`gimp-composite-sse.c; \
then mv -f ".deps/libcompositesse_a-gimp-composite-sse.Tpo" ".deps/libcompositesse_a-gimp-composite-sse.Po"; else rm -f ".deps/libcompositesse_a-gimp-composite-sse.Tpo"; exit 1; fi
gimp-composite-sse.c: In function gimp_composite_burn_rgba8_rgba8_rgba8_sse:
gimp-composite-sse.c:127: error: can't find a register in class GENERAL_REGS while reloading asm
make[3]: *** [libcompositesse_a-gimp-composite-sse.o] Error 1
make[3]: *** Waiting for unfinished jobs....
gimp-composite-mmx.c:834: warning: mmx_op_overlay defined but not used
gimp-composite-mmx.c: In function gimp_composite_burn_rgba8_rgba8_rgba8_mmx:
gimp-composite-mmx.c:148: error: can't find a register in class GENERAL_REGS while reloading asm
make[3]: *** [libcompositemmx_a-gimp-composite-mmx.o] Error 1
make[3]: Leaving directory `/var/tmp/portage/gimp-2.2.10/work/gimp-2.2.10/app/composite'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/gimp-2.2.10/work/gimp-2.2.10/app'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/gimp-2.2.10/work/gimp-2.2.10'
make: *** [all] Error 2
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2006-04-02 11:52:32 UTC
btw, same with CFLAGS="-march=athlon-xp -pipe -O2"
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2006-04-02 12:10:04 UTC
confirming.

root /var/tmp/portage/gimp-2.2.10/work/gimp-2.2.10/app/composite # i686-pc-linux-gnu-gcc -I. -I../.. -I../../app -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include -mmmx -msse -O2 -march=prescott -pipe -Wall -c gimp-composite-sse.c
gimp-composite-sse.c: In function 'gimp_composite_burn_rgba8_rgba8_rgba8_sse':
gimp-composite-sse.c:127: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'

goes away w/ -fomit-frame-pointer.
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2006-04-02 12:39:01 UTC
Created attachment 83748 [details, diff]
append-flags "-fomit-frame-pointer"

Adds append-flags "-fomit-frame-pointer" using flag-o-matic.eclass to gimp-2.2.10.ebuild to free a register, to fix building with GCC 4.1. Not a solution, but a temporary fix.
Comment 7 Mark Loeser (RETIRED) gentoo-dev 2006-04-10 07:02:22 UTC
Not a toolchain problem.

It would be nice if we could get a patch so that -fomit-frame-pointer wasn't necessary, but either way would work for me.
Comment 8 Henrik Brix Andersen 2006-04-11 09:13:20 UTC
Could you please test media-gfx/gimp-9999 to see if this problem was fixed in upstream CVS?
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2006-04-11 11:07:04 UTC
(In reply to comment #7)
> Could you please test media-gfx/gimp-9999 to see if this problem was fixed in
> upstream CVS?

Was going to do that, but unluckily this happened,

make  install-data-hook
make[3]: Entering directory `/var/tmp/portage/gimp-9999/work/gimp/docs'
cd /var/tmp/portage/gimp-9999/image//usr/share/man/man1; \
rm -f gimp-console-2.3.1; \
ln -s gimp-2.3.1 gimp-console-2.3.1
make[3]: Leaving directory `/var/tmp/portage/gimp-9999/work/gimp/docs'
make[2]: Leaving directory `/var/tmp/portage/gimp-9999/work/gimp/docs'
make[1]: Leaving directory `/var/tmp/portage/gimp-9999/work/gimp/docs'
make[1]: Entering directory `/var/tmp/portage/gimp-9999/work/gimp'
make[2]: Entering directory `/var/tmp/portage/gimp-9999/work/gimp'
test -z "/usr/bin" || mkdir -p -- "/var/tmp/portage/gimp-9999/image//usr/bin"
 /bin/install -c 'gimptool-2.0' '/var/tmp/portage/gimp-9999/image//usr/bin/gimptool-2.0'
test -z "/usr/lib/pkgconfig" || mkdir -p -- "/var/tmp/portage/gimp-9999/image//usr/lib/pkgconfig"
 /bin/install -c -m 644 'gimp-2.0.pc' '/var/tmp/portage/gimp-9999/image//usr/lib/pkgconfig/gimp-2.0.pc'
 /bin/install -c -m 644 'gimpthumb-2.0.pc' '/var/tmp/portage/gimp-9999/image//usr/lib/pkgconfig/gimpthumb-2.0.pc'
 /bin/install -c -m 644 'gimpui-2.0.pc' '/var/tmp/portage/gimp-9999/image//usr/lib/pkgconfig/gimpui-2.0.pc'
make[2]: Leaving directory `/var/tmp/portage/gimp-9999/work/gimp'
make[1]: Leaving directory `/var/tmp/portage/gimp-9999/work/gimp'
>>> Completed installing gimp-9999 into /var/tmp/portage/gimp-9999/image/

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/var/log/sandbox/sandbox-media-gfx_-_gimp-9999-559.log"

open_wr:   /usr/share/icons/hicolor
--------------------------------------------------------------------------------
unaffiliated portage # 
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2006-04-11 11:08:49 UTC
(In reply to comment #7)
> Could you please test media-gfx/gimp-9999 to see if this problem was fixed in
> upstream CVS?
> 

Arg, nevermind about my previous post because first of all it compiled okay but I had -fomit-frame-pointer in appends.

So.. let me try again to build without -fomit-frame-pointer.

(But that sandbox error should be fixed too :))
Comment 11 Samuli Suominen (RETIRED) gentoo-dev 2006-04-11 12:04:07 UTC
(In reply to comment #7)
> Could you please test media-gfx/gimp-9999 to see if this problem was fixed in
> upstream CVS?

OK, seems like upstream has fixed this. It compiles with CFLAGS="-march=athlon-xp -O3 -pipe", without -fomit-frame-pointer, and with USE="mmx".

Comment 12 Henrik Brix Andersen 2006-04-11 12:12:32 UTC
(In reply to comment #8)
> open_wr:   /usr/share/icons/hicolor

Yes, this is covered in bug #129281 - currently looking into it.

(In reply to comment #10)
> OK, seems like upstream has fixed this. It compiles with
> CFLAGS="-march=athlon-xp -O3 -pipe", without -fomit-frame-pointer, and with
> USE="mmx".

Good. I suggest we append -fomit-frame-pointer in the 2.2.x ebuilds for now (unless someone wants to track down and backport the fix from 2.3.x to 2.2.x?).
Comment 13 Samuli Suominen (RETIRED) gentoo-dev 2006-04-12 07:24:00 UTC
> Good. I suggest we append -fomit-frame-pointer in the 2.2.x ebuilds for now
> (unless someone wants to track down and backport the fix from 2.3.x to 2.2.x?).

I'm all for adding -fomit-frame-pointer, as it's relatively safe flag. But like this after thinking my patch again,

if useq mmx ; then
append-flags "-fomit-frame-pointer"
fi

? :)
Comment 14 Mark Loeser (RETIRED) gentoo-dev 2006-04-13 11:35:50 UTC
Adding the flag for the time being seems acceptable to me.
Comment 15 Ryan Hill (RETIRED) gentoo-dev 2006-04-13 18:51:00 UTC
it's fixed on head only because it's been commented out. ;)  patch pending.
Comment 16 Ryan Hill (RETIRED) gentoo-dev 2006-04-13 18:57:33 UTC
Created attachment 84599 [details, diff]
gimp-composite-sse-mmx-vs-gcc41.patch
Comment 17 Henrik Brix Andersen 2006-04-14 04:05:51 UTC
(In reply to comment #14)
> it's fixed on head only because it's been commented out. ;)  patch pending.

Please submit this upstream instead.
Comment 18 Henrik Brix Andersen 2006-04-14 05:07:18 UTC
allanonjl, will you add the -fomit-frame-pointer fix to the 2.2.10 ebuild?
Comment 19 Ryan Hill (RETIRED) gentoo-dev 2006-04-14 11:28:51 UTC
(In reply to comment #16)
> Please submit this upstream instead.

er, this is backported from upstream...
Comment 20 Henrik Brix Andersen 2006-04-14 11:33:12 UTC
(In reply to comment #18)
> (In reply to comment #16)
> > Please submit this upstream instead.
> 
> er, this is backported from upstream...

I misunderstood your previous comment then, sorry.

Comment 21 John N. Laliberte (RETIRED) gentoo-dev 2006-04-20 17:15:04 UTC
flag added in cvs.

thanks, sorry for the wait.
Comment 22 Samuli Suominen (RETIRED) gentoo-dev 2006-04-23 02:25:42 UTC
(In reply to comment #20)
> flag added in cvs.

Thanks.

..now my world almost builds with 4.1 :-)