On 22 August 2010 01:51, Brent Busby <[email protected]> wrote:
> On Sun, 22 Aug 2010, Dr Andrew John Hughes wrote:
>
>> Can you post the full build log as an attachment or URL?  All I can
>> tell from the current output is that libakode.la is not being produced
>> by something earlier in the build.
>>
>> If this is an as-needed issue, the problem is likely to be that akode
>> was implicitly relying on a dependent library bringing in another
>> library it needs and it no longer does that because of as-needed.
>> I've already seen patches going into the mainline packages to fix such
>> issues (may be worth checking if you have any pending updates).  I hit
>> at least one issue like this when rebuilding after the --as-needed
>> change went in.
>>
>> Adding stuff like --as-needed may help the occasional libpng upgrade,
>> but it means packages may be being built in a way that isn't being
>> tested regularly by its developers.
>
> Okay, here is the whole build log as an attachment.
>
> --
> + Brent A. Busby         + "We've all heard that a million monkeys
> + UNIX Systems Admin     +  banging on a million typewriters will
> + University of Chicago  +  eventually reproduce the entire works of
> + Physical Sciences Div. +  Shakespeare.  Now, thanks to the Internet,
> + James Franck Institute +  we know this is not true." -Robert Wilensky

Thanks.  Seems I get the same error if I try and emerge akode too and
it's definitely not down to parallel make.  The problem is that
libakode.so.2.0.0 (the actual library) is never produced.  The last
line of the lib build is:

/bin/sh ../../libtool --tag=CXX --silent --mode=link
x86_64-pc-linux-gnu-g++  -O2 -pipe -march=core2 -ggdb
-mno-tls-direct-seg-refs -fPIC   -Wl,-O1  -o libakode.la -rpath
/usr/lib64 -no-undefined -Wl,--no-undefined
-Wl,--allow-shlib-undefined -version-info 2:0:0  bytebuffer.lo
audiobuffer.lo pluginhandler.lo decoderpluginhandler.lo
resamplerpluginhandler.lo sinkpluginhandler.lo encoderpluginhandler.lo
fast_resampler.lo crossfader.lo volumefilter.lo localfile.lo
mmapfile.lo wav_decoder.lo auto_sink.lo void_sink.lo converter.lo
buffered_decoder.lo player.lo magic.lo -lpthread -lltdl
make[1]: Leaving directory
`/var/tmp/portage/media-libs/akode-2.0.2/work/akode-2.0.2/akode/lib'

If you take out the --silent in the Makefile, you get:

/bin/sh ../../libtool --tag=CXX --mode=link x86_64-pc-linux-gnu-g++
-O2 -pipe -march=core2 -ggdb -mno-tls-direct-seg-refs -fPIC   -Wl,-O1
-o libakode.la -rpath /usr/lib64 -no-undefined -Wl,--no-undefined
-Wl,--allow-shlib-undefined -version-info 2:0:0  bytebuffer.lo
audiobuffer.lo pluginhandler.lo decoderpluginhandler.lo
resamplerpluginhandler.lo sinkpluginhandler.lo encoderpluginhandler.lo
fast_resampler.lo crossfader.lo volumefilter.lo localfile.lo
mmapfile.lo wav_decoder.lo auto_sink.lo void_sink.lo converter.lo
buffered_decoder.lo player.lo magic.lo -lpthread -lltdl
(cd .libs && rm -f libakode.so.2 && ln -s libakode.so.2.0.0 libakode.so.2)
(cd .libs && rm -f libakode.so && ln -s libakode.so.2.0.0 libakode.so)
creating libakode.la
(cd .libs && rm -f libakode.la && ln -s ../libakode.la libakode.la)
make[1]: Leaving directory
`/var/tmp/portage/media-libs/akode-2.0.2/work/akode-2.0.2/akode/lib'

So libtool creates the symlinks and the la file, thus satisfying the
Makefile requirements, but never actually invokes gcc to build the
library, so the symlinks are to a non-existent library.  The libtool
being used is an old in-tree version:

# ../../libtool --version
ltmain.sh (GNU libtool) 1.5a (1.1240 2003/06/26 06:55:19)

If just 'libtool' is invoked instead,

# libtool --version
libtool (GNU libtool) 2.2.10

/bin/sh libtool --tag=CXX --mode=link x86_64-pc-linux-gnu-g++  -O2
-pipe -march=core2 -ggdb -mno-tls-direct-seg-refs -fPIC   -Wl,-O1  -o
libakode.la -rpath /usr/lib64 -no-undefined -Wl,--no-undefined
-Wl,--allow-shlib-undefined -version-info 2:0:0  bytebuffer.lo
audiobuffer.lo pluginhandler.lo decoderpluginhandler.lo
resamplerpluginhandler.lo sinkpluginhandler.lo encoderpluginhandler.lo
fast_resampler.lo crossfader.lo volumefilter.lo localfile.lo
mmapfile.lo wav_decoder.lo auto_sink.lo void_sink.lo converter.lo
buffered_decoder.lo player.lo magic.lo -lpthread -lltdl
libtool: link: rm -fr  .libs/libakode.la .libs/libakode.lai
.libs/libakode.so .libs/libakode.so.2
libtool: link: x86_64-pc-linux-gnu-g++ -shared -nostdlib
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/../../../../lib64/crti.o
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/crtbeginS.o  .libs/bytebuffer.o
.libs/audiobuffer.o .libs/pluginhandler.o .libs/decoderpluginhandler.o
.libs/resamplerpluginhandler.o .libs/sinkpluginhandler.o
.libs/encoderpluginhandler.o .libs/fast_resampler.o .libs/crossfader.o
.libs/volumefilter.o .libs/localfile.o .libs/mmapfile.o
.libs/wav_decoder.o .libs/auto_sink.o .libs/void_sink.o
.libs/converter.o .libs/buffered_decoder.o .libs/player.o
.libs/magic.o   -lpthread /usr/lib64/libltdl.so -ldl
-L/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1
-L/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64
-L/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/../../../../x86_64-pc-linux-gnu/lib
-L/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/../../.. -lstdc++ -lm -lc
-lgcc_s /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/crtendS.o
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/../../../../lib64/crtn.o
-march=core2 -mno-tls-direct-seg-refs -Wl,-O1 -Wl,--no-undefined
-Wl,--allow-shlib-undefined   -Wl,-soname -Wl,libakode.so.2 -o
.libs/libakode.so.2.0.0
libtool: link: (cd ".libs" && rm -f "libakode.so.2" && ln -s
"libakode.so.2.0.0" "libakode.so.2")
libtool: link: (cd ".libs" && rm -f "libakode.so" && ln -s
"libakode.so.2.0.0" "libakode.so")
libtool: link: x86_64-pc-linux-gnu-ar cru .libs/libakode.a
.libs/bytebuffer.o .libs/audiobuffer.o .libs/pluginhandler.o
.libs/decoderpluginhandler.o .libs/resamplerpluginhandler.o
.libs/sinkpluginhandler.o .libs/encoderpluginhandler.o
.libs/fast_resampler.o .libs/crossfader.o .libs/volumefilter.o
.libs/localfile.o .libs/mmapfile.o .libs/wav_decoder.o
.libs/auto_sink.o .libs/void_sink.o .libs/converter.o
.libs/buffered_decoder.o .libs/player.o .libs/magic.o
libtool: link: x86_64-pc-linux-gnu-ranlib .libs/libakode.a
libtool: link: ( cd ".libs" && rm -f "libakode.la" && ln -s
"../libakode.la" "libakode.la" )

the right thing is done and the library is built.

# ls .libs
audiobuffer.o       crossfader.o            libakode.la@
localfile.o      resamplerpluginhandler.o
auto_sink.o         decoderpluginhandler.o  libakode.lai
magic.o          sinkpluginhandler.o
buffered_decoder.o  encoderpluginhandler.o  libakode.so@
mmapfile.o       void_sink.o
bytebuffer.o        fast_resampler.o        libakode.so.2@
player.o         volumefilter.o
converter.o         libakode.a              libakode.so.2.0.0*
pluginhandler.o  wav_decoder.o

Note that libakode.so.2.0.0 is now there.  On x86_64, I also had to
patch the Makefile to add -fPIC to the CFLAGS otherwise the link
failed with a relocatable symbol error.

I'd be interested to know when this was last known to build, as the
in-tree libtool is clearly buggy.
-- 
Andrew :-)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net

PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8

Reply via email to