|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33956 Undefined reference; Cannot find libssl.
Submitted: 2005-08-02 03:01 UTC Modified: 2005-08-02 18:11 UTC
From: Jaguar at digitalmarble dot com Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 4.4.0 OS: Debian Linux 3.1 Sarge r0a i386
Private report: No CVE-ID: None
 [2005-08-02 03:01 UTC] Jaguar at digitalmarble dot com
libssl not found! Or so it says.

Upon configuring extensions configure dies "checking for SSL_CTX_set_ssl_version in -lss...". I know it has something to do with zlib 1.2.3 as I had the same problem when I configured apache 2.0.54. I resolved it with the configure flag --enable-deflate in apache but php (unless I missed it) doesn't seem to have such an option. I configured zlib in with openssl 0.9.8 and the configured openssl into apache (which required a patch due to some problems between apache 2.0.54, openssl 0.9.8 and zlib 1.2.2+). I suspect the problem is with zlib but that's all I can decipher. I have every possible place I could think configure would look.  I scoured google and tried countless forum suggestions. I'm working off php 4.4.0 cvs snapshot august 1st 2005. Perhaps someone can help?

Reproduce code:
./configure --with-openssl=/usr/local/ssl --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-bz2 --with-zlib=/usr/local --with-mcrypt=/usr --enable-ftp --with-regex=apache --with-swf

Actual result:
./configure output
checking for SSL_CTX_set_ssl_version in -lssl... no
configure: error: libssl not found!

configure:18083: checking for SSL_CTX_set_ssl_version in -lssl
configure:18102: gcc -o conftest -g -O2  -Wl,-rpath,/usr/local/ssl/lib -L/usr/local/ssl/lib  conftest.c -lssl  -lcrypto -lresolv -lm -ldl -lnsl  -lcrypto 1>&5
/usr/local/ssl/lib/libcrypto.a(c_zlib.o)(.text+0x78): In function `zlib_stateful_init':
: undefined reference to `inflateInit_'
/usr/local/ssl/lib/libcrypto.a(c_zlib.o)(.text+0xd7): In function `zlib_stateful_init':
: undefined reference to `deflateInit_'
/usr/local/ssl/lib/libcrypto.a(c_zlib.o)(.text+0x290): In function `zlib_stateful_compress_block':
: undefined reference to `deflate'
/usr/local/ssl/lib/libcrypto.a(c_zlib.o)(.text+0x315): In function `zlib_stateful_expand_block':
: undefined reference to `inflate'
/usr/local/ssl/lib/libcrypto.a(c_zlib.o)(.text+0x33f): In function `zlib_stateful_free_ex_data':
: undefined reference to `inflateEnd'
/usr/local/ssl/lib/libcrypto.a(c_zlib.o)(.text+0x34a): In function `zlib_stateful_free_ex_data':
: undefined reference to `deflateEnd'
collect2: ld returned 1 exit status
configure: failed program was:
#line 18091 "configure"
#include "confdefs.h"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-02 07:52 UTC]
We can't do miracles here..just fix your system, it's pretty screwed up right now.

 [2005-08-02 12:05 UTC] Jaguar at digitalmarble dot com
Regardless, if I recompile openssl without zlib this error disappears and php builds. Only problem is, I'd like to use zlib. If it is a system error, give me a helpful hint here and I'll start my hunt for it and leave you good people alone :).
 [2005-08-02 18:11 UTC]
You don't have the path to libz in your /etc/
And you don't install the openssl.pc in right place.

This should output something:

# pkg-config --libs openssl

Nevertheless: Not PHP bug.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 17:01:31 2024 UTC