cURL / Mailing Lists / curl-library / Single Mail


Re: build error: curl-7.18.1 + c-ares-1.5.2

From: 邓民文 <>
Date: Sat, 7 Jun 2008 12:28:11 +0800

thanks daniel, i have found the problem, c-ares and curl cannot link to the
clock_gettime(). So, i should share my finding to you.

in the config.log of c-ares-1.5.2, i find these stuff:

configure:22816: checking for monotonic clock_gettime
configure:22858: gcc -c -g -O2 conftest.c >&5
configure:22864: $? = 0
configure:22870: result: yes
configure:22891: checking for clock_gettime in libraries
configure:22943: gcc -o conftest -g -O2 conftest.c >&5
/tmp/cc2Em1Go.o: In function `main':
*****/c-ares-1.5.2/conftest.c:48: undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
configure:22949: $? = 1

these piece also found in config.log of curl-7.18.1

so, i go to google, and find that:

gcc -o conftest -g -O2 conftest.c <-- link error
gcc -o conftest -lrt -g -O2 conftest.c <-- ok

2008/6/7 Daniel Stenberg <>:

> On Fri, 6 Jun 2008, ??? wrote:
> checking that c-ares is good and recent enough... no configure: error:
>> c-ares library defective or too old
> Can you show us the relevant pieces from your config.log? It sounds as if
> configure picks up an older c-ares version in your system...
> --
> /
Received on 2008-06-07