cURL / Mailing Lists / curl-users / Single Mail

curl-users

Building statically linked curl on Solaris

From: Christian Brinz <christian.brinz_at_genia-sec.de>
Date: Thu, 25 Jan 2007 08:46:30 +0100

Since some days i've been desperately trying to build curl as statically
linked binary (all in one, no dependencies on shared libs).

My setup is as follows:

* Solaris 8,9,10 with latest patch cluster

* GNU utilities from Sunfreeware (gcc, make, openssl, openssh,
libiconv, bash, .)

* Curl source code 7.16.0

 

During all testing, I worked with this small configure script

 

---snip

# CFLAGS="-static" \

LDFLAGS="-R/usr/local/ssl/lib -R/usr/local/lib -R/usr/lib
-R/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/" \

        ./configure \

                --with-ssl \

                --enable-libgcc \

                --without-ca-bundle \

                --with-zlib \

                --with-gnu-ld \

                --enable-http \

                --enable-ftp \

                --enable-file \

                --enable-ldap \

                --enable-dict \

                --enable-telnet \

                --enable-tftp \

                --disable-manual \

                --disable-ipv6 \

                --disable-ares \

                --enable-crypto-auth \

                --enable-cookies \

                --enable-hidden-symbols

---snap

 

As soon as i remove the comment sign and activate the CFLAGS, I get the
error message that the function gethostbyname() is not found in any library.

 

Adding -static manually later to the Makefile always leads to a dynamically
linked binary.

 

Are there any suggestions what to try to get a static curl on a Solaris
system?

 

Thank You for all Your help.

 

Christian Brinz

 
Received on 2007-01-25