cURL / Mailing Lists / curl-library / Single Mail

curl-library

warning when static build curl

From: »ÆÐÄâù <balloon121_at_gmail.com>
Date: Sun, 17 Jul 2011 20:59:14 +0800

hi£¬
I have a problem compiling curl, so really need your help here.
I want to build libcurl completely static, that means do not need any other
lib like ssl or zlib when using libcurl.a.

As you mentioned here:
http://curl.haxx.se/mail/archive-2003-03/0115.html
I try to add LDFLAGS=-all-static when make.
My intact compile step is as below:
./configure --disable-shared --enable-static --with-ssl=/usr/local/ssl
--without-zlib
make LDFLAGS=-all-static

The make step succeed with warning:
homedir.o: In function `homedir':
homedir.c:(.text+0x6c): warning: Using 'getpwuid' in statically linked
applications requires at runtime the shared libraries from the glibc version
used for linking
 ../lib/.libs/libcurl.a(curl_addrinfo.o): In function `Curl_getaddrinfo_ex':
 curl_addrinfo.c:(.text+0x2de): warning: Using 'getaddrinfo' in statically
linked applications requires at runtime the shared libraries from the glibc
version used for linking

however,the libcurl.a is still not a completely static one.

I also tried to remove all libssl.so and libcrypto.so from my system, and
change LD from "/usr/bin/ld" to "/usr/bin/ld -static" in
curl-7.21.3/Makefile. which leads to the same result.

So, I really have no idea what to do except hoping your help.Thanks.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-07-17