httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 54252] acinclude.m4 requires -lz when linking with ssl static libraries
Date Wed, 02 Jan 2013 13:28:43 GMT

Kaspar Brand <> changed:

           What    |Removed                     |Added
             Status|NEW                         |NEEDINFO

--- Comment #2 from Kaspar Brand <> ---
(In reply to comment #1)
> "-lz" would only appear in pkg-config's --libs output if
> pkg-config was called with" --static" - and that's something we don't want
> to unconditionally add to pkg-config calls in acinclude.m4/configure.

After a closer look at the OpenSSL sources, I realized that -lz (and other
potential linker flags for the static libs) were only moved to Libs.private in
the openssl.pc file with OpenSSL 1.0.0h/1.0.1 and later
( and, respectively). With previous
releases, pkg-config would output -lz also when "--static" was not specified.

That being said, relying on pkg-config for figuring out the proper
ap_openssl_libs should be doable, I think... could you try the changes shown
below and let me know if they fix the problem for you? (to be applied against a
checkout of, and
buildconf must be run afterwards)

With the modifications from r1390518, additional flags from pkg-config's
"--static" option will only be added to modules/ssl/ and ab_LDFLAGS,
i.e. we avoid the side effect of everything having unnecessary references to

--- acinclude.m4        (revision 1427763)
+++ acinclude.m4        (working copy)
@@ -517,7 +517,7 @@
         export PKG_CONFIG_PATH
-      ap_openssl_libs="`$PKGCONFIG --libs-only-l openssl 2>&1`"
+      ap_openssl_libs="`$PKGCONFIG --silence-errors --static --libs-only-l
       if test $? -eq 0; then
         pkglookup="`$PKGCONFIG --cflags-only-I openssl`"
@@ -557,7 +557,7 @@

     if test "x$ac_cv_openssl" = "xyes"; then
-      ap_openssl_libs="-lssl -lcrypto `$apr_config --libs`"
+      ap_openssl_libs="${ap_openssl_libs:--lssl -lcrypto} `$apr_config
       APR_ADDTO(MOD_LDFLAGS, [$ap_openssl_libs])
       APR_ADDTO(LIBS, [$ap_openssl_libs])

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message