Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 239654 - x11-libs/agg fails with linker error from malformed command line
Summary: x11-libs/agg fails with linker error from malformed command line
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Stefan Schweizer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: libtool-2.2
  Show dependency tree
 
Reported: 2008-10-04 19:17 UTC by Mark Tiefenbruck
Modified: 2008-10-18 14:46 UTC (History)
7 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 Mark Tiefenbruck 2008-10-04 19:17:53 UTC
Trying to install x11-libs/agg results in the following:

/bin/sh ../../../libtool --tag=CXX   --mode=link i686-pc-linux-gnu-g++ -I../../../include  -march=athlon-xp -O2 -pipe -msse2 -ggdb -version-info 2:4:0  -L -Wl,--as-needed -Wl,-O1 -o libaggplatformX11.la -rpath /usr/lib libaggplatformX11_la-agg_platform_support.lo -lX11
libtool: link: require no space between `-L' and `-Wl,--as-needed'

The -Wl,--as-needed comes from my LDFLAGS, but the -L is the real problem. It comes from src/platform/X11/Makefile.am's -L@x_libraries@. Looking at the configure script, @x_libraries@ is empty on my system because -lX11 is all that's needed, which is quite normal as far as I'm aware. At any rate, I removed the -L@x_libraries@, and it compiles fine, but this obviously isn't the right fix.

Here's my emerge --info, in case it's needed:
Portage 2.2_rc11 (default-linux/x86/2007.0, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.25-gentoo-r8 i686)
=================================================================
System uname: Linux-2.6.25-gentoo-r8-i686-AMD_Athlon-tm-_64_X2_Dual-Core_Processor_TK-53-with-glibc2.0
Timestamp of tree: Sat, 04 Oct 2008 06:04:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r8
dev-util/ccache:     2.4-r8
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.26
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -msse2 -ggdb"
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/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -msse2 -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,--as-needed -Wl,-O1"
LINGUAS="en_US"
MAKEOPTS="-j3"
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="3dnow 3dnowext X a52 aac acl acpi alsa asf avi bash-completion berkdb cairo cdr cdrom cli cracklib crypt cups dbus dri dts dvd dvdr dvdread ffmpeg fortran gdbm gpm iconv imlib isdnlog ithreads javascript jpeg kdehiddenvisibility kdrive midi mmx mmxext mozdevelop mp3 mpeg mudflap nptl nptlonly nsplugin ogg opengl openmp pam pcmcia pcre pdf perl png pppd python quicktime readline real reflection sdk sdl session spell spl sse sse2 ssl tcpd tetex threads timidity unicode userlocales webdav win32codecs x86 xcomposite xinerama xorg xulrunner xv xvid 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 auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" FOO2ZJS_DEVICES="hp1020" INPUT_DEVICES="mouse keyboard synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US" USERLAND="GNU" VIDEO_CARDS="fglrx radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


Reproducible: Always
Comment 1 Alexander Huemer 2008-10-07 00:26:56 UTC
confirmed. same situation here.
unfortunately i don't have a better solution either.

emerge --info:

Portage 2.2_rc11 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.27-rc8-tip-blackbit-00520-g7b7413f-dirty x86_
64)
=================================================================
System uname: Linux-2.6.27-rc8-tip-blackbit-00520-g7b7413f-dirty-x86_64-Intel-R-_Xeon-R-_CPU_E5420_@_2.50GHz-with-glibc2.2.5
Timestamp of tree: Mon, 06 Oct 2008 22:00:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r8
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.3.0
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.26
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=nocona"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /e
tc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=nocona"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="C"
LDFLAGS=""
LINGUAS="en de"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=18
0 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl alsa amd64 amrnb amrwb bash-completion berkdb bl bzip2 cairo cddb cdio cli cracklib crypt cscope cups dbu
s dga directfb dri dts dv dvb dvd dvi enca encode fbcon ffmpeg flac fortran ftp fuse gcj gdbm ggi gif gnome gnutls gpm gs gstreame
r gtk guile hal hdri iconv isdnlog java java6 jbig jpeg jpeg2k lapack lcms libcaca live lzo mad md5sum midi mmx mmxext mozdevelop 
mp2 mp3 mpeg mudflap multilib musepack nautilus ncurses nemesi networking nls nptl nptlonly nsplugin objc objc++ objc-gc ogg opena
l openct openexr opengl openmp pam pcre perl png pnm pppd python qt3support qt4 quicktime radio rar readline reflection rtc sessio
n spl sse sse2 ssl ssse3 svg sysfs tcpd theora tiff truetype type1 unicode v4l v4l2 vim-syntax vorbis wma wmf x264 xcb xml xorg xu
lrunner xv xvid xvmc zlib zsh-completion" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens
1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="a
dpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi nul
l plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default auth
n_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir d
isk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rew
rite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics"
 KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" USERLAND="GNU"
 VIDEO_CARDS="xgi vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RS
YNC_EXTRA_OPTS
Comment 2 Ewan Marshall 2008-10-09 17:44:23 UTC
Same error and so it should check for file contents, not just file existing then...
Comment 3 Kent Fredric (IRC: kent\n) gentoo-dev 2008-10-12 09:14:45 UTC
make[3]: Entering directory `/tmp/portage/x11-libs-agg-2.5/work/agg-2.5/src/platform/X11'
/bin/sh ../../../libtool --tag=CXX   --mode=link x86_64-pc-linux-gnu-g++ -I../../../include  -march=native -mtune=native -O2 -pipe -version-info 2:4:0  -L  -o libaggplatformX11.la -rpath /usr/lib64 libaggplatformX11_la-agg_platform_support.lo -lX11 
libtool: link: require no space between `-L' and `-o'

--- src/platform/X11/Makefile 

lib_LTLIBRARIES = libaggplatformX11.la
libaggplatformX11_la_LDFLAGS = -version-info 2:4:0 -L
libaggplatformX11_la_SOURCES = agg_platform_support.cpp
libaggplatformX11_la_CXXFLAGS = -I$(top_srcdir)/include
libaggplatformX11_la_LIBADD = -lX11

Taking off the -L makes 'make' magically start work.

$ack "libaggplatformX11_la_LDFLAGS" --all

src/platform/X11/Makefile
62:     $(libaggplatformX11_la_LDFLAGS) $(LDFLAGS) -o $@
217:libaggplatformX11_la_LDFLAGS = -version-info 2:4:0  -L

src/platform/X11/Makefile.in
62:     $(libaggplatformX11_la_LDFLAGS) $(LDFLAGS) -o $@
217:@ENABLE_X11_TRUE@libaggplatformX11_la_LDFLAGS = -version-info @AGG_LIB_VERSION@  -L@x_libraries@

src/platform/X11/Makefile.am
4:libaggplatformX11_la_LDFLAGS = -version-info @AGG_LIB_VERSION@  -L@x_libraries@

$ ack "x_libraries" --all

** many many many rows looking like: 

src/Makefile
234:x_libraries = 

src/Makefile.in
234:x_libraries = @x_libraries@

I spent 4 hours trying to work out the ugly thing which is automake to conditionally get rid of the -L, but to no avail. Automake apparently wasn't designed with productivity as a goal. 
Comment 4 Rene Treffer 2008-10-12 20:56:01 UTC
The problem is caused by libtool-2*

Use libtool-1.5.26 for building agg.

All ~arch user should have problems building agg :) Should be fixed (e.g. with a die like qemu)

Have fun!
Comment 5 Peter Alfredsen (RETIRED) gentoo-dev 2008-10-18 14:45:41 UTC
+  18 Oct 2008; Peter Alfredsen <loki_val@gentoo.org> agg-2.5.ebuild:
+  Fix libtool-2.2 breakage, bug 239654.
+