Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 51209 - RMagick-1.5.0 uses wrong CFLAGS
Summary: RMagick-1.5.0 uses wrong CFLAGS
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High minor
Assignee: Tom Payne (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-16 08:07 UTC by Andreas Schwarz
Modified: 2004-05-31 05:22 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schwarz 2004-05-16 08:07:25 UTC
When I emerge RMagick-1.5.0, it uses the compiler flags "-march=athlon-xp -O3 -pipe -fomit-frame-pointer" instead of the flags specified in /etc/make.conf.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




example command line:
gcc -fPIC -std=c99 -Wall -march=athlon-xp -O3 -pipe -fomit-frame-pointer -Wall  
-I. -I/usr/lib/ruby/1.8/i686-linux-gnu -I/usr/lib/ruby/1.8/i686-linux-gnu -I/tmp
/RMagick-1.5.0/ext/RMagick  -DRUBY_VERSION=0x181 -I/usr/include/freetype2 -D_FIL
E_OFFSET_BITS=64 -D_REENTRANT -I/usr/X11R6/include -I/usr/include/libxml2 -c rmi
nfo.c

my /etc/make.conf:
CFLAGS="-march=athlon-xp -mfpmath=sse -msse -mmmx -m3dnow -pipe
-fomit-frame-pointer -O2"
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2004-05-16 21:24:36 UTC
half your flags are useless, as it is.  -mmmx -m3dnow are implied by -march=athlon-xp

also, the mfmpath nonsense is just trouble.  We filter it out in half our ebuilds.
Comment 2 Tom Payne (RETIRED) gentoo-dev 2004-05-31 03:47:34 UTC
The troublesome flags are stripped out. This is a feature, not a bug :-)
Comment 3 Andreas Schwarz 2004-05-31 03:52:03 UTC
It is a bug. When I set my CFLAGS to "-march=i386 -Os", it still uses the following to compile:

gcc -fPIC -Wall -march=athlon-xp -O3 -pipe -fomit-frame-pointer -Wall ...
Comment 4 Tom Payne (RETIRED) gentoo-dev 2004-05-31 03:55:29 UTC
Hmm, it works for me. Please tell me the output of emerge --info.
Comment 5 Andreas Schwarz 2004-05-31 03:57:27 UTC
Portage 2.0.50-r7 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.7-rc1)
=================================================================
System uname: 2.6.7-rc1 i686 AMD Athlon(tm) XP 2000+
Gentoo Base System version 1.4.10
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.57-r1
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=i386 -Os"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
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/share/config /usr/share/confi
g /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /var/
qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=i386 -Os"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo/ ftp://ftp.tu-claus
thal.de/pub/linux/gentoo/ ftp://gd.tuwien.ac.at/opsys/linux/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X aalib acpi alsa apache2 apm avi berkdb bonobo cdr crypt cscope cups
 dga dvd dvdr emacs encode fbcon foomaticdb gdbm gif gimpprint gphoto2 gpm gtk g
tk2 gtkhtml guile imap imlib innodb java jpeg libg++ libwww lufsusermount mad ma
ildir matroska mikmod mmx motif mozilla mpeg mysql ncurses nls nptl oggvorbis op
engl oss pam pdflib perl png python qt quicktime readline ruby samba scanner sdl
 slang socks5 spell sqlite sse ssl stencil-buffer svg svga tcltk tcpd tetex theo
ra tiff truetype usb wmf x86 xface xinerama xml2 xmms xv zlib"
Comment 6 Tom Payne (RETIRED) gentoo-dev 2004-05-31 04:17:00 UTC
OK, further investigation shows that RMagick uses the same CFLAGS as were used to compile ImageMagick.

Please tell me the output of:
    cat /var/db/pkg/media-gfx/imagemagick-*/CFLAGS
and:
    Magick-config --cflags
The first is whatever CFLAGS were set to when you compiled ImageMagick, the second is whatever ImageMagick actually used (it might have added/removed some flags).

If you've changed CFLAGS between emergeing imagemagick and rmagick you'll have to re-emerge imagemagick to take advantage of your new CFLAGS, i.e. do:
    emerge --oneshot imagemagick rmagick
Hopefully this will fix your problem.

Note: I presume that the RMagick developer has good reasons for using the same CFLAGS as ImageMagick, probably to ensure binary compatibility between RMagick and ImageMagick (RMagick needs to inspect & modify ImageMagick's structures). I'd rather not change RMagick to use portage's CFLAGS unless you can give me a convincing argument otherwise!

Cheers,

Tom
Comment 7 Andreas Schwarz 2004-05-31 05:19:23 UTC
andreas@d700:andreas$ cat /var/db/pkg/media-gfx/imagemagick-*/CFLAGS
-march=athlon-xp -O3 -pipe -fomit-frame-pointer
andreas@d700:andreas$ Magick-config --cflags
-march=athlon-xp -O3 -pipe -fomit-frame-pointer -Wall

Ok, then this "bug" is not really a problem.
Comment 8 Tom Payne (RETIRED) gentoo-dev 2004-05-31 05:22:59 UTC
Cool. Glad it's resolved.