You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Avery, Ken" <ke...@hp.com> on 2004/06/09 23:04:45 UTC

Does anyone know how to statically link libssl.a vs libssl.so.x

Hello,

I am trying to statically link libssl.a instead of libssl.so.x.

After doing a buildconf, configure and make; then "ldd httpd" on the
final executable to look at the shared library dependencies and
libssl.so.x id there. I have tried using the -static option in the
LDFLAGS and it does not seam to make a difference, I would even be
willing to have all the libraries statically linked. I have even tried
making a libssl.la file to tell libtool to use libssl.a; though, I think
this might require making libxxx.la files for all the libraries that
libssl.so.x are dependent on?

The problem is I really do not understand libtool enough to figure this
out.

Any help would be appreciated,
Ken

Re: Does anyone know how to statically link libssl.a vs libssl.so.x

Posted by Joe Orton <jo...@redhat.com>.
On Wed, Jun 09, 2004 at 04:04:45PM -0500, Avery, Ken wrote:
> Hello,
> 
> I am trying to statically link libssl.a instead of libssl.so.x.
> 
> After doing a buildconf, configure and make; then "ldd httpd" on the
> final executable to look at the shared library dependencies and
> libssl.so.x id there. I have tried using the -static option in the
> LDFLAGS and it does not seam to make a difference, I would even be
> willing to have all the libraries statically linked. I have even tried
> making a libssl.la file to tell libtool to use libssl.a; though, I think
> this might require making libxxx.la files for all the libraries that
> libssl.so.x are dependent on?

Many choices...  Pass the configure --with-openssl=/... a directory
which contains an OpenSSL installation without shared libraries.  Link
one big static httpd binary using LT_LDFLAGS=-all-static but that's
generally a bad idea.  Hack the httpd link line to pass e.g.
-Wl,-Bstatic and -Wl,-Bdynamic around the -lssl -lcrypto, or whatever
your linker of choice uses.

joe