Subject: missing library depencece

missing library depencece

From: Ivan Kalvachev <ikalvachev_at_gmail.com>
Date: Mon, 18 Aug 2008 03:51:20 +0300

Hello,
I've been trying to compile latest aria2c with all supported libraries.
For that reason I built and installed c-ares-1.5.2 and then run aria2c
configure. Unfortunately it failed to validate libcares.
Here is relevant snippet from the log

aria2c-0.15.2/config.log
----------------------------
configure:6754: checking for ares_init in -lcares
configure:6789: g++ -o conftest -I/usr/include -Wall conftest.cpp
-lcares -L/
usr/lib >&5
/usr/lib/libcares.a(ares__timeval.o): In function `ares__tvnow':
ares__timeval.c:(.text+0x19): undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
configure:6795: $? = 1
configure: failed program was:
----------------------------

Obviously there is missing library.
Going back into c-ares, it is obvious that it builds and runs its own programs
without problem, so I check its configure. Here is the relevant part from it.

c-ares-1.5.2/config.log:
----------------------------
configure:22891: checking for clock_gettime in libraries
configure:22943: gcc -o conftest conftest.c >&5
/tmp/ccGO38MB.o: In function `main':
conftest.c:(.text+0x20): undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
configure:22949: $? = 1
configure: failed program was:
[skip]
configure:22943: gcc -o conftest conftest.c -lrt >&5
configure:22949: $? = 0
configure:22991: result: -lrt
----------------------------

Well, obviously this is the needed library. A quick look in
pkgconfig/libcares.pc reveals that this library is not included among
the one needed for linking.

Well, I hope you fix your build scripts so .pc includes that needed library.

The next step would be to make aria2c to actually use the pkgconfig ;)
I'm reporting to them too.

Best Regards
Received on 2008-08-18