I just tried to compile gdmodule in a prefix: * Building of dev-python/gdmodule-0.56 with CPython 2.6... python2.6 setup.py build -b build-2.6 WARNING: Missing png, ttf Libraries running build running build_py creating build-2.6 creating build-2.6/lib.linux-i686-2.6 copying gd.py -> build-2.6/lib.linux-i686-2.6 warning: build_py: byte-compiling is disabled, skipping. running build_ext building '_gd' extension creating build-2.6/temp.linux-i686-2.6 i686-pc-linux-gnu-gcc -pthread -march=native -O2 -pipe -fPIC -DHAVE_LIBGD -DHAVE_LIBJPEG -DHAVE_LIBGIF -DHAVE_LIBZ -DHAVE_LIBX11 -DHAVE_LIBXPM -DHAVE_LIBFREETYPE -I/usr/include -I/usr/include/X11 -I/temp/gentoo/usr/include/python2.6 -c _gdmodule.c -o build-2.6/temp.linux-i686-2.6/_gdmodule.o _gdmodule.c: In function 'image_string16': _gdmodule.c:1008: warning: passing argument 5 of 'gdImageString16' from incompatible pointer type _gdmodule.c: In function 'image_stringup16': _gdmodule.c:1037: warning: passing argument 5 of 'gdImageStringUp16' from incompatible pointer type i686-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -march=native -O2 -pipe build-2.6/temp.linux-i686-2.6/_gdmodule.o -L/usr/local/lib -L/usr/lib -L/usr/lib/X11 -L/temp/gentoo/usr/lib -lgd -ljpeg -lgif -lz -lX11 -lXpm -lfreetype -lpython2.6 -o build-2.6/lib.linux-i686-2.6/_gd.so /temp/gentoo/usr/lib/gcc/i686-pc-linux-gnu/4.2.4/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lgif collect2: ld returned 1 exit status error: command 'i686-pc-linux-gnu-gcc' failed with exit status 1 This problem is solved when giflib is present, thus gdmodule should DEPEND on it. Reproducible: Always Steps to Reproduce: Portage 2.2.01.17168-prefix (prefix/linux/x86, gcc-4.2.4, unavailable, 2.6.26-2-686 i686) ================================================================= System uname: Linux-2.6.26-2-686-i686-Intel-R-_Core-TM-_i5_CPU_750_@_2.67GHz-with-debian-5.0.6 Timestamp of tree: Wed, 24 Nov 2010 09:42:23 +0000 app-shells/bash: 4.1_p7 dev-lang/python: 2.6.6-r1::sage-on-gentoo sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.11.1 sys-devel/binutils: 2.20.51.0.11 sys-devel/gcc: 4.2.4-r01.2, 4.4.5 sys-devel/gcc-config: 1.4.1-r00.2 sys-devel/libtool: 2.4 sys-devel/make: 3.82 virtual/os-headers: 2.6.36.1 (sys-kernel/linux-headers) Repositories: gentoo_prefix sage-on-gentoo sage-on-prefix ACCEPT_KEYWORDS="~x86-linux" ACCEPT_LICENSE="* -@EULA" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/portage /etc/terminfo" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/temp/gentoo/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs collision-protect distlocks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j5" PKGDIR="/temp/gentoo/usr/portage/packages" PORTAGE_CONFIGROOT="/temp/gentoo/" 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="/temp/gentoo/var/tmp" PORTDIR="/temp/gentoo/usr/portage" PORTDIR_OVERLAY="/home/cschwan/sage-on-gentoo /home/cschwan/sage-on-prefix" SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix" USE="berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 modules mudflap ncurses nls nptl nptlonly openmp pcre perl pppd prefix python readline session ssl sysfs tcpd unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 cgi cgid 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
I think it is not that easy. For me, although I have all image libs installed it only gets linked to libgd.so.2,libpython2.6.so.1.0,libpthread.so.0,libc.so.6. Please take a look into the Setup.py and figure out how to fix the automatic depson the libs listed there. Do we need to link against them?
+*gdmodule-0.56-r1 (25 Nov 2010) + + 25 Nov 2010; Justin Lecher <jlec@gentoo.org> +files/0.56-libs.patch, + +gdmodule-0.56-r1.ebuild: + Do not link against uneeded libs, #346751, thanks cschwan for reporting +