php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69510 configure does not find openssl libraries on multiarch system
Submitted: 2015-04-23 09:41 UTC Modified: 2015-04-23 10:35 UTC
From: mail at cebe dot cc Assigned:
Status: Closed Package: OpenSSL related
PHP Version: 5.6.8 OS: Debian wheezy 7.8
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
38 - 4 = ?
Subscribe to this entry?

 
 [2015-04-23 09:41 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-23 10:18 UTC] 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 10:34 UTC] mail at cebe dot cc
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
 [2015-04-23 10:35 UTC] mail at cebe dot cc
-Status: Open +Status: Closed
 [2015-04-23 10:35 UTC] mail at cebe dot cc
closing this then, sorry for the noise.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 20:01:29 2024 UTC