Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 62489 - when update gimp to 2.0.4 version with +mmx flag I get a error on compile.
Summary: when update gimp to 2.0.4 version with +mmx flag I get a error on compile.
Status: RESOLVED FIXED
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:
Depends on:
Blocks:
 
Reported: 2004-09-01 03:08 UTC by Sergey
Modified: 2005-05-16 06:34 UTC (History)
2 users (show)

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


Attachments
Patch againt gimp-2.0.4.ebuild to add -DPIC when using -fPIC (gimp-2.0.4-DPIC.patch,448 bytes, patch)
2004-09-04 02:21 UTC, Henrik Brix Andersen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey 2004-09-01 03:08:38 UTC
When i doing emerge -u world on gimp update my applications is stoped with error.
I see what when gimp is compile happen a error in file:
....
gimp-composite-mmx.c:145: error: can`t find a register in class `GENERAL_REGS` while reloading `asm`
gimp-composite-mmx.c:199: error: can`t find a register in class `GENERAL_REGS` while reloading `asm`
...

for the experiment I reruning emerge -u gimp by next command:

USE="-mmx" emerge -u gimp

..and the gimp is updated in my system.

later i attempt reemerge gimp with mmx option. but error happen again..

PS: sorry for bad english.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Henrik Brix Andersen 2004-09-01 14:08:37 UTC
You wouldn't happen to be running hardened gentoo, would you?

Looks like a duplicate of bug #47177.
Comment 2 Sergey 2004-09-02 00:28:29 UTC
No.. that my "emerge --info"

Gentoo Base System version 1.5.3
Portage 2.0.50-r10 (default-x86-2004.0, gcc-3.3.4, glibc-2.3.4.20040808-r0, 2.4.25-gentoo-r1)
=================================================================
System uname: 2.4.25-gentoo-r1 i686 Pentium II (Deschutes)
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -fPIC -mcpu=pentium2 -fomit-frame-pointer"
CHOST="i386-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.3/share/config:/usr/kde/3.3/env:/usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -fPIC -mcpu=pentium2 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X apm arts avi berkdb cdr crypt cups dga directfb divx4linux dvd encode esd fbcon foomaticdb gdbm ggi gif gnome gpm gtk gtk2 imlib java jpeg kde ldap libg++ libwww mad mikmod mmx motif mozilla mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl pic png python qt quicktime readline sdl slang spell sse ssl svga tcltk tcpd truetype x86 xml2 xmms xv xvid zlib"

Comment 3 Henrik Brix Andersen 2004-09-02 02:04:55 UTC
Try removing -fPIC from your CFLAGS.
Comment 4 Henrik Brix Andersen 2004-09-02 02:06:15 UTC
If the above works please try using CFLAGS="-DPIC -fPIC ...".
Comment 5 Target 2004-09-02 08:14:28 UTC
Same problem here, though I am using hardened.

I don't actually have fPIC in my CFLAGS, but I know hardened adds it... So I tried adding -DPIC to the flags and the compile went off without a hitch. Perhaps the ebuild should add -DPIC if it detects -fPIC?
Comment 6 Sergey 2004-09-02 23:15:56 UTC
I try emerge with removing "-FPIC" and additing "-DPIC -fPIC" flag.
In both versions emerge complete successfully. But if i right thing
this job must be done by emerge, not by my hand?
Comment 7 Henrik Brix Andersen 2004-09-04 01:49:15 UTC
The GIMP ebuilds should be modified to add -DPIC to CFLAGS if it detects -fPIC - and hardened should be modified to automatically add -DPIC when it adds -fPIC.
Comment 8 Henrik Brix Andersen 2004-09-04 02:21:59 UTC
Created attachment 38882 [details, diff]
Patch againt gimp-2.0.4.ebuild to add -DPIC when using -fPIC
Comment 9 Henrik Brix Andersen 2004-09-05 02:37:59 UTC
Could someone running hardened please test the above patch with USE="mmx sse"?
Comment 10 David Oberlitner 2004-09-06 21:52:00 UTC
After applying the ebuild patch from comment #8:

emerge -v gimp              # Failed
USE="-mmx" emerge -v gimp   # Succeeded
emerge -pv gimp             # Default use flags

[ebuild  N    ] media-gfx/gimp-2.0.4  -aalib -altivec -debug -debug -doc -gimpprint -jpeg +mmx -mng -png +python +sse -svg -tiff -wmf  9,178 kB

Comment 11 solar (RETIRED) gentoo-dev 2004-09-08 22:47:20 UTC
In the case of testing pic.

(is-flags -fPIC || is-flag -pic || is-iflag -fPIE || is-flag -fpie)
As we can see this can get messy really quick.
perhaps this is an eaiser solution that will never fail that could be functioned.
echo | gcc ${CFLAGS} -dM -E - | grep -i __pic__ > /dev/null  && echo -DPIC
Comment 12 Ole Tange 2004-09-17 13:58:23 UTC
I can confirm #10 From David Oberlitner. My emerge info:

Portage 2.0.50-r11 (default-x86-1.4, gcc-3.3.4, glibc-2.3.3.20040420-r1, 2.4.20-wolk4.0s-pre9)
=================================================================
System uname: 2.4.20-wolk4.0s-pre9 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz
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 -mcpu=i686 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /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/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo/ http://csociety-ftp.ecn.purdue.edu/pub/gentoo/ rsync://gentoo.seren.com/gentoo ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X X509 aac aalib apm arts artswrappersuid avi berkdb bitmap-fonts bonobo bzlib cdparanoia cdr chroot clamav crypt cups curl debug directfb drac dvb dvd dvdr dvdread encode erandom esd f77 ffmpeg fftw flac flash foomaticdb freetype gcj gd gd-external gdbm ggi gif gmp gnome gphoto2 gpm gs gtk gtk2 gtkhtml guile hardened hardenedphp ieee1394 imagemagick imap imlib innodb ipv6 irda irmc jabber java jbig jpeg kde ldap libg++ libwww lirc live lufsusermount lzo lzw lzw-tiff mad makecheck matroska mcal mdb memlimit mikmod mldonkeypango mmx mmx2 mng mnogosearch monkey mono motif mozilla mozp3p mozsvg mozxmlterm mpeg mpeg4 mplayer msdav msn mssql mysql mythtv nagios-dns nagios-ntp nagios-ping nagios-ssh nas ncurses network neural nls oav oggvorbis ooo-kde opengl oss pam pcap pcre pda pdflib perl pg-hier pg-vacuumdelay pic pie plotutils png postgres pwdb python qt quicktime radeon readline rtc ruby sasl scanner sdl skey slang snmp sox speex spell sse sse2 ssl svg svga tcltk tcpd tetex theora tidy tiff transcode truetype type1 usb v4l v4l2 vhosts virus-scan vnc wifi wmf x86 xfs xml2 xmms xprint xv xvid zlib"

Comment 13 John N. Laliberte (RETIRED) gentoo-dev 2005-05-10 10:59:26 UTC
does this still happen with 2.2.6-r1 ?
Comment 14 John N. Laliberte (RETIRED) gentoo-dev 2005-05-16 05:54:37 UTC
no response from reporter, should be fixed in 2.2.6.
Comment 15 François MASSON 2005-05-16 06:34:49 UTC
Sorry for replying late.
No more problem with gimp-2.2.6-r1 for me.