[Ffmpeg-devel] mp3lame : more --as-needed woes

Rich Felker dalias
Tue Oct 31 23:40:14 CET 2006


On Mon, Oct 30, 2006 at 10:50:04AM +0100, Baptiste Coudurier wrote:
> Hi
> 
> sean wrote:
> > Building today's svn - 6834, configure dies looking for lame, from
> > config.err:
> > 
> > gcc -Wl,--warn-common -Wl,--as-needed -pthread -o
> > /tmp/ffmpeg-conf-9929-7135-22245 /tmp/ffmpeg-conf-2682-7135-369.o -lm
> > -lz -ldts -lm -lgsm -lmp3lame -lm
> > /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../lib64/libmp3lame.so:
> > undefined reference to `sqrt'
> > /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../lib64/libmp3lame.so:
> > undefined reference to `floor'
> > /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../lib64/libmp3lame.so:
> > undefined reference to `ceil'
> > /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../lib64/libmp3lame.so:
> > undefined reference to `tan'
> > ..........................
> > 
> > Notice libm _follows_ libmp3lame, so as-needed should be able to use it.
> > 
> > ???
> > 
> > [ this may be a dup. An earlier message never showed up. If so, sorry. ]
> > 
> > sean
> > 
> 
> Confirmed here.
> 
> gcc -Wl,--warn-common -Wl,--as-needed -pthread -o
> /tmp/ffmpeg-conf-15632-14573-3945 /tmp/ffmpeg-conf-6857-14573-19654.o
> -lm -lz -ldts -lm -lmp3lame -lm
> /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libmp3lame.so:
> undefined reference to `pow'
> collect2: ld returned 1 exit status
> 
> gcc (GCC) 4.1.2 20061020 (prerelease) (Debian 4.1.1-17)
> GNU ld version 2.17 Debian GNU/Linux
> 
> Removing -Wl,--as-needed fixes the problem.

My guess is that these binutls are broken and decide that -lm is
unneeded the first time they see it, then don't even consider it the
second time they see it... As usual, blame the maintainers. In the
meantime, why doesn't someone remove this "as-needed" stuff from the
build process?

Rich





More information about the ffmpeg-devel mailing list