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

AIX autobuild: libcares not linked

From: Tor Arntsen <tor_at_spacetec.no>
Date: Wed, 14 May 2008 11:55:59 +0200

I (re-)started an AIX autobild with ares enabled, which coredumps:
http://curl.haxx.se/auto/log.cgi?id=20080514021735-14764

This GDB was configured as "powerpc-ibm-aix5.1.0.0"...
Core was generated by `lt-curl'.
Program terminated with signal 11, Segmentation fault.
#0 0xd4d7c820 in ares_init () from
/home/tor/git/curl/lib/.libs/libcurl.a(libcurl.so.4)
(gdb) where
#0 0xd4d7c820 in ares_init () from
/home/tor/git/curl/lib/.libs/libcurl.a(libcurl.so.4)
#1 0xd4d5dbf4 in Curl_open (curl=0x2ff22214) at url.c:661
#2 0xd4d7c190 in curl_easy_init () at easy.c:348
#3 0x10000740 in operate (config=0x2ff227c8, argc=2, argv=0x2ff229e0)
at main.c:3846
#4 0x100004d8 in main (argc=2, argv=0x2ff229e0) at main.c:4997

I believe the cause is that libcurl isn't linked against libcares:
..
>ldd libcurl.so.4
/opt/freeware/lib/libcrypto.a(libcrypto.so.0.9.7)
/opt/freeware/lib/libssl.a(libssl.so.0.9.7)
/opt/freeware/lib/liblber.a(liblber.so.2)
/opt/freeware/lib/libldap.a(libldap.so.2)
/usr/lib/libz.a(libz.so.1)
libcurl.so.4
/usr/lib/libcrypt.a(shr.o)
/usr/lib/libc.a(shr.o)

Looking at the linking stage, and comparing with a Linux build, the
AIX build doesn't seem to refer to libcares. The Linux build looks
like this (from http://curl.haxx.se/auto/log.cgi?id=20080514051528-432
which is slightly different in that it is with libssh2 etc. too, but
it uses ares which is the similarity):

icc -shared .libs/file.o .libs/timeval.o .libs/base64.o .libs/hostip.o
.libs/progress.o .libs/formdata.o .libs/cookie.o .libs/http.o
.libs/sendf.o .libs/ftp.o .libs/url.o .libs/dict.o .libs/if2ip.o
.libs/speedcheck.o .libs/ldap.o .libs/ssluse.o .libs/version.o
.libs/getenv.o .libs/escape.o .libs/mprintf.o .libs/telnet.o
.libs/netrc.o .libs/getinfo.o .libs/transfer.o .libs/strequal.o
.libs/easy.o .libs/security.o .libs/krb4.o .libs/krb5.o
.libs/memdebug.o .libs/http_chunks.o .libs/strtok.o .libs/connect.o
.libs/llist.o .libs/hash.o .libs/multi.o .libs/content_encoding.o
.libs/share.o .libs/http_digest.o .libs/md5.o .libs/http_negotiate.o
.libs/http_ntlm.o .libs/inet_pton.o .libs/strtoofft.o .libs/strerror.o
.libs/hostares.o .libs/hostasyn.o .libs/hostip4.o .libs/hostip6.o
.libs/hostsyn.o .libs/hostthre.o .libs/inet_ntop.o .libs/parsedate.o
.libs/select.o .libs/gtls.o .libs/sslgen.o .libs/tftp.o .libs/splay.o
.libs/strdup.o .libs/socks.o .libs/ssh.o .libs/nss.o .libs/qssl.o
/build-20897/ares/.libs/libcares.a /usr/lib/libidn.so -lssh2 -lldap
-lrt -lssl -lcrypto -lz -Wl,-soname -Wl,libcurl.so.4 -o
.libs/libcurl.so.4.0.1
 (cd .libs && rm -f libcurl.so.4 && ln -s libcurl.so.4.0.1 libcurl.so.4)
 (cd .libs && rm -f libcurl.so && ln -s libcurl.so.4.0.1 libcurl.so)
 ar cru .libs/libcurl.a file.o timeval.o base64.o hostip.o progress.o
formdata.o cookie.o http.o sendf.o ftp.o url.o dict.o if2ip.o
speedcheck.o ldap.o ssluse.o version.o getenv.o escape.o mprintf.o
telnet.o netrc.o getinfo.o transfer.o strequal.o easy.o security.o
krb4.o krb5.o memdebug.o http_chunks.o strtok.o connect.o llist.o
hash.o multi.o content_encoding.o share.o http_digest.o md5.o
http_negotiate.o http_ntlm.o inet_pton.o strtoofft.o strerror.o
hostares.o hostasyn.o hostip4.o hostip6.o hostsyn.o hostthre.o
inet_ntop.o parsedate.o select.o gtls.o sslgen.o tftp.o splay.o
strdup.o socks.o ssh.o nss.o qssl.o
 ranlib .libs/libcurl.a
 creating libcurl.la
 (cd .libs && rm -f libcurl.la && ln -s ../libcurl.la libcurl.la)
 make[2]: Leaving directory `/build-20897/lib'

And the AIX build (from the same link as in line 2):

 xlc -Wl,-bM:SRE -o .libs/libcurl.so.4 .libs/file.o .libs/timeval.o
.libs/base64.o .libs/hostip.o .libs/progress.o .libs/formdata.o
.libs/cookie.o .libs/http.o .libs/sendf.o .libs/ftp.o .libs/url.o
.libs/dict.o .libs/if2ip.o .libs/speedcheck.o .libs/ldap.o
.libs/ssluse.o .libs/version.o .libs/getenv.o .libs/escape.o
.libs/mprintf.o .libs/telnet.o .libs/netrc.o .libs/getinfo.o
.libs/transfer.o .libs/strequal.o .libs/easy.o .libs/security.o
.libs/krb4.o .libs/krb5.o .libs/memdebug.o .libs/http_chunks.o
.libs/strtok.o .libs/connect.o .libs/llist.o .libs/hash.o
.libs/multi.o .libs/content_encoding.o .libs/share.o
.libs/http_digest.o .libs/md5.o .libs/http_negotiate.o
.libs/http_ntlm.o .libs/inet_pton.o .libs/strtoofft.o .libs/strerror.o
.libs/hostares.o .libs/hostasyn.o .libs/hostip4.o .libs/hostip6.o
.libs/hostsyn.o .libs/hostthre.o .libs/inet_ntop.o .libs/parsedate.o
.libs/select.o .libs/gtls.o .libs/sslgen.o .libs/tftp.o .libs/splay.o
.libs/strdup.o .libs/socks.o .libs/ssh.o .libs/nss.o .libs/qssl.o
-Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib
-L/opt/freeware/src/packages/BUILD/openldap-2.0.21/libraries
-L/build-29976/ares -L/opt/freeware/lib -lldap -lz -lc
-Wl,-bE:.libs/libcurl.exp -Wl,-bnoentry ${wl}-berok
 ar cru .libs/libcurl.a .libs/libcurl.so.4
 creating libcurl.la
 (cd .libs && rm -f libcurl.la && ln -s ../libcurl.la libcurl.la)
 gmake[2]: Leaving directory `/build-29976/lib'

Note that the Linux build contains:

.libs/ssh.o .libs/nss.o .libs/qssl.o
/build-20897/ares/.libs/libcares.a /usr/lib/libidn.so -lssh2 -lldap
-lrt -lssl -lcrypto -lz -Wl,-soname -Wl,libcurl.so.4 -o
.libs/libcurl.so.4.0.1

while the corresponding part of the AIX build is:

.libs/ssh.o .libs/nss.o .libs/qssl.o
-Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib
-L/opt/freeware/src/packages/BUILD/openldap-2.0.21/libraries
-L/build-29976/ares -L/opt/freeware/lib -lldap -lz -lc
-Wl,-bE:.libs/libcurl.exp -Wl,-bnoentry ${wl}-berok

So, the Linux build has an explicit reference to libcares.a but the
AIX build just refers to the directory (with -L) but with no -lcares.

Ideas anyone?

-Tor
Received on 2008-05-14

These mail archives are generated by hypermail.

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

File upload with ASP.NET