cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Mac OS X linking

From: Jim Napier <jnapier_at_mail.urchin.com>
Date: Sat, 20 Nov 2004 04:06:55 -0800 (PST)

The problem I had with getting Curl to compile statically against the
OpenSSL distribution I built instead of dynamically linking the default
system libs is because on Mac OS X it will do the dynamic linking ahead of
anything else regardless of what you tell it. What's worse is that it will
do so silently, so even if it appears to be doing the right thing like in
my case you really have to check the linking by running otools on the curl
binary to check the dependencies once Curl is done building. Essentially
the Mac folks don't want you to static link anything that can be had
dynamically from system libs. There is a hack to get around this which is
to remove certain symlinks in /usr/lib that point to such libs as *crypto*
and *ssl*, then do your static build, then recreate the links. That's what
I did and I got finally got it built. I had to run ranlib manually on the
libcurl lib that was built before it would link successfully to the
program that I ultimately needed to build. Thanks for the suggestions
offered by the list.

Jim Napier
Received on 2004-11-20