Thanks, unfortuanetely those options made no difference at all, the same things are still dynamically linked.
At the very least I figured I can make due with only have the SSL library statically linked but I have tried -with-ssl=path (as per my other email).
-----Original Message-----
From: Bjoern Voigt <bjoernv@arcor.de.INVALID>
Sent: Wednesday, March 29, 2023 6:37 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache static compile
On 28.03.23 00:14, Chris me wrote:
>
> Hi, I hope this is an OK question.
>
> I have a need to build apache with all libraries statically linked and
> included in the httpd executable.
>
> Is this possible?
>
In
https://serverfault.com/a/715193 you will find the answer, to use "configure --disable-shared", but this option is not available in newer Apache servers.
Now you have multiple "static link" options. See
# httpd-2.4.56/configure --help
[...]
--enable-mods-static=MODULE-LIST
Space-separated list of static modules to enable |
"all" | "most" | "few" | "reallyall"
[...]
--enable-so DSO capability. This module will be automatically
enabled unless you build all modules statically.
[...]
--enable-ssl-staticlib-deps
link mod_ssl with dependencies of OpenSSL's static
libraries (as indicated by "pkg-config --static").
Must be specified in addition to --enable-ssl.
[...]
--enable-static-support Build a statically linked version of the support
binaries
[...]
--enable-jansson-staticlib-deps
link mod_md with dependencies of libjansson's static
libraries (as indicated by "pkg-config --static").
Must be specified in addition to --enable-md.
[...]
I tried this on openSUSE Tumbleweed, but for the most libraries the configure scripts does not find static libraries. So the resulting "httpd" has a lot of dynamic dependent libraries.
./configure --enable-mods-static=all --disable-so --enable-ssl-staticlib-deps
ldd targetdir/bin/httpd
linux-vdso.so.1 (0x00007ffd6d7c9000)
libssl.so.3 => /usr/lib64/libssl.so.3 (0x00007fc06e81c000)
libcrypto.so.3 => /usr/lib64/libcrypto.so.3 (0x00007fc06e200000)
libjansson.so.4 => /usr/lib64/libjansson.so.4 (0x00007fc06e80b000)
libcurl.so.4 => /usr/lib64/libcurl.so.4 (0x00007fc06e75e000)
[...]
Björn
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org