cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: lib577.c fails to link with --enable-hidden-symbols

From: Daniel Johnson <daniel.johnson31_at_gmail.com>
Date: Fri, 14 May 2010 18:16:15 -0400

On May 14, 2010, at 5:01 PM, Kamil Dudka wrote:

> On Friday 14 of May 2010 21:33:43 Daniel Johnson wrote:
>> lib577.c fails to link with --enable-hidden-symbols because Curl_fnmatch
>> isn't externally visible:
>>
>> libtool: link: gcc -m32 -Wshorten-64-to-32 -g -O0 -pedantic -Wall -W
>> -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs
>> -Wmissing-declarations -Wmissing-prototypes -Wno-long-long -Wfloat-equal
>> -Wno-multichar -Wsign-compare -Wundef -Wno-format-nonliteral -Wendif-labels
>> -Wstrict-prototypes -Wdeclaration-after-statement -Wcast-align
>> -Wno-system-headers -fvisibility=hidden -Wl,-dead_strip_dylibs -o
>> .libs/lib577 lib577.o first.o -L/build-86147/ares -L/sw32/lib
>> ../../lib/.libs/libcurl.dylib /build-86147/ares/.libs/libcares.dylib
>> /sw32/lib/libidn.dylib /sw32/lib/libssh2.dylib -lldap -lgssapi_krb5
>> -lresolv -lssl -lcrypto -lz Undefined symbols:
>> "_Curl_fnmatch", referenced from:
>> _test in lib577.o
>> ld: symbol(s) not found
>> collect2: ld returned 1 exit status
>> make[2]: *** [lib577] Error 1
>
> Thanks for pointing it out!
>
> Could you please try the attached patch whether it solves the problem for you?
>
> Kamil
> <0001-test577-avoid-link-failure-with-enable-hidden-symbol.patch>

Yes, it builds successfully now and I don't get any test failures. However, I think the last time this happened the code was added to testutil.{c,h} instead of linking directly to files in lib. Perhaps that's considered cleaner?

Daniel

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-05-15