Bug #77288 [Opn]: configure bug with static openssl 1.1.1

From: Date: Wed, 12 Aug 2020 19:14:31 +0000
Subject: Bug #77288 [Opn]: configure bug with static openssl 1.1.1
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-228548@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77288&edit=1

 ID:                 77288
 Updated 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:

This time I added OPENSSL_LIBS=-lpthread, but it still doesn't work.
Same messge in config.log: https://evermeet.cx/pub/logs/config.1.log

>So, is that the case?

So apparently it is not.

Either way, I find it rather strange that the build process checks that there's only a static
lib in the specified openssl path, but yet the pthread lib is not added automatically (why not
hardcode that? if static, add pthread).

So the current build process does not only ignore pkgconfig, but also OPENSSL_LIBS. Thus nothing was
fixed.


Previous Comments:
------------------------------------------------------------------------
[2020-08-12 10:29:41] cmb@php.net

Probably relevant error message:

/bin/ld: /usr/local/ssl-1.1.1/lib/libcrypto.a(threads_pthread.o): undefined reference to symbol
'pthread_rwlock_wrlock@@GLIBC_2.2.5'
/bin/ld: note: 'pthread_rwlock_wrlock@@GLIBC_2.2.5' is defined in DSO
/lib64/libpthread.so.0 so try adding it to the linker command line

------------------------------------------------------------------------
[2020-08-12 02:01:47] tessus@php.net

Just tested the following configure line (the one that worked with 1.0.2) and it did not work:

./configure [snip] --with-openssl=/usr/local/ssl-1.1.1 [snip] CFLAGS=-I/usr/local/include
LDFLAGS=-L/usr/local/lib

I tried with and without:
export PKG_CONFIG_PATH=/usr/local/ssl-1.1.1/lib/pkgconfig/

Same error as before (same name, new log file): https://evermeet.cx/pub/logs/config.log

------------------------------------------------------------------------
[2020-08-12 01:38:22] tessus@php.net

I have no idea, since I haven't changed my build script, which still looks like this:

./configure [snip] --with-openssl=/usr/local/ssl-1.1.1 [snip] CFLAGS=-/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"

------------------------------------------------------------------------
[2020-08-11 15:03:55] cmb@php.net

> 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.

So, is that the case?

------------------------------------------------------------------------
[2019-10-23 19:07:18] tessus@php.net

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.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=77288


--
Edit this bug report at https://bugs.php.net/bug.php?id=77288&edit=1


Thread (8 messages)

« previous php.bugs (#228548) next »