Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 84272 - inkscape unstable when using -O3 cflag on opteron
Summary: inkscape unstable when using -O3 cflag on opteron
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: AMD64 Linux
: High critical (vote)
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-06 00:40 UTC by Andrew Whalan
Modified: 2007-02-08 02:19 UTC (History)
3 users (show)

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 Andrew Whalan 2005-03-06 00:40:54 UTC
Using -O3 in CFLAGS on opteron (and from memory my centrino laptop too) causes peculiar behaviours and general instability in inkscape. My CFLAGS were "-march=opteron -O3 -pipe -funroll-loops -fomit-frame-pointer"


Reproducible: Always
Steps to Reproduce:
1. Edit make.conf to use CFLAGS="-march=opteron -O3 -pipe -funroll-loops -fomit-frame-pointer"
2. emerge inkscape
3. run inkscape and do some simple drawing, open files etc

Actual Results:  
Random lockups and segfaults, drawing objects not moving as intended by mouse
movement.

Expected Results:  
Drawing objects move with mouse, scaled appropriately etc.

It seems -O3 (or one of the other optiosn noted) is an unstable cflag, perhaps
x86_64 specific?

Portage 2.0.51.19 (default-linux/amd64/2004.3, gcc-3.4.3,
glibc-2.3.4.20041102-r0, 2.6.9-gentoo-r14-omni x86_64)
=================================================================
System uname: 2.6.9-gentoo-r14-omni x86_64 AMD Opteron(tm) Processor 246
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb  9 2005, 22:33:33)]
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.8.5-r3, 1.6.3, 1.7.9-r1, 1.4_p6, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-march=opteron -O3 -pipe -funroll-loops -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/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/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=opteron -O3 -pipe -funroll-loops -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X aac acl acpi aim alsa apache2 apm arts artswrappersuid audiofile
avi bash-completion berkdb bidi bitmap-fonts bonobo bzlib canna cdparanoia cdr
cjk crypt cscope ctype cups curl curlwrappers divx4linux dmx doc dvd dvdr
dvdread encode esd ethereal evo exif f77 fam fbcon fftw flac font-server
foomaticdb fortran ftp gd gif gimpprint gnome gnutls gphoto2 gpm graphviz
gstreamer gtk gtk2 gtkhtml icq imagemagick imap imlib ipv6 jabber jack
jack-tmpfs java jp2 jpeg jpeg2k junit ladcca lcms libwww live lzw lzw-tiff mad
maildir matroska mbox mikmod mime mmap mng mozdevelop mozilla mozsvg mozxmlterm
mp3 mpeg mpi msn multilib nas ncurses network nls nptl nvidia offensive
oggvorbis openal opengl oscar oss pam pcntl pcre pdflib perl php pic pie
plotutils png posix povray python qt quicktime readline rtc samba sasl sdl
session shared sharedmem slang smp sndfile sockets sox speex spell spl sqlite
svg sysvipc tcltk tcpd tetex tga theora tidy tiff tokenizer truetype
truetype-fonts type1-fonts unicode usb userlocales v v4l v4l2 vhosts videos wifi
wmf wxwindows xanim xchatdccserver xchattext xface xine xinerama xml xml2 xmlrpc
xmms xosd xpm xprint xrandr xscreensaver xsl xv xvid xvmc yv12 zeo zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Comment 1 foser (RETIRED) gentoo-dev 2005-03-06 07:00:27 UTC
let bugwranglers do the assignment
Comment 2 Scott Robert Ladd 2005-08-03 06:16:28 UTC
(In reply to comment #0)

> It seems -O3 (or one of the other optiosn noted) is an unstable cflag, perhaps
> x86_64 specific?

As someone who has worked on GCC itself, I *strongly* recommend against using
-O3 and -funroll-loops as default CFLAGS. They work for the majority of
applications, but not all. In a significant number of cases, -O2 produces
*faster* code than -O3. See my article at:

http://www.coyotegulch.com/products/acovea/aco5k8gcc40.html

Which I suppose means I should put in another plug for package-specific flags... ;)
Comment 3 R Stephan 2006-07-04 00:22:27 UTC
using -O3 is simply not recommended for normal use by the gcc documentation. proposed to be closed.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2007-02-07 03:18:13 UTC
(In reply to comment #3)
> using -O3 is simply not recommended for normal use by the gcc documentation.
> proposed to be closed.

Good idea. What version of inkscape was this anyway? I can't imagine it is still a problem now.
Comment 5 Andrew Whalan 2007-02-08 02:19:06 UTC
The reason I reported this is I've seen many apps report that they filter cflags. I thought that by reporting this, inkscape could have forcefully -O3 filtered out on compile.

I've personally given up on gentoo, but filtering cflags that are known to be unstable for some apps that may work for others would help the overall quality of a gentoo install.