cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

a bug in the curl cofigure script?: curl-7.18.1 with c-ares-1.5.1 and a debug option

From: Yuriy Sosov <yusosov_at_gmail.com>
Date: Thu, 1 May 2008 23:29:11 -0400

Hi,

I am very new to linux, compiling in linux and to your library.
I had to compile curl-7.18.1 with c-ares-1.5.1 and a debug option.

To enable debug in cares
configure --enable-static --enable-debug --enable-thread
I had to add a lib folder to cares with memdebug.h and memdebug.c from curl.

After that I was not able to configure curl with options:
configure --enable-static --enable-debug --enable-thread --enable-ares=PATH
due to error:
checking that c-ares is good and recent enough... no
configure: error: c-ares library defective or too old

Configure log showed the following errors related to this error message:
configure:38080: checking that c-ares is good and recent enough
configure:38105: gcc -o conftest -g -O2 -I/opt/c-ares/bldsd/include
   -L/opt/c-ares/bldsd/lib conftest.c -lcares -lidn -lssl -lcrypto
-lssl -lcrypto -lz >&5
/opt/c-ares/bldsd/lib/libcares.a(ares_process.o): In function
`ares__send_query':
../ares_process.c:660: undefined reference to `curl_docalloc'
/opt/c-ares/bldsd/lib/libcares.a(ares_process.o): In function `open_tcp_socket':
../ares_process.c:832: undefined reference to `curl_socket'
/opt/c-ares/bldsd/lib/libcares.a(ares_process.o): In function `open_udp_socket':
../ares_process.c:884: undefined reference to `curl_socket'
collect2: ld returned 1 exit status
configure:38111: $? = 1
configure: failed program was:
|
| #include <ares.h>
| /* provide a set of dummy functions in case c-ares was built with debug */
| void curl_dofree() { }
| void curl_sclose() { }
| void curl_domalloc() { }
|
| int main(void)
| {
| ares_channel channel;
| ares_cancel(channel); /* added in 1.2.0 */
| ares_process_fd(channel, 0, 0); /* added in 1.4.0 */
| return 0;
| }
|
configure:38123: result: no
configure:38125: error: c-ares library defective or too old

I figured out that configure is trying to compile this piece of c-code
to check that cares has
ares_channel type, and ares_cancel and ares_process_fd functions
added in ver 1.4.0. Error messages show that linker was able to find
these functions, but was not able to find curl_docalloc and
curl_socket from curl from curl.

I added two dummy functions to the configure script
void curl_docalloc() { }
void curl_socket() { }
After that I configured curl and compiled it without errors.

Is this a bug in the curl cofigure script or I am missing something?

Thanks,

Yuriy
Received on 2008-05-02

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET