cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: FW: FW: Problem to statically link to openssl-0.9.8e on HP-UX

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 16 Jun 2010 12:32:20 -0700

On Wed, Jun 16, 2010 at 03:12:29PM -0400, Alona Rossen wrote:
> Config.log shows that I specified "--with-ssl=/usr/local/ssl". Does it
> have a chance of grabbing something else?

If pkg-config is being used, then it could literally use anything it
wants. The configure log for HP-UX shows this:

configure:19612: checking for ENGINE_load_builtin_engines
configure:19612: aCC -Ae -o conftest +z -z +W 4227,4255 -s +O2 -I/home/sambuild/ssl/include -I/hom
e/sambuild/ssl/include/openssl -L/home/sambuild/ssl/lib conftest.c -lssl -lcrypto >&5
configure:19612: $? = 0
configure:19612: result: yes

This isn't using /usr/local/ssl as you said, but /home/sambuild/ssl. If
the libssl and libcrypto libraries aren't in /home/sambuild/ssl/lib, then
the system will pull them from the default location (e.g. /usr/lib) which
is obviously not what you want. Since this test found
ENGINE_load_builtin_engines, it must be in the library it used. If you
have only static libssl/libcrypt in /home/sambuild/ssl/lib, then it's
up to your toolchain whether it's going to use those, or link to the
first dynamic versions it finds, such as in /usr/lib.

As I said earlier, statically linking to OpenSSL is theoretically only
possible with OpenSSL when pkg-config is used, and only if it's correctly
configured (I don't know if OpenSSL properly configures it by default).

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-06-16