cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Building cURL without dependencies on libcurl/openssl so's

From: HART, CHRISTOPHER T <CHRISTOPHER_T_HART_at_fleet.com>
Date: Wed, 7 May 2003 08:12:13 -0400

Well, I thought I had this figured out, but I still am having one problem.
I was able to make curl with everything statically linked except for one
dependency on libz.so.1. This was the result of doing a configure
--enable-static --disable-shared --with-ssl, then doing make
LDFLAGS=-all-static.

Any thoughts/suggestions? Advice is much appreciated.

Chris Hart

-----Original Message-----
From: Daniel Stenberg [mailto:daniel_at_haxx.se]
Sent: Saturday, May 03, 2003 10:07 AM
To: Curl Mailinglist
Subject: Re: Building cURL without dependencies on libcurl/openssl so's

On Fri, 2 May 2003, HART, CHRISTOPHER T wrote:

> This is probably a very basic, simple question, but I've been having some
> trouble with it... Basically, I want to build curl without needing to
have
> libcurl or openssl libraries after compilation time. I thought this was
> done by specifying static linking of libraries, but so far, I haven't been
> able to make this happen. (I've tried setting the CFLAGS environment
> variable to -B=static, -static and --static, none of which have had the
> desired affect.) From the documentation I've seen on building curl, I
> thought that would be enough. Searching Google for static linking in gcc
> hasn't been much of a help for me, but maybe I don't know what to look
for.
> Any advice would be appreciated.

To build the curl tool static without using a dynamic libcurl, you run
'configure --disable-shared'. But this doesn't make anything else but
libcurl
static in the build.

To make a completely static build, use my approach I wrote about here:

        http://curl.haxx.se/mail/archive-2003-03/0115.html

(Yeah, I should document this in the INSTALL document or even write up a fix
for configure to allow this easier. Help is appreciated.)

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
Received on 2003-05-07