[Ffmpeg-devel] have cos and sin left libm??

Måns Rullgård mru
Sun Oct 22 19:33:16 CEST 2006


Rich Felker <dalias at aerifal.cx> writes:

> On Sun, Oct 22, 2006 at 06:47:19PM +0200, V?ctor Paesa wrote:
>> Hi,
>> 
>> > Using today's svn - 6764 -I tried to build with enable-dts.
>> > It fails here ( config.err);
>> >
>> > gcc -fPIC -march=k8 -pthread -c -o
>> > /tmp/ffmpeg-conf-31736-19483-25707.o
>> > /tmp/ffmpeg-conf-5025-19483-10772.c
>> > gcc -Wl,--warn-common -Wl,--as-needed -pthread -o
>> > /tmp/ffmpeg-conf-22367-19483-692 /tmp/ffmpeg-conf-3
>> > 1736-19483-25707.o -lm -lz -ldts
>> > /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../lib64/libdts.a(parse.o):
>> > In function `dts_init':
>> > (.text+0x625): undefined reference to `cos'
>> > /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../lib64/libdts.a(parse.o):
>> > In function `dts_init':
>> > (.text+0x681): undefined reference to `cos'
>> > /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../lib64/libdts.a(parse.o):
>> > In function `dts_init':
>> > (.text+0x6ca): undefined reference to `cos'
>> > /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../lib64/libdts.a(parse.o):
>> > In function `dts_init':
>> > (.text+0x70f): undefined reference to `sin'
>> > collect2: ld returned 1 exit status
>> >
>> > Notice libm is included.
>> >
>> > ???
>> >
>> 
>> Most probably, the order of libraries matters in your plaform.
>> 
>> Could you try:
>> gcc -Wl,--warn-common -Wl,--as-needed -pthread -o
>>  /tmp/ffmpeg-conf-22367-19483-692 /tmp/ffmpeg-conf-3
>>  1736-19483-25707.o -ldts -lz -lm
>
> Yes, if libdts uses libm then -lm MUST be after -ldts.

Assuming libdts is a static lib, yes.  If it were an EVIL shared lib,
it could link to libm all by itself.

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list