Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 154022 - media-sound/amarok-1.4.4 fails to build against libgpod-0.4 with -Wl,--as-needed because of false-negative ./configure checks
Summary: media-sound/amarok-1.4.4 fails to build against libgpod-0.4 with -Wl,--as-nee...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Diego Elio Pettenò (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: as-needed
  Show dependency tree
 
Reported: 2006-11-04 05:12 UTC by Matěj Laitl
Modified: 2006-11-19 08:04 UTC (History)
2 users (show)

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 Matěj Laitl 2006-11-04 05:12:17 UTC
Title pretty announced it - so steps to reproduce:
1. Add -Wl,--as-needed to LDFLAGS
2. emerge >=libgpod-0.4
3. emerge >=amarok-1.4.4 USE="ipod"

First strange thing is the ./configure output:
checking for pkg-config... /usr/bin/pkg-config
checking for libgpod-1.0... yes
checking LIBGPOD_CFLAGS... -I/usr/include/gpod-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
checking LIBGPOD_LIBS... -lgpod -lglib-2.0
yes
checking for itdb_track_set_thumbnails... no
checking for itdb_get_mountpoint... no
checking for itdb_device_get_ipod_info... no
checking for struct _Itdb_Track.movie_flag... yes
checking for struct _Itdb_Track.skip_when_shuffling... yes
checking for struct _Itdb_Track.mark_unplayed... yes
checking for statvfs... yes

Note that all itdb_* functions are present in libgpod, and should be "yes". If I emerge it without -Wl,--as-needed, they are "yes", which is the correct behaviour.

The build then fails with following error:
Making all in ipod
make[5]: Entering directory `/var/tmp/portage/amarok-1.4.4/work/amarok-1.4.4/amarok/src/mediadevice/ipod'
/usr/qt/3/bin/moc ./ipodmediadevice.h -o ipodmediadevice.moc
/bin/sh ../../../../libtool --silent --tag=CXX --mode=compile i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../../amarok/src -I../../../../amarok/src -I../../../../amarok/src/amarokcore -I../../../../amarok/src/amarokcore -I../../../../amarok/src/engine -I../../../../amarok/src/engine -I../../../../amarok/src/mediadevice -I/usr/include/gpod-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include/taglib -I/usr/kde/3.5/include -I/usr/qt/3/include -I.  -I/usr/kde/3.5/include  -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -O2 -march=pentium3 -pipe -fomit-frame-pointer -fno-inline -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions
-fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -c -o ipodmediadevice.lo ipodmediadevice.cpp
ipodmediadevice.cpp: In member function 'QString IpodMediaDevice::realPath(const char*)':
ipodmediadevice.cpp:1492: error: 'struct _Itdb_iTunesDB' has no member named 'mountpoint'
ipodmediadevice.cpp: In member function 'QString IpodMediaDevice::ipodPath(const QString&)':
ipodmediadevice.cpp:1504: error: 'struct _Itdb_iTunesDB' has no member named 'mountpoint'
make[5]: *** [ipodmediadevice.lo] Error 1
make[5]: Leaving directory `/var/tmp/portage/amarok-1.4.4/work/amarok-1.4.4/amarok/src/mediadevice/ipod'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/var/tmp/portage/amarok-1.4.4/work/amarok-1.4.4/amarok/src/mediadevice'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/amarok-1.4.4/work/amarok-1.4.4/amarok/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/amarok-1.4.4/work/amarok-1.4.4/amarok'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/amarok-1.4.4/work/amarok-1.4.4'
make: *** [all] Error 2

!!! ERROR: media-sound/amarok-1.4.4 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  amarok-1.4.4.ebuild, line 74:   Called kde_src_compile
  kde.eclass, line 172:   Called kde_src_compile 'all'
  kde.eclass, line 342:   Called kde_src_compile 'myconf' 'configure' 'make'
  kde.eclass, line 338:   Called die

!!! died running emake, kde_src_compile:make


It's because of _Itdb_iTunesDB's member "mountpoint" has been moved to separate function itdb_get_mountpoint() in libgpod-0.4 - which is not detected by configure.

Note that if I manually edit configure.h after ./configure and before compilation (CTRL-z; nano configure.h; fg), amarok WILL build and work with -Wl,--as-needed (tested with my iPod)

I tried to fix it with --as-needed guide http://www.gentoo.org/proj/en/qa/asneeded.xml but I'm not autotools expert. :(

WORKAROUND:
a) remove --as-needed from LDFLAGS
OR
b) stop make after ./configure (CTRL-Z)
   edit config.h - uncomment and #define to 1 all HAVE_ITDB_* lines
   resume build (fg)
   this way it will build with --as-needed enabled

FIX:
patch some autools scripts, so the ./configure would be --as-needed aware

Is that a mainstream bug? If i should file a bugreport on bugs.kde.org
Comment 1 Matěj Laitl 2006-11-04 05:16:32 UTC
Oh i forgot emerge --info. Here it is:
Portage 2.1.1-r1 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.4-r3, 2.6.17-gentoo-r8 i686)
=================================================================
System uname: 2.6.17-gentoo-r8 i686 Pentium III (Coppermine)
Gentoo Base System version 1.12.5
Last Sync: Tue, 31 Oct 2006 22:00:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -pipe -fomit-frame-pointer"
CHOST="i686-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"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=pentium3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict userpriv"
GENTOO_MIRRORS="ftp://gentoo.inode.at/source/ ftp://gd.tuwien.ac.at/opsys/linux/gentoo/ ftp://ftp.sh.cvut.cz/MIRRORS/gentoo/gentoo"
LANG="cs_CZ.utf8"
LC_ALL="cs_CZ.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="cs en_GB"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X a52 aac aalib acl acpi alsa ao arts asf automount berkdb bitmap-fonts bluetooth bzip2 cdparanoia cdr cli cpudetection cracklib crypt cups dbus dlloader dri dts dvd dvdr dvdread eds elibc_glibc emboss fam fbcon firefox fortran gd gdbm gif gimpprint glibc-omitfp gpm gtk iconv icq input_devices_keyboard input_devices_mouse ipod irc irda isdnlog java javascript jpeg kde kdehiddenvisibility kernel_linux libg++ linguas_cs linguas_en_GB logrotate mad mikmod mmap mmx mozilla mp3 mpeg msn musicbrainz ncurses network nls no-old-linux noamazon nowebdav nptl nptlonly nsplugin ogg opengl optimisememory pam pcmcia pcre perl png pppd python qt qt3 quicktime rdesktop readline reflection rtc samba session slang spl sse ssl svg theora threads tiff toolbar truetype truetype-fonts type1-fonts udev unicode userland_GNU userlocales utempter video_cards_savage video_cards_vesa vorbis win32codecs x264 xine xml xorg xosd xprint xv xvid zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-11-04 05:23:00 UTC
The problem is that they are not strictly under libgpod. I know of this bug and I'll try to fix ASAP but I cannot right now. Upstream should already be aware of this problem.
Comment 3 Kim Nilsson 2006-11-12 02:49:54 UTC
# emerge --info
Portage 2.1.2_rc1-r6 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.4-r4, 2.6.18-gentoo-r1 i686)
=================================================================
System uname: 2.6.18-gentoo-r1 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.12.6
Last Sync: Sun, 12 Nov 2006 05:20:01 +0000
ccache version 2.3 [disabled]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.3.6, 2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/splash /etc/terminfo"
CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.du.se/pub/os/gentoo http://ds.thn.htu.se/linux/gentoo http://mirror.gentoo.no/ http://gentoo.osuosl.org/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://ftp.gtlib.gatech.edu/pub/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ ftp://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.tds.net/gentoo ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/ ftp://mirror.datapipe.net/gentoo http://mirror.uni-c.dk/pub/gentoo/ http://trumpetti.atm.tut.fi/gentoo/ http://ftp.club-internet.fr/pub/mirrors/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://pandemonium.tiscali.de/pub/gentoo/ ftp://files.gentoo.org ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://mirrors.blueyonder.co.uk/mirrors/gentoo ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://ftp.planetmirror.com/pub/gentoo/ ftp://mirror.pacific.net.au/linux/Gentoo ftp://mirror.isp.net.au/pub/gentoo/ "
LANG="sv_SE.UTF-8"
LC_ALL="en_US"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -s"
LINGUAS="sv_SE sv en en_GB en_US da"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/gentoo-webapps-overlay/experimental /usr/local/gentoo-webapps-overlay/production-ready /usr/local/gentoo-general-overlay /usr/local/gentoo-webapps-overlay/experimental /usr/local/gentoo-webapps-overlay/production-ready /usr/local/gentoo-general-overlay"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 7zip X a52 acpi alsa bcmath berkdb bitmap-fonts bzlib cairo cdr cli cracklib crypt cups dbus dlloader dri dvd dvdr eds elibc_glibc emboss encode fam ffmpeg firefox flac fortran ftp gdbm gif gnome gnutls gpm gstreamer gtk hal iconv input_devices_keyboard input_devices_mouse ipv6 isdnlog jpeg jpeg2k kde kernel_linux ldap libg++ linguas_da linguas_en linguas_en_GB linguas_en_US linguas_sv linguas_sv_SE lzo mad mikmod mmx mp3 mpeg ncurses network nls nptl nptlonly nsplugin opengl oss pam pcre perl png ppds pppd python qt qt3 qt4 quicktime readline reflection samba sdl session spell spl sse sse2 ssl tcpd theora truetype truetype-fonts type1-fonts udev unicode userland_GNU video_cards_nvidia win32codecs xinerama xml xml2 xorg xv zlib"
Unset:  CTARGET, INSTALL_MASK, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Kim Nilsson 2006-11-12 02:51:54 UTC
(In reply to comment #3)
sorry, this shouldn't be here - bugzilla played a trick on me and changed the bug #
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-11-19 08:04:15 UTC
Thanks to Timothy, this is fixed now both in tree and upstream.