Re: configure bug with static openssl 1.1.1? - bugid 77288
| From: | Rainer Jung | Date: | Mon, 14 Oct 2019 11:01:47 +0000 |
| Subject: | Re: configure bug with static openssl 1.1.1? - bugid 77288 | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-107544@lists.php.net to get a copy of this message | ||
Am 14.10.2019 um 11:06 schrieb Helmut K. C. Tessarek:
Hello, On 2019-10-14 04:12, Rainer Jung wrote:Thanks, the relevant lines are: configure:18782: cc -o conftest -I/usr/local/include -fvisibility=hidden -Wl,-rpath,/usr/local/ssl-1.1.1/lib -L/usr/local/ssl-1.1.1/lib -L/usr/local/lib conftest.c -lcrypto -lrt -lm -ldl -lnsl -lgpg-error -lsystemd-daemon -lxml2 -lz -lm -ldl >&5 configure:18782: $? = 0 configure:18791: result: yes configure:18934: checking for SSL_CTX_set_ssl_version in -lssl configure:18959: cc -o conftest -I/usr/local/include -fvisibility=hidden -Wl,-rpath,/usr/local/ssl-1.1.1/lib -L/usr/local/ssl-1.1.1/lib -L/usr/local/lib conftest.c -lssl -lcrypto -lrt -lm -ldl -lnsl -lgpg-error -lsystemd-daemon -lxml2 -lz -lm -ldl -lcrypto >&5 /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 /lib64/libpthread.so.0: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status configure:18959: $? = 1 configure: failed program was: So although "-pthread" is part of OPENSSL_LIBS, it doesn't get used during configure (which uses hard-coded 'LIBS=" -lssl -lcryptoI think what he means is doing:Yep, I remember I had tried that as well, but I just went through it again to get the info you requested: export PKG_CONFIG_PATH=/usr/local/ssl-1.1.1/lib/pkgconfig export OPENSSL_CFLAGS="-I/usr/local/ssl-1.1.1/include" export OPENSSL_LIBS="-L/usr/local/ssl-1.1.1/lib -lssl -lcrypto -ldl -pthread"If it doesn't work, it would be helpful, if you could then post again your config.log so we can understand the remaining problems.https://evermeet.cx/pub/logs/config.php72.log
$PKG_CONFIG --libs openssl $LIBS"' in this check). So a checken or egg problem.
Could you do yet another test? First manipulate the configure script with the following two commands:
cp -p configure configure.saved
# the following is one long line
sed -e 's#PKG_CONFIG --libs openssl#PKG_CONFIG --libs --static openssl#g' configure.saved > configure
and then redo the whole build including running configure. If that works fine, it might be possible to add a configure flag for static OpenSSL linking.
Thanks and regards,
Rainer