curl-library
Re: AIX autobuild: libcares not linked
Date: Fri, 16 May 2008 11:48:22 +0200
On Wed, May 14, 2008 at 4:28 PM, Yang Tse <yangsita_at_gmail.com> wrote:
> > > "--without-ssl --enable-debug --disable-ipv6 --enable-ares --disable-shared"
> >
> > Done. That works. The main difference from the shared build is that
> > libcares is linked while building the curl binary itself:
>
> Ok, so the next step would be to try c-ares enabled shared library but
> with debug disabled. This should finally reveal if we have a linking
> problem in our configure script or its just the autoconf/automake
> horrors you mention.
>
> Please try:
>
> "--without-ssl --disable-debug --disable-ipv6 --enable-ares"
Done. It still fails in the same way. Some of the things I noticed:
1) - ares doesn't build on AIX with --disable-debug, because this also
tries to build code not built in debug mode, e.g. adig.c. AIX (4.3
through 6.1 afaict) really needs _USE_IRS defined to get the full
bind4 compatibility. I'll try to come up with a patch (which is just
to come up with a good place for the #define)
2) - libcares is actually built statically on AIX, even without
--disable-shared, only libcurl is built shared.
3) - A re-build in non-static, non-debug mode (this latest test)
included libcares.a in the linking stage for libcurl, and ares_init()
appears to be referenced:
>nm -Bgo libcurl.so.4 | grep ares_init
02000544030 T .ares_init
- U ares_init
4) - the crash looks the same always:
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 0xd4fff920 in ares_init ()
from /home/tor/git/curl/lib/.libs/libcurl.a(libcurl.so.4)
(gdb) wher
#0 0xd4fff920 in ares_init ()
from /home/tor/git/curl/lib/.libs/libcurl.a(libcurl.so.4)
#1 0xd4fe1814 in Curl_open (curl=0x2ff22194) at url.c:661
#2 0xd4fff2e0 in curl_easy_init () at easy.c:348
#3 0x100006b4 in operate (config=0x2ff22748, argc=1, argv=0x2ff22960)
at main.c:3846
#4 0x100004d8 in main (argc=1, argv=0x2ff22960) at main.c:4997
(gdb)
5) - I now remember something similar, or possibly the same that I
looked into last year: It looks like there are problems when a shared
library calls a function in a static library, because from what I
recall from last year it worked when I linked the .o file(s) directly
into the shared library. That doesn't make sense though, because on
AIX static libs are just those same .o files, in an ar archive.
Unfortunately I won't have time to look more into this until the very
end of the month, I go on mission tomorrow.
-Tor
Received on 2008-05-16