Bug #77288 [Com]: configure bug with static openssl 1.1.1
Edit report at https://bugs.php.net/bug.php?id=77288&edit=1
ID: 77288
Comment by: tessus@php.net
Reported by: tessus@php.net
Summary: configure bug with static openssl 1.1.1
Status: Open
Type: Bug
Package: *Configuration Issues
Operating System: Linux
PHP Version: 7.2.13
Block user comment: N
Private report: N
New Comment:
Info from Jan Ehrhardt:
In the next releases (7.2.25 and 7.3.12) '-pthread' in OPENSSL_LIBS will not be ignored
any longer for static openssl linking.
Previous Comments:
------------------------------------------------------------------------
[2019-10-23 02:39:36] tessus@php.net
For some strange reason the "-lpthread" in OPENSSL_LIBS is ignored. It is necessary
though, because the configure process does not add it even though it's needed for openssl.
Adding it to LIBS solved the issue.
This is the command that finally worked (my static OpenSSL 1.1.1 is in /usr/local/ssl-1.1.1):
./configure [snip] --with-openssl=/usr/local/ssl-1.1.1 [snip]
CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib LIBS="-lpthread"
OPENSSL_LIBS="-L/usr/local/ssl-1.1.1/lib -l:libssl.a -l:libcrypto.a -ldl
-lpthread" OPENSSL_CFLAGS="-I/usr/local/ssl-1.1.1/include"
------------------------------------------------------------------------
[2018-12-12 15:56:51] tessus@php.net
Description:
------------
I run into an error when trying to configure PHP 7.2.13 with a static
openssl 1.1.1 library. The strange thing however is that using a static openssl
1.0.2 library works.
The error is as follows:
checking for OpenSSL version... >= 1.0.1
checking for CRYPTO_free in -lcrypto... yes
checking for SSL_CTX_set_ssl_version in -lssl... no
configure: error: libssl not found!
I've also tried to set:
export PKG_CONFIG_PATH=/usr/local/ssl-1.1.1/lib/pkgconfig/
But it did not help.
Here's my config.log: https://evermeet.cx/pub/logs/config.log
So linking against a static openssl 1.0.2 works, but against a static
openssl 1.1.1 does not work.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77288&edit=1
Thread (8 messages)