Bug #69510 [Com]: configure does not find openssl libraries on multiarch system
| From: | mail at cebe dot cc | Date: | Thu, 23 Apr 2015 10:34:39 +0000 |
| Subject: | Bug #69510 [Com]: configure does not find openssl libraries on multiarch system | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-192290@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69510&edit=1
ID: 69510
Comment by: mail at cebe dot cc
Reported by: mail at cebe dot cc
Summary: configure does not find openssl libraries on
multiarch system
Status: Open
Type: Bug
Package: OpenSSL related
Operating System: Debian wheezy 7.8
PHP Version: 5.6.8
Block user comment: N
Private report: N
New Comment:
After more investigation I found that I could solve it by installing pkg-config which was then able
to find the lib.
apt-get install pkg-config
Previous Comments:
------------------------------------------------------------------------
[2015-04-23 10:18:02] mail at cebe dot cc
It actually works when adding
--with-libdir=lib/x86_64-linux-gnu
still I think the configure script should be aware of it.
------------------------------------------------------------------------
[2015-04-23 09:41:40] mail at cebe dot cc
Description:
------------
I am trying to compile PHP on a clean install of debian wheezy (see commands to reproduce below).
./configure fails with the following messages:
checking for OpenSSL support... yes
checking for Kerberos support... no
checking whether to use system default cipher list instead of hardcoded value... no
checking for DSA_get_default_method in -lssl... yes
checking for X509_free in -lcrypto... yes
checking for RAND_egd... no
checking for pkg-config... no
configure: error: Cannot find OpenSSL's libraries
The problem is that the configure script does find the header files but not the libraries itself
because they are not in the default location because of debian multiarch support. ld however is
already configured to find the libraries in this path.
Here are the libs:
$ find / |grep libssl.so
/usr/lib/x86_64-linux-gnu/libssl.so
/usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
Here is the part of ld config:
$ cat /etc/ld.so.conf.d/x86_64-linux-gnu.conf
# Multiarch support
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
I think the PHP configure script should not fail hard here if ld is able to find the libraries on
its own. There is no need to take any action adding it to the ld command in this case.
Test script:
---------------
apt-get install -y git curl build-essential autoconf bison re2c libxml2-dev openssl libssl-dev
git clone https://github.com/php/php-src
/opt/php/php-src
cd /opt/php/php-src
git checkout php-5.6.8
./buildconf --force
./configure --prefix=/opt/php/php-dist/php-5.6.8-custom --with-openssl
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69510&edit=1