Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107544 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 31213 invoked from network); 14 Oct 2019 13:18:01 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 14 Oct 2019 13:18:01 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id 88A422CF1CB for ; Mon, 14 Oct 2019 04:01:54 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS12581 212.79.160.0/19 X-Spam-Virus: No Received: from mailserver.kippdata.de (mailserver.kippdata.de [212.79.170.253]) by php-smtp3.php.net (Postfix) with ESMTP for ; Mon, 14 Oct 2019 04:01:53 -0700 (PDT) Received: from [10.0.110.6] ([192.168.179.144]) by mailserver.kippdata.de (8.13.5/8.13.5) with ESMTP id x9EB1nvQ006065; Mon, 14 Oct 2019 13:01:49 +0200 (CEST) To: "Helmut K. C. Tessarek" Cc: PHP internals References: <2e358c47-f07d-2bd0-dcbf-8ee1282f1ea1@evermeet.cx> <79bdc208-876f-ea0c-b529-010fe3d129bb@kippdata.de> <6de046b4-905c-e338-d640-14973a448910@evermeet.cx> <6d37qe5jhtm390dqs45hmgpkdvlm3lgj3i@4ax.com> <8f374f74-9896-2555-ffa0-d3559edb86ae@kippdata.de> Message-ID: <0cc918b7-5370-ece2-df43-898fb13a0c1b@kippdata.de> Date: Mon, 14 Oct 2019 13:01:47 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Envelope-From: Subject: Re: [PHP-DEV] configure bug with static openssl 1.1.1? - bugid 77288 From: rainer.jung@kippdata.de (Rainer Jung) Am 14.10.2019 um 11:06 schrieb Helmut K. C. Tessarek: > Hello, > > On 2019-10-14 04:12, Rainer Jung wrote: >> I 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 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 -lcrypto `$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