Am 17.11.2017 um 04:07 schrieb Helmut K. C. Tessarek:
On 2017-11-15 19:12, Rainer Jung wrote:
IMHO there is no clean and easy workaround but for now it should be
acceptable to set your LIBS environment variable to "-ldl" before
running configure.

Yep, the following worked:

LIBS=-ldl ./configure --prefix=/usr/local/apr-util
--with-apr=/usr/local/apr --with-crypto --with-openssl=/usr/local/ssl

see config.log.3

Yep, looks good, thanks for confirming. We'll look into adding pkg-config autofoo to hopefully correctly detect what's needed to link apu crypto against OpenSSL. We might be able to take it from the mod_ssl m4 macros.

Concerning linking against static libs: in a situation where you link APU crypto statically against OpenSSl and also mod_ssl, you might not get what you expect. Although the files mod_ssl.so and apr_crypto_openssl.so contain independent copies of the needed OpenSSL implementation functions, the runtime linker by default would not necessarily use them. By default the runtime linker on most Unix/Linux platforms looks for symbols in all loaded objects in the order of loading. For instance in the hppd case it would first look there, then it would search all the objects directly loaded by httpd etc.

For OpenSSL a not-so-nice example would be, that httpd for some reason loads ldap system libraries, which themselves are linked against the platform OpenSSL, so these are loaded early and searched before mod_ssl or apru-til crypto (at least f mod_ssl and apr-util themselves are shared objects, not statically linked into httpd). To let the runtime linker first search for a symbol definition in the local object, I typically add -Bsymbolic (or -Wl,-Bsymbolic for gcc).

Regards,

Rainer





Reply via email to