Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 211013 - configure error in dev-python/kaa-imlib2-0.2.1 due to missing USE="png" of media-libs/imlib2
Summary: configure error in dev-python/kaa-imlib2-0.2.1 due to missing USE="png" of me...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Robert Buchholz (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-21 18:43 UTC by Tobias Kral
Modified: 2008-08-16 16:12 UTC (History)
3 users (show)

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


Attachments
kaa-imlib2-remove-png-dep.patch (kaa-imlib2-remove-png-dep.patch,387 bytes, patch)
2008-07-12 00:00 UTC, René 'Necoro' Neumann
Details | Diff
kaa-imlib2-0.2.3.ebuild.diff (kaa-imlib2-0.2.3.ebuild.diff,703 bytes, patch)
2008-07-12 00:03 UTC, René 'Necoro' Neumann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Kral 2008-02-21 18:43:45 UTC
ebuild should check, if imlib2 is build with USE="png"

Reproducible: Always

Steps to Reproduce:
1. USE="-png" emerge -1 imlib2
2. emerge -1 kaa-imlib2
3.

Actual Results:  
>>> Emerging (1 of 5) dev-python/kaa-imlib2-0.2.1 to /
 * kaa-imlib2-0.2.1.tar.gz RMD160 SHA1 SHA256 size ;-) ...                                                                                                                                                    [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                                                                          [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                                                                         [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                                                                        [ ok ]
 * checking kaa-imlib2-0.2.1.tar.gz ;-) ...                                                                                                                                                                   [ ok ]
>>> Unpacking source...
>>> Unpacking kaa-imlib2-0.2.1.tar.gz to /var/tmp/portage/dev-python/kaa-imlib2-0.2.1/work
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/dev-python/kaa-imlib2-0.2.1/work/kaa-imlib2-0.2.1 ...
POSIX shared memory enabled
running build
running build_py
creating build
creating build/lib.linux-i586-2.4
creating build/lib.linux-i586-2.4/kaa
creating build/lib.linux-i586-2.4/kaa/imlib2
copying src/version.py -> build/lib.linux-i586-2.4/kaa/imlib2
copying src/image.py -> build/lib.linux-i586-2.4/kaa/imlib2
copying src/font.py -> build/lib.linux-i586-2.4/kaa/imlib2
copying src/__init__.py -> build/lib.linux-i586-2.4/kaa/imlib2
running build_ext
building 'kaa.imlib2._Imlib2module' extension
creating build/temp.linux-i586-2.4
creating build/temp.linux-i586-2.4/src
i486-pc-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -Os -march=k6-2 -pipe -fomit-frame-pointer -fPIC -I/usr/include/python2.4 -c src/imlib2.c -o build/temp.linux-i586-2.4/src/imlib2.o -Wall
i486-pc-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -Os -march=k6-2 -pipe -fomit-frame-pointer -fPIC -I/usr/include/python2.4 -c src/image.c -o build/temp.linux-i586-2.4/src/image.o -Wall
i486-pc-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -Os -march=k6-2 -pipe -fomit-frame-pointer -fPIC -I/usr/include/python2.4 -c src/font.c -o build/temp.linux-i586-2.4/src/font.o -Wall
i486-pc-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -Os -march=k6-2 -pipe -fomit-frame-pointer -fPIC -I/usr/include/python2.4 -c src/rawformats.c -o build/temp.linux-i586-2.4/src/rawformats.o -Wall
i486-pc-linux-gnu-gcc -pthread -shared -Os -march=k6-2 -pipe -fomit-frame-pointer build/temp.linux-i586-2.4/src/imlib2.o build/temp.linux-i586-2.4/src/image.o build/temp.linux-i586-2.4/src/font.o build/temp.linux-i586-2.4/src/rawformats.o -L/usr/lib -lpng -lrt -lImlib2 -lfreetype -lz -ldl -lm -o build/lib.linux-i586-2.4/kaa/imlib2/_Imlib2module.so
/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/../../../../i486-pc-linux-gnu/bin/ld: cannot find -lpng
collect2: ld returned 1 exit status
error: command 'i486-pc-linux-gnu-gcc' failed with exit status 1
 * 
 * ERROR: dev-python/kaa-imlib2-0.2.1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2278:  Called distutils_src_compile
 *             environment, line  642:  Called die
 * The specific snippet of code:
 *       ${python} setup.py build "$@" || die "compilation failed"
 *  The die message:
 *   compilation failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-python/kaa-imlib2-0.2.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-python/kaa-imlib2-0.2.1/temp/environment'.


I'm in the process of setting up a minimal system powered by freevo to play videos, so my USE-flag settings are very strict to avoid every not necessary dependency.

# emerge --info
Portage 2.1.4.4 (default-linux/x86/dev/2007.1, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo-r8 i586)
=================================================================
System uname: 2.6.23-gentoo-r8 i586 Geode(TM) Integrated Processor by AMD PCS
Timestamp of tree: Wed, 20 Feb 2008 23:00:01 +0000
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.8.5-r3, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i486-pc-linux-gnu"
CFLAGS="-Os -march=k6-2 -pipe -fomit-frame-pointer"
CHOST="i486-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-Os -march=k6-2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="berkdb bitmap-fonts cli cracklib cups dri fbcon fortran gdbm isdnlog midi mudflap ncurses nls nptl nptlonly openmp pam pcre pppd readline reflection session spl ssl truetype-fonts type1-fonts unicode x86 xorg" 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 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 evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Evil Compile Person 2008-04-05 20:46:52 UTC
Yarr, please fix :)
Comment 2 René 'Necoro' Neumann 2008-07-11 23:59:30 UTC
1.) Somebody has already done the proposed change ... (w/o leaving a comment in the Changelog though)

2.) I strongly vote against this change, because kaa-imlib2 is only a wrapper and has no special dependency on libpng. The "-lpng" it links against is completely useless: If you build with "-Wl,--as-needed" you get the following result even when including "-lpng":

ldd /usr/lib/python2.5/site-packages/kaa/imlib2/_Imlib2module.so           
	linux-gate.so.1 =>  (0xb7fbf000)
	librt.so.1 => /lib/librt.so.1 (0xb7f95000)
	libImlib2.so.1 => /usr/lib/libImlib2.so.1 (0xb7f2c000)
	libpython2.5.so.1.0 => /usr/lib/libpython2.5.so.1.0 (0xb7e17000)
	libpthread.so.0 => /lib/libpthread.so.0 (0xb7e00000)
	libc.so.6 => /lib/libc.so.6 (0xb7cd1000)
	/lib/ld-linux.so.2 (0x80000000)
	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7c51000)
	libz.so.1 => /lib/libz.so.1 (0xb7c3f000)
	libX11.so.6 => /usr/lib/libX11.so.6 (0xb7b59000)
	libXext.so.6 => /usr/lib/libXext.so.6 (0xb7b4c000)
	libdl.so.2 => /lib/libdl.so.2 (0xb7b48000)
	libm.so.6 => /lib/libm.so.6 (0xb7b22000)
	libutil.so.1 => /lib/libutil.so.1 (0xb7b1e000)
	libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb7b1b000)
	libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb7b02000)
	libXau.so.6 => /usr/lib/libXau.so.6 (0xb7aff000)
	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb7af9000)

So ... no libpng linked against :)
Also:
# pkg-config --libs imlib2
-lImlib2  

Again no special notion of the libpng ... so we can safely assume, that it is unneeded. And then we can drop the "check whether imlib2 was build with png support" - because there is no use in handling png in any other way than jpeg.
Comment 3 René 'Necoro' Neumann 2008-07-12 00:00:41 UTC
Created attachment 160160 [details, diff]
kaa-imlib2-remove-png-dep.patch

This patch removes the unnecessairy "png" lib dependency from setup.py
Comment 4 René 'Necoro' Neumann 2008-07-12 00:03:28 UTC
Created attachment 160161 [details, diff]
kaa-imlib2-0.2.3.ebuild.diff

And the patch for the ebuild :)
Comment 5 Robert Buchholz (RETIRED) gentoo-dev 2008-08-16 16:12:57 UTC
Applied your patch and sent it upstream, thanks a lot.