Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 262190 - x11-libs/gtk+-2.14.7-r2: doesn't compile with "-Os" CFLAGS
Summary: x11-libs/gtk+-2.14.7-r2: doesn't compile with "-Os" CFLAGS
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-11 20:02 UTC by ernsteiswuerfel
Modified: 2009-05-23 13:12 UTC (History)
0 users

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


Attachments
build.log of x11-libs/gtk+-2.14.7-r2 (build.log,24.46 KB, text/plain)
2009-03-12 10:30 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2009-03-11 20:02:51 UTC
gtk+-2.14.7-r2 doesn't compile with "-Os" CFLAGS. As far I've tested all gtk+ versions above 2.14 exhibit this behaviour. This wasn'T the case with the 2.12 branch.

Workaround: Change gcc optimization level to "-O2", and gtk+ compiles again.

Reproducible: Always

Steps to Reproduce:
1. add -Os to your CFLAGS
2. emerge gtk+
3.

Actual Results:  
creating libpixops.la
(cd .libs && rm -f libpixops.la && ln -s ../libpixops.la libpixops.la)
/bin/sh ../../libtool --mode=link x86_64-pc-linux-gnu-gcc  -DGDK_PIXBUF_DISABLE_DEPRECATED  -pipe -mtune=k8-sse3 -march=k8-sse3 -O2 -Wall  -Wl,-O1 -Wl,-z,now -Wl,--sort-common -Wl,--as-needed -Wl,-S -o timescale  timescale.o libpixops.la -pthread -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0   -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lm 
x86_64-pc-linux-gnu-gcc -DGDK_PIXBUF_DISABLE_DEPRECATED -pipe -mtune=k8-sse3 -march=k8-sse3 -O2 -Wall -Wl,-O1 -Wl,-z -Wl,now -Wl,--sort-common -Wl,--as-needed -Wl,-S -o timescale timescale.o -pthread  ./.libs/libpixops.a /usr/lib64/libgthread-2.0.so -lpthread -lrt /usr/lib64/libgio-2.0.so /usr/lib64/libgobject-2.0.so /usr/lib64/libgmodule-2.0.so -ldl /usr/lib64/libglib-2.0.so -lm  
./.libs/libpixops.a: could not read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status
make[4]: *** [timescale] Error 1
make[4]: Leaving directory `/var/tmp/portage/x11-libs/gtk+-2.14.7-r2/work/gtk+-2.14.7/gdk-pixbuf/pixops'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/x11-libs/gtk+-2.14.7-r2/work/gtk+-2.14.7/gdk-pixbuf'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/x11-libs/gtk+-2.14.7-r2/work/gtk+-2.14.7/gdk-pixbuf'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/x11-libs/gtk+-2.14.7-r2/work/gtk+-2.14.7'
make: *** [all] Error 2
Comment 1 Daniel Gryniewicz (RETIRED) gentoo-dev 2009-03-12 02:50:34 UTC
Upstream (and therefore the gnome herd) doesn't support anything other than -O2.  We already strip -O3.

Gnome: should we strip -Os too?  Or maybe strip all -O and force -O2?
Comment 2 Rémi Cardona (RETIRED) gentoo-dev 2009-03-12 08:38:01 UTC
(In reply to comment #1)
> Gnome: should we strip -Os too?  Or maybe strip all -O and force -O2?

For gtk and glib, forcing -O2 sounds sensible.
Comment 3 ernsteiswuerfel archtester 2009-03-12 09:52:10 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Gnome: should we strip -Os too?  Or maybe strip all -O and force -O2?
> 
> For gtk and glib, forcing -O2 sounds sensible.
> 

It makes sense at least for the 2.14 branch.

2.12 seems fine with -Os and what 2.16 brings - who knows? ;)
Comment 4 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-03-12 10:00:14 UTC
well looking at the error, it might not be related to -Os on gtk specifically. I would like to see more tests and an upstream bug if tests leads us to a real problem before considering blindly stripping -O level flags.

@reporter: please add emerge --info and full build.log.
Comment 5 ernsteiswuerfel archtester 2009-03-12 10:30:17 UTC
Created attachment 184789 [details]
build.log of x11-libs/gtk+-2.14.7-r2
Comment 6 ernsteiswuerfel archtester 2009-03-12 10:31:18 UTC
My emerge --info:

Portage 2.1.6.7 (default/linux/amd64/2008.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.28-gentoo-r3 x86_64)
=================================================================
System uname: Linux-2.6.28-gentoo-r3-x86_64-AMD_Athlon-tm-_Dual_Core_Processor_4850e-with-glibc2.2.5
Timestamp of tree: Wed, 11 Mar 2009 17:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.7
dev-lang/python:     2.5.2-r7
dev-python/pycrypto: 2.0.1-r8
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -Os -mtune=k8-sse3 -march=k8-sse3 -fomit-frame-pointer -fivopts -ftree-loop-im -ftree-loop-linear -minline-stringops-dynamically"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-pipe -Os -mtune=k8-sse3 -march=k8-sse3 -fomit-frame-pointer -fivopts -ftree-loop-im -ftree-loop-linear -minline-stringops-dynamically"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv"
GENTOO_MIRRORS="ftp://mirror.switch.ch/mirror/gentoo/ http://mirror.switch.ch/ftp/mirror/gentoo/ "
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,-S"
LINGUAS="de en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/sunrise"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acpi alsa amd64 amr audacious bash-completion berkdb bluetooth branding bzip2 cairo caps cdr cli cracklib crypt cups custom-cflags custom-cxxflags dbus djvu dri dts dvd dvdr dvdread dvi emboss enca encode evo exif fam firefox flac foomaticdb fortran gdbm gif gnome gnutls gstreamer gtk hal iconv ipv6 isdnlog ithreads java6 jbig joystick jpeg jpeg2k kerberos libnotify libsamplerate live lm_sensors lzma mad matroska midi mikmod mmap mmx mmxext mng mozsvg mp3 mp4 mpeg mudflap multilib musepack nas ncurses nls no-old-linux nptl nptlonly nsplugin ntfs ogg ogm opengl openmp pam pcre pdf perl png ppds pppd pulseaudio python qt3support quicktime readline reflection rle rtc schroedinger sdl session speex spell spl sse sse2 sse3 ssl startup-notification svg sysfs tcpd theora threads tiff tivo truetype unicode usb vorbis wavpack wmf x264 xml xmp xorg xulrunner xv xvid xvmc zlib zoran" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="fbdev radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 7 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-05-23 13:12:58 UTC
ftr, I just tried building gtk+-2.14.7-r2 with -Os on my ~amd64 system I have not seen this problem. I'll close needinfo because we are missing comparison points.

gtk+ built with:
CFLAGS="-Os -march=native -ftree-vectorize -pipe -g" emerge -1Bav =gtk+-2.14.7-r2

$ emerge --info
Portage 2.2_rc33 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.10.1-r0, 2.6.29-gentoo-r1 x86_64)
=================================================================
System uname: Linux-2.6.29-gentoo-r1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7500_@_2.20GHz-with-gentoo-2.0.0
Timestamp of tree: Sat, 23 May 2009 06:15:02 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p24
dev-lang/python:     2.6.2
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r2
sys-apps/sandbox:    1.9
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -ftree-vectorize -pipe -g"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=native -ftree-vectorize -pipe -g"
DISTDIR="/var/tmp/distfiles"
FEATURES="ccache distcc distlocks fixpackages multilib-strict parallel-fetch preserve-libs protect-owned sandbox sfperms sign splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ http://mirror.ovh.net/gentoo-distfiles/ ftp://mirror.ovh.net/gentoo-distfiles/"
LANG="fr_FR.UTF-8"
LC_ALL="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1,--as-needed,--hash-style=gnu"
LINGUAS="en fr ja zh zh_CN"
MAKEOPTS="-j4"
PKGDIR="/var/tmp/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/graaff /usr/local/portage/layman/gentopia /usr/local/portage/layman/voip /usr/local/portage/layman/sunrise /usr/local/portage/layman/desktop-effects /home/eva/devel/overlays/gentoo-misc /home/eva/devel/overlays/gnome"
SYNC="rsync://rsync.be.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 applet asyncns avahi avi bash-completion bluetooth bzip2 cairo cdr cjk cli consolekit cracklib crypt cups dbus dri dvd dvdr dvdread eds epiphany evo fam ffmpeg flac galago gedit glade glitz gmp gnome gnome-keyring gnutls gpm gstreamer hal iconv ipv6 isdnlog jpeg laptop ldap libnotify lirc mad matroska midi mmx mp3 mpeg mudflap multilib nautilus ncurses networkmanager nfs nls nntp nptl nptlonly nsplugin ntpl ogg openct opengl openmp pam pcre pdf perl png pppd python readline reflection session smp spell spl sse sse2 ssl ssse3 startup-notification svg sysfs tcpd theora threads unicode v4l v4l2 vim-syntax vorbis x264 xattr xcb xinerama xml xmp xorg xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="dav dav_fs authn_file auth_digest authz_groupfile authz_host dir mime" APACHE2_MPMS="event" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics evdev" KERNEL="linux" LINGUAS="en fr ja zh zh_CN" LIRC_DEVICES="macmini" USERLAND="GNU" VIDEO_CARDS="i810 intel vesa fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS