[xml/sgml-pkgs] Bug#721602: Bug#721602: libxslt1-dev: libxslt.pc should include -lm

Aron Xu happyaron.xu at gmail.com
Sat Sep 21 04:19:12 UTC 2013


On Fri, Sep 20, 2013 at 7:45 PM, Alberto Garcia <berto at igalia.com> wrote:
> On Fri, Sep 20, 2013 at 03:33:11PM +0800, Aron Xu wrote:
>
>> > Here's how to reproduce it:
>> >
>> > $ echo 'main(){}' > test.c
>> > $ gcc -o /dev/null test.c `pkg-config --cflags --libs libxslt`
>> >
>> > /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libxslt.so: error: undefined reference to 'fmod'
>> > /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libxslt.so: error: undefined reference to 'pow'
>> > /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libxslt.so: error: undefined reference to 'floor'
>> > collect2: error: ld returned 1 exit status
>>
>> But I got no problem running this test case, even passing
>> -Wl,--no-add-needed does not make any difference.
>
> Are you using the gold linker? With the latest binutils package you
> have to add -fuse-ld=gold to the gcc command line.
>
> Berto

No, but I suspect the real cause is not in libxslt, as linking to
libxslt does not mean you have to link to math.h. Passing
-Wl,--no-add-needed -Wl,--as-needed when using ld.bfd should give
correct behavior of DSO linking, which does not fail. Am I wrong here?


-- 
Regards,
Aron Xu



More information about the debian-xml-sgml-pkgs mailing list