Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 65009 - GD library needs flag filtering
Summary: GD library needs flag filtering
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords:
: 65007 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-09-22 12:35 UTC by Marcin Wojtczuk
Modified: 2004-09-24 11:46 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 Marcin Wojtczuk 2004-09-22 12:35:45 UTC
GD 2.0.28 won't build when new -fvisibility=hidden feature of GCC 3.4. is used.

Reproducible: Always
Steps to Reproduce:
1. CFLAGS=$CFLAGS -fvisibility=hidden
2. emerge gd

Actual Results:  
Build crashed with linking failure:
gcc -march=athlon-xp -O2 -s -pipe -fomit-frame-pointer -fvisibility=hidden
-DNDEBUG -DG_DISABLE_ASSERT -Wl,-rpath -Wl,/usr/lib -o .libs/annotate annotate.o
 -L/usr/lib -L/usr/X11R6/lib ./.libs/libgd.so /usr/lib/libjpeg.so
/usr/lib/libfreetype.so -lpng12 -lz -lm
gdparttopng.o(.text+0x114): In function `main':
: undefined reference to `gdImageCreateFromGd2Part'
gdparttopng.o(.text+0x155): In function `main':
: undefined reference to `gdImagePng'
gdparttopng.o(.text+0x165): In function `main':
: undefined reference to `gdImageDestroy'
gdparttopng.o(.text+0x211): In function `main':
: undefined reference to `gdImageDestroy'
collect2: ld returned 1 exit status
make[2]: *** [gdparttopng] Error 1
make[2]: *** Waiting for unfinished jobs....
annotate.o(.text+0x98): In function `main':
: undefined reference to `gdImageCreateFromJpeg'
annotate.o(.text+0x1f2): In function `main':
: undefined reference to `gdImageStringFT'
annotate.o(.text+0x258): In function `main':
: undefined reference to `gdImageStringFT'
annotate.o(.text+0x2d9): In function `main':
: undefined reference to `gdImageJpeg'
annotate.o(.text+0x2e7): In function `main':
: undefined reference to `gdImageDestroy'
collect2: ld returned 1 exit status
make[2]: *** [annotate] Error 1
make[2]: Leaving directory `/tmp/portage/portage/gd-2.0.28/work/gd-2.0.28'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/portage/portage/gd-2.0.28/work/gd-2.0.28'
make: *** [all] Error 2


Expected Results:  
Guess :)

Portage 2.0.51_rc1 (default-x86-1.4, gcc-3.4.2, glibc-2.3.3_pre20040207-r0,
2.4.25 i686)
=================================================================
System uname: 2.4.25 i686 AMD Athlon(tm) XP
Gentoo Base System version 1.4.6
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
Binutils: sys-devel/binutils-2.14.90.0.6-r7
Headers:  sys-kernel/linux-headers-2.4.19
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS=" -march=athlon-xp -O2 -s -pipe -fomit-frame-pointer -fvisibility=hidden
-DNDEBUG -DG_DISABLE_ASSERT"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /etc/tomcat /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.1/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS=" -march=athlon-xp -Os -s -pipe -fomit-frame-pointer -ffast-math
-fno-rtti -fno-exceptions -fno-common -fvisibility=hidden -DNDEBUG"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/
ftp://ftp.fu-berlin.de/unix/linux/mirrors/gentoo/
http://sunsite.rediris.es/mirror/gentoo/
ftp://ftp.mirror.ac.uk/sites/www.ibiblio.org/gentoo/
ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://sunsite.dk/mirrors/gentoo/
http://filepile.tiscali.de/mirror/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/tmp/portage/"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.pl/gentoo-portage"
USE="3dnow alsa apm avi berkdb bitmap-fonts bonobo cdr crypt dga foomaticdb gd
gdbm ggi gif guile imlib java jpeg justify libg++ libwww mad mbox mikmod mmx
mozilla mpeg ncurses oggvorbis opengl oss pdflib png python quicktime readline
sdl slang spell sse ssl tcltk tcpd tetex truetype x86 xmms xprint xv zlib"
Comment 1 Marcin Wojtczuk 2004-09-22 12:37:37 UTC
emerging sys-devel/binutils-2.15.90.0.1.1-r3 didn't improve the situation. This must be a problem with gd-library.

Of course inherit flag-o-matic + filter-flags -fvisibility=hidden in .ebuild solves this problem somehow.
Comment 2 Marcin Wojtczuk 2004-09-22 12:38:49 UTC
*** Bug 65007 has been marked as a duplicate of this bug. ***
Comment 3 Marcin Wojtczuk 2004-09-24 11:46:17 UTC
I'm closing this bug because -fno-common is the cause of libraries non-linking.