Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 285097 - x11-libs/gtk+ gdk pixbuf loaders fail to build with some CFLAGS
Summary: x11-libs/gtk+ gdk pixbuf loaders fail to build with some CFLAGS
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-15 14:57 UTC by Alessandro Surace
Modified: 2013-05-01 05:07 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,12.81 KB, text/plain)
2009-09-15 14:58 UTC, Alessandro Surace
Details
emerge --info (emerge_info.txt,5.24 KB, text/plain)
2009-09-15 14:59 UTC, Alessandro Surace
Details
gdk-pixbuf-query-loaders output (gdk-pixbuf-query-loaders.out,4.24 KB, text/plain)
2009-09-16 09:38 UTC, Alessandro Surace
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Surace 2009-09-15 14:57:09 UTC
libgnomeui fail to build:
         /usr/bin/gdk-pixbuf-csource --raw --build-list $var > pixbufs-tmp && 
\
           cat ./copyright.txt pixbufs-tmp > gnome-stock-pixbufs.h
failed to load "./stock_attach.png": Couldn't recognize the image file format fo
r file './stock_attach.png'
make[4]: Leaving directory `/mnt/virtualfs/APPOGGIO/var_tmp/portage/gnome-base/l
ibgnomeui-2.24.1/work/libgnomeui-2.24.1/libgnomeui/pixmaps'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/mnt/virtualfs/APPOGGIO/var_tmp/portage/gnome-base/l
ibgnomeui-2.24.1/work/libgnomeui-2.24.1/libgnomeui'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/mnt/virtualfs/APPOGGIO/var_tmp/portage/gnome-base/l
ibgnomeui-2.24.1/work/libgnomeui-2.24.1/libgnomeui'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/virtualfs/APPOGGIO/var_tmp/portage/gnome-base/l
ibgnomeui-2.24.1/work/libgnomeui-2.24.1'
make: *** [all] Error 2



Reproducible: Always




I've tried the command /usr/bin/gdk-pixbuf-csource on another system, the same image and gt+-2.12.12 and recognize the image correctly while my version gtk+-2.16.5-r1 it doesn't.
Comment 1 Alessandro Surace 2009-09-15 14:58:46 UTC
Created attachment 204200 [details]
build.log
Comment 2 Alessandro Surace 2009-09-15 14:59:01 UTC
Created attachment 204201 [details]
emerge --info
Comment 3 Romain Perier (RETIRED) gentoo-dev 2009-09-15 17:31:07 UTC
A user had exactly the same problem (on IRC), could you paste the output of the following command ? :

$ gdk-pixbuf-query-loaders
Comment 4 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-09-15 23:06:12 UTC
please rebuild glib/gtk+ with CFLAGS="-O2 -march=nocona" and try libgnomeui again.
Comment 5 Alessandro Surace 2009-09-16 09:38:42 UTC
Created attachment 204297 [details]
gdk-pixbuf-query-loaders output
Comment 6 Alessandro Surace 2009-09-16 09:53:26 UTC
With this CFLAGS It builds!

Can you explain why?
How can I solve this permanently?

Thanks
(In reply to comment #4)
> please rebuild glib/gtk+ with CFLAGS="-O2 -march=nocona" and try libgnomeui
> again.
> 

Comment 7 Alessandro Surace 2009-09-16 10:04:58 UTC
So is something in my original CFLAGS:
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer -mmmx -msse -msse2 -mno-tls
-direct-seg-refs"

but what!!!
Could be better to put directly the core2 arch?

(In reply to comment #6)
> With this CFLAGS It builds!
> 
> Can you explain why?
> How can I solve this permanently?
> 
> Thanks
> (In reply to comment #4)
> > please rebuild glib/gtk+ with CFLAGS="-O2 -march=nocona" and try libgnomeui
> > again.
> > 
> 

Comment 8 Rémi Cardona (RETIRED) gentoo-dev 2009-09-16 10:45:35 UTC
Just stick with -march -O2 and -pipe. That's just more than enough to get decent optimizations out of gcc.

The others are either useless (-march enables mmx, see and other flags) or dangerous if you don't know what they do.

Thanks
Comment 9 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-09-16 11:41:13 UTC
The -mno-tls-direct-seg-refs is most likely the source of your problem as the rest should already be enabled by march if properly set to your cpu arch.
Comment 10 Alessandro Surace 2009-09-18 09:56:24 UTC
Thanks to everyone.

(In reply to comment #9)
> The -mno-tls-direct-seg-refs is most likely the source of your problem as the
> rest should already be enabled by march if properly set to your cpu arch.
> 

Comment 11 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-09-18 11:47:03 UTC
re-opening for toolchain
Comment 12 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-09-18 11:48:50 UTC
hi toolchain, this bug was also closed a bit quickly but it might be of interest to you. It seems the -mno-tls-direct-seg-refs isn't playing nice here.
Comment 13 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-09-18 11:50:37 UTC
updating summary to reflect the actual cause of the failure.
Comment 14 wbrana 2009-10-10 22:26:51 UTC
I'm getting error "Couldn't recognize the image file format"
when I try to display png image with pqiv as non-root.
It works as root.

Portage 2.1.6.13 (default/linux/amd64/2008.0/desktop, gcc-4.3.4, glibc-2.10.1-r0, 2.6.31.3-2 x86_64)
=================================================================
System uname: Linux-2.6.31.3-2-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-1.12.11.1
Timestamp of tree: Sat, 10 Oct 2009 01:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p33
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.6.3, 3.1.1-r1
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    2.1
sys-devel/autoconf:  2.63-r1
sys-devel/automake:  1.9.6-r2, 1.10.2, 1.11
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.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -fomit-frame-pointer"
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/X11/xkb /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer"
DISTDIR="/mnt/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv webrsync-gpg"
LDFLAGS="-Wl,-O1 -s -Wl,--hash-style=both"
LINGUAS="en"
MAKEOPTS="-j 4"
PKGDIR="/cache/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="-z"
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="/cache"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="32bit 386 7zip X a52 aac accessibility acl acpi adns aiglx alsa amd64 ao apm asf avi bash-completion berkdb bitmap-fonts branding bzip2 cairo cdr chm cli cracklib crypt css customlog dbus dri dts dv dvdr dvdread emboss emerald encode epoll evo faad ffmpeg fftw firefox flac ftp gdbm gif glibc-omitfp glitz glx gpm graphviz gs gtk2 gzip hddtemp iconv iostats ipv6 ithreads java6 jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility kqemu lame lcms libg++ libwww live lm_sensors logrotate lzma lzo mad matroska md5sum mikmod mmx mmxext modules moznocompose moznoirc moznomail mp3 mp4 mpeg mplayer mudflap multilib ncurses network nodrm nptl nptlonly nsplugin nvidia ogg oggvorbis openal opengl openmp pam pch pcre pdf pdflib png ppds pppd qt qt3support qt4 quicktime readline reflection rtc sdl session slang sndfile spell spl sql sqlite sqlite3 srt sse sse2 ssl ssse3 startup-notification stream svg symlink sysfs theora threads threadsafe thunar tiff unicode usb v4l v4l2 vdpau vorbis webkit x264 xcb xcomposite xft xml xml2 xorg xrandr xv xvid zlib" ALSA_CARDS="virtuoso" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 15 wbrana 2009-10-17 12:50:19 UTC
It seems that bug "Couldn't recognize the image file format" 
appeared on my PC after upgrade from glibc-2.9_p20081201-r2 to glibc 2.10.1
I can't verify it as downgrade of glibc doesn't work.
I tried to recompile gtk with gcc 3.4.6 which didn't help.
I don't use CFLAGS like -mno-tls-direct-seg-refs
Comment 16 wbrana 2009-10-17 15:06:32 UTC
Deleting directories /home/$USER/.local solved breakage of GTK apps on my system.
Comment 17 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-10-17 15:13:06 UTC
(In reply to comment #16)
> Deleting directories /home/$USER/.local solved breakage of GTK apps on my
> system.
> 

that was bug #288312
Comment 18 Ryan Hill (RETIRED) gentoo-dev 2013-05-01 05:07:17 UTC
I'll assume user-error on this one.