php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33338 undefined reference to `OPENSSL_add_all_algorithms_noconf'
Submitted: 2005-06-14 15:17 UTC Modified: 2006-01-02 09:02 UTC
Votes:3
Avg. Score:4.3 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: wim at godden dot net Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5CVS-2005-06-14 OS: Redhat Linux
Private report: No CVE-ID: None
 [2005-06-14 15:17 UTC] wim at godden dot net
Description:
------------
This may look like a duplicate for bug #22305, but in fact, all solutions posted there have not produced any results.

Configuration :
PHP 5.0.4
OpenSSL 0.9.7g
Apache 1.3.31

Installed latest OpenSSL, removed all previous versions (libraries and headers and even the whole /usr/local/ssl), installed 0.9.7g, added it to /etc/ld.so.conf
OpenSSL is detected correctly, but make results in :

ext/openssl/openssl.lo(.text+0xd83): In function `zm_startup_openssl':
/root/install/php-5.0.4/ext/openssl/openssl.c:589: undefined reference to `OPENSSL_add_all_algorithms_noconf'
/usr/local/ssl/lib/libssl.a(s2_srvr.o)(.text+0x1644): In function `request_certificate':
: undefined reference to `EVP_MD_CTX_init'
/usr/local/ssl/lib/libssl.a(s2_srvr.o)(.text+0x165c): In function `request_certificate':
: undefined reference to `EVP_DigestInit_ex'
/usr/local/ssl/lib/libssl.a(s2_srvr.o)(.text+0x174c): In function `request_certificate':
: undefined reference to `EVP_MD_CTX_cleanup'
/usr/local/ssl/lib/libssl.a(s2_clnt.o)(.text+0x1228): In function `client_certificate':
: undefined reference to `EVP_MD_CTX_init'
/usr/local/ssl/lib/libssl.a(s2_clnt.o)(.text+0x1240): In function `client_certificate':
: undefined reference to `EVP_DigestInit_ex'
/usr/local/ssl/lib/libssl.a(s2_clnt.o)(.text+0x1312): In function `client_certificate':
: undefined reference to `EVP_MD_CTX_cleanup'
/usr/local/ssl/lib/libssl.a(s2_lib.o)(.text+0x232): In function `ssl2_generate_key_material':
: undefined reference to `EVP_MD_CTX_init'
/usr/local/ssl/lib/libssl.a(s2_lib.o)(.text+0x2ce): In function `ssl2_generate_key_material':
: undefined reference to `EVP_DigestInit_ex'
and numerous more of these.

Any ideas ?


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-14 15:30 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-06-14 17:23 UTC] wim at godden dot net
CVS snapshot results in same error :
ext/openssl/.libs/openssl.o(.text+0xd83): In function `zm_startup_openssl':
/root/php5-200506141430/ext/openssl/openssl.c:589: undefined reference to `OPENSSL_add_all_algorithms_noconf'
/usr/local/ssl/lib/libssl.a(s2_srvr.o)(.text+0x1644): In function `request_certificate':
: undefined reference to `EVP_MD_CTX_init'
/usr/local/ssl/lib/libssl.a(s2_srvr.o)(.text+0x165c): In function `request_certificate':
: undefined reference to `EVP_DigestInit_ex'
/usr/local/ssl/lib/libssl.a(s2_srvr.o)(.text+0x174c): In function `request_certificate':
: undefined reference to `EVP_MD_CTX_cleanup'
/usr/local/ssl/lib/libssl.a(s2_clnt.o)(.text+0x1228): In function `client_certificate':
: undefined reference to `EVP_MD_CTX_init'
....
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
 [2005-06-14 18:02 UTC] sniper@php.net
Are you sure you really removed ALL existing old Openssl headers?? Please try this:

# find / -name 'evp.h'

 [2005-06-14 18:17 UTC] wim at godden dot net
The result :
/root>find / -name 'evp.h'
/root/install/openssl-0.9.7g/crypto/evp/evp.h
/root/install/openssl-0.9.7g/include/openssl/evp.h
/root/install/openssl-0.9.7d/crypto/evp/evp.h
/root/install/openssl-0.9.7d/include/openssl/evp.h
/usr/local/ssl/include/openssl/evp.h
/root>
 [2005-06-15 00:23 UTC] sniper@php.net
You compiled Openssl yourself? Can you please try using the precompiled packages?

 [2005-06-15 00:24 UTC] sniper@php.net
And remove EVERY instance of openssl first from your machine!
(including sources)

 [2005-06-15 01:31 UTC] wim at godden dot net
I can's possibly use packages in OpenSSL due to company policy (we are not allowed to use certain encryption techniques for level reasons). I don't see the point in doing so, as I'm compiling PHP from source as well. The system is clean of any OpenSSL remains (check every file in the OpenSSL package, removed them all).
Anything else you can suggest to further debug things ?
 [2005-06-15 15:28 UTC] sniper@php.net
Please provide the configure line you used for openssl.
This works fine as long as your headers and libraries match..

 [2005-06-15 15:37 UTC] wim at godden dot net
Configure line :
./config no-mdc2

But I just tried with just ./config and it results in the same thing.
 [2005-06-17 19:22 UTC] sniper@php.net
I tried myself, installed openssl with the default stuff and compiled php with it (I have now 2 versions installed) and it works just fine. 

Try this:
# rm config.cache && ./configure --disable-all --disable-cgi --with-openssl=/usr/local/ssl/ 
# make clean && make

Exactly WHAT Redhat you have? (version)

 [2005-06-18 01:01 UTC] wim at godden dot net
RedHat 7.2, but very well updated.

Anyway, --disable-all and --disable-cgi seems to work.
Also, "configure --with-openssl=/usr/local/ssl --disable-all" works fine. But when I remove the --disable-all, I get the same problems. Any suggestions on how to narrow it down without having to go through each single option ?
 [2005-06-19 00:00 UTC] sniper@php.net
What if you started with telling what the full configure line is you use?

 [2005-06-19 00:31 UTC] wim at godden dot net
./configure  --with-openssl=/usr/local/ssl --disable-all already makes it fail.

My normal ./configure is :
 ./configure  --with-apxs=/usr/local/apache/bin/apxs --with-imap --with-mysql=/usr/local/mysql --with-openssl=/usr/local/ssl --with-pear --with-mcrypt --with-pcre
--with-zlib --with-gd --enable-exif --with-pdflib=/usr/local --with-curl --with-dom=/usr/local --with-qtdom
 [2005-06-19 00:36 UTC] sniper@php.net
Now you say it didn't work?! You propably just didn't do "rm -f config.cache && make clean" between tests..

Now, try without --with-imap and --with-curl first.
(both c-client and curl libraries/headers might contain SSL related stuff, you need to recompile those too using the new openssl!)

 [2005-06-19 01:41 UTC] wim at godden dot net
I removed the PHP source directory and did :
 ./configure \
--with-apxs=/usr/local/apache/bin/apxs \
--with-openssl=/usr/local/ssl

Same error.
 [2005-06-19 01:50 UTC] sniper@php.net
Does this work:

# ./configure --disable-all \
--with-apxs=/usr/local/apache/bin/apxs \
--with-openssl=/usr/local/ssl

??

 [2005-06-19 02:09 UTC] wim at godden dot net
That works perfectly.
 [2005-06-19 21:38 UTC] sniper@php.net
Then add the other options one by one (KEEP the --disable-all in there!) and see which causes the error.

 [2005-06-19 23:04 UTC] wim at godden dot net
Small update : if I don't add --enable-libxml, it seems to work just fine. I have libXML 2.6.8
 [2005-06-20 00:09 UTC] sniper@php.net
Please DO NOT add such huge configure outputs here unless asked for! I deleted the comment as it didn't hold any useful information anyway.

1. Send me the Makefile's of configure without --enable-libxml and with it to sniper@php.net

2. What does this output:
# xml2-config --libs --cflags

 [2005-06-22 11:01 UTC] wim at godden dot net
Output of xml2-config --libs --cflags :
-L/usr/local/lib -lxml2 -lz -lpthread -lm
-I/usr/local/include/libxml2

Makefiles have been sent to you.
 [2005-06-27 00:41 UTC] sniper@php.net
And you're absolutely sure there aren't ANY other OpenSSL header files anywhere in your system? Are you able to reproduce this on any other machine??

 [2005-07-17 20:41 UTC] wim at godden dot net
There are no other SSL files on the system. I've removed every instance of every file that was either installed using 'make install' or was in the package.
 [2005-07-18 02:42 UTC] sniper@php.net
Can you or can you not reproduce this on any other machines?

 [2005-07-18 12:40 UTC] wim at godden dot net
This is the only machine with this specific configuration. The other machines are running Debian. The only one running a webserver there, doesn't even run PHP.

Basically, this machine is the only one running PHP on Linux.
 [2005-07-19 02:41 UTC] sniper@php.net
As soon as someone else can reproduce this, I will reopen and look into this issue.
 [2006-01-02 09:02 UTC] sniper@php.net
Apparently nobody else has had this problem -> user error -> bogus.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jun 01 09:01:26 2025 UTC