php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45711 Undefined References
Submitted: 2008-08-05 00:55 UTC Modified: 2008-08-14 01:00 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: dmass83 at hotmail dot com Assigned:
Status: No Feedback Package: Compile Failure
PHP Version: 5.2.6 OS: Solaris 10
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dmass83 at hotmail dot com
New email:
PHP Version: OS:

 

 [2008-08-05 00:55 UTC] dmass83 at hotmail dot com
Description:
------------
I have encountered an issue installing php-5.2.6 on Solaris 10.

-openssl-0.9.8h

I have encountered the following error:

Undefined                       first referenced
 symbol                             in file
libiconv_set_relocation_prefix 	    /usr/local/lib/libintl.so 
EVP_CIPHER_CTX_block_size           ext/openssl/.libs/openssl.o
ld: fatal: Symbol referencing errors. No output written to sapi/cli/php
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1


I am new to the php installation and not real sure where to go from here.

I am using the following for "configure":
----------------------------------------------------
./configure \ --prefix=$APACHE_PREFIX \ --sysconfdir=$APACHE_PREFIX/conf \ --with-config-file-path=$APACHE_PREFIX/conf \ --disable-debug \ --with-pic \ --with-curl=$CURL_PREFIX \ --disable-rpath \ --enable-inline-optimization \ --with-png-dir=/usr \ --with-gd \ --enable-gd-native-ttf \ --with-ttf \ --with-dom=/usr/local \ --with-expat-dir=/usr/local \ --with-gettext \ --with-jpeg-dir=/usr/local \ --with-openssl=$OPENSSL_PREFIX \ --with-png \ --with-regex=system \ --with-xml \ --with-zlib \ --with-layout=GNU \ --enable-bcmath \ --enable-exif \ --enable-ftp \ --enable-magic-quotes \  --enable-safe-mode \ --enable-sockets \ --enable-sysvsem \ --enable-sysvshm \ --enable-discard-path \ --enable-wddx \ --with-pear \ --with-kerberos=/usr/kerberos \ --with-ldap \ --with-mcrypt=$MCRYPT_PREFIX \ --with-oci8=$ORACLE_HOME \ --enable-memory-limit \ --enable-shmop \ --enable-versioning \ --enable-calendar \ --enable-dbx \ --enable-dio \ --enable-mcal \ --with-apxs2=$APACHE_PREFIX/bin/apxs \


I have searched many forums but have found no resolution to this issue.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-05 00:58 UTC] jani@php.net
Start by reducing your configure line to something that is actually supported by PHP. You have dozens of configure options there which don't even exist anymore. Try this first:

# rm config.cache && ./configure --disable-all --with-openssl

 [2008-08-06 14:28 UTC] dmass83 at hotmail dot com
Greetings,
I tried the suggested method of removing everything from the configure except openssl and that worked.  Additionally, I went through and removed any options that are no longer used with php5.  

Here is the new configure:

./configure \ --prefix=$APACHE_PREFIX \ --sysconfdir=$APACHE_PREFIX/conf \ --with-config-file-path=$APACHE_PREFIX/conf \ --with-pic \ --with-curl=$CURL_PREFIX \ --disable-rpath \ --enable-inline-optimization \ --with-png-dir=/usr \   --enable-gd-native-ttf \ --with-ttf \ --with-expat-dir=/usr/local \ --with-gettext \ --with-jpeg-dir=/usr/local \     --with-openssl=$OPENSSL_PREFIX \ --with-regex=system \ --with-libxml-dir \ --with-zlib \ --with-layout=GNU \   --enable-bcmath \ --enable-exif \ --enable-ftp \ --enable-magic-quotes \ --enable-safe-mode \ --enable-sockets \    --enable-sysvsem \ --enable-sysvshm \ --enable-discard-path \  --enable-wddx \ --with-pear \   --with-kerberos=/usr/local/krb5 \ --with-ldap \ --with-mysql \ --with-mcrypt=$MCRYPT_PREFIX \ --with-oci8=$ORACLE_HOME \     --enable-memory-limit \ --enable-shmop \ --enable-versioning \ --enable-calendar \ --enable-dbx \ --enable-dio \     --with-xpm-dir= \ --with-freetype-dir= \ --with-apxs2=$APACHE_PREFIX/bin/apxs \

I still get the same error, therefore it is not related to any options that don't exist anymore.

Thanks in advance.
 [2008-08-06 16:44 UTC] jani@php.net
Get the latest snapshot here: http://snaps.php.net/php5.2-latest.tar.gz
And provide the shortest possible configure line which still causes the problem. Note: You STILL have non-existing options there. There is a note in the end of the configure run which points to the unknown options..
 [2008-08-14 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-07-24 17:30 UTC] mrpalassis at hotmail dot com
We experience the same error with PHP 5.3.0:


Undefined                       first referenced
 symbol                             in file
EVP_MD_size                         ext/openssl/.libs/openssl.o
EVP_CIPHER_iv_length                ext/openssl/.libs/openssl.o
EVP_CIPHER_block_size               ext/openssl/.libs/openssl.o
EVP_CIPHER_key_length               ext/openssl/.libs/openssl.o
EVP_CIPHER_CTX_block_size           ext/openssl/.libs/openssl.o
ld: fatal: Symbol referencing errors. No output written to sapi/cli/php
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

It appears there is a difference between what is expected in the PHP 5.3.0 build and openssl.

$ nm $BUILD/php-5.3.0/ext/openssl/.libs/openssl.o | egrep "EVP_MD_size|EVP_CIPHER_"
[452]   |         0|       0|NOTY |GLOB |0    |UNDEF  |EVP_CIPHER_block_size
[468]   |         0|       0|NOTY |GLOB |0    |UNDEF  |EVP_CIPHER_CTX_block_size
[520]   |         0|       0|NOTY |GLOB |0    |UNDEF  |EVP_CIPHER_iv_length
[424]   |         0|       0|NOTY |GLOB |0    |UNDEF  |EVP_CIPHER_key_length
[638]   |         0|       0|NOTY |GLOB |0    |UNDEF  |EVP_MD_size

$ nm $APACHE_HOME/bin/openssl | egrep "EVP_MD_size|EVP_CIPHER_"
[3519]  |    555440|       0|FUNC |GLOB |0    |UNDEF  |EVP_CIPHER_CTX_cleanup
[3452]  |    555392|       0|FUNC |GLOB |0    |UNDEF  |EVP_CIPHER_CTX_init
[3571]  |    551036|       0|FUNC |GLOB |0    |UNDEF  |EVP_CIPHER_CTX_set_flags
[3365]  |    551084|       0|FUNC |GLOB |0    |UNDEF  |EVP_CIPHER_CTX_set_padding
[3594]  |    551000|       0|FUNC |GLOB |0    |UNDEF  |EVP_CIPHER_iv_length
[4268]  |    551048|       0|FUNC |GLOB |0    |UNDEF  |EVP_CIPHER_nid


$ $APACHE_HOME/bin/openssl version
OpenSSL 0.9.8k 25 Mar 2009

When using PHP 4.3.9 there are no compile errors.
Perhaps this data point will help?

-mp
 [2009-07-24 17:41 UTC] mrpalassis at hotmail dot com
Some more info...

These symbols do show in the compiled openssl binaries:

$ nm $APACHE_HOME/lib/libcrypto.so | egrep "EVP_MD_size|EVP_CIPHER_"
[6239]  |    761792|      88|FUNC |GLOB |3    |14     |EVP_CIPHER_asn1_to_param
[4525]  |    762432|       8|FUNC |GLOB |3    |14     |EVP_CIPHER_block_size
[4548]  |    762464|      12|FUNC |GLOB |3    |14     |EVP_CIPHER_CTX_block_size
[6291]  |    762496|       8|FUNC |GLOB |3    |14     |EVP_CIPHER_CTX_cipher
[3934]  |    744576|     184|FUNC |GLOB |3    |14     |EVP_CIPHER_CTX_cleanup
[5938]  |    763040|      16|FUNC |GLOB |3    |14     |EVP_CIPHER_CTX_clear_flags
[3092]  |    744320|     176|FUNC |GLOB |3    |14     |EVP_CIPHER_CTX_ctrl
[6158]  |    744512|      12|FUNC |GLOB |3    |14     |EVP_CIPHER_CTX_flags
[4515]  |    732672|      44|FUNC |GLOB |3    |14     |EVP_CIPHER_CTX_free
[6057]  |    762560|       8|FUNC |GLOB |3    |14     |EVP_CIPHER_CTX_get_app_data
[3581]  |    744288|      24|FUNC |GLOB |3    |14     |EVP_CIPHER_CTX_init
[6406]  |    744544|      12|FUNC |GLOB |3    |14     |EVP_CIPHER_CTX_iv_length
[5648]  |    762688|       8|FUNC |GLOB |3    |14     |EVP_CIPHER_CTX_key_length
[3740]  |    730592|      68|FUNC |GLOB |3    |14     |EVP_CIPHER_CTX_new
[3789]  |    762720|      12|FUNC |GLOB |3    |14     |EVP_CIPHER_CTX_nid
[6103]  |    732960|      68|FUNC |GLOB |3    |14     |EVP_CIPHER_CTX_rand_key
[3278]  |    762592|       8|FUNC |GLOB |3    |14     |EVP_CIPHER_CTX_set_app_data
[4757]  |    763008|      16|FUNC |GLOB |3    |14     |EVP_CIPHER_CTX_set_flags
[6182]  |    732736|     144|FUNC |GLOB |3    |14     |EVP_CIPHER_CTX_set_key_length
[4827]  |    732896|      40|FUNC |GLOB |3    |14     |EVP_CIPHER_CTX_set_padding
[3333]  |    763072|      12|FUNC |GLOB |3    |14     |EVP_CIPHER_CTX_test_flags
[3215]  |    762528|       8|FUNC |GLOB |3    |14     |EVP_CIPHER_flags
[3739]  |    761600|     172|FUNC |GLOB |3    |14     |EVP_CIPHER_get_asn1_iv
[4247]  |    762624|       8|FUNC |GLOB |3    |14     |EVP_CIPHER_iv_length
[3420]  |    762656|       8|FUNC |GLOB |3    |14     |EVP_CIPHER_key_length
[5320]  |    745792|       8|FUNC |GLOB |3    |14     |EVP_CIPHER_nid
[4635]  |    762016|      88|FUNC |GLOB |3    |14     |EVP_CIPHER_param_to_asn1
[4821]  |    761888|     128|FUNC |GLOB |3    |14     |EVP_CIPHER_set_asn1_iv
[3851]  |    762112|     316|FUNC |GLOB |3    |14     |EVP_CIPHER_type
[4440]  |    762848|       8|FUNC |GLOB |3    |14     |EVP_MD_size
[4664]  |    897184|     812|FUNC |GLOB |3    |14     |PEM_get_EVP_CIPHER_INFO

$ nm $APACHE_HOME/lib/libssl.so | egrep "EVP_MD_size|EVP_CIPHER_"
[786]   |         0|       0|FUNC |GLOB |0    |UNDEF  |EVP_CIPHER_block_size
[1324]  |         0|       0|FUNC |GLOB |0    |UNDEF  |EVP_CIPHER_CTX_block_size
[639]   |         0|       0|FUNC |GLOB |0    |UNDEF  |EVP_CIPHER_CTX_cipher
[1185]  |         0|       0|FUNC |GLOB |0    |UNDEF  |EVP_CIPHER_CTX_cleanup
[982]   |         0|       0|FUNC |GLOB |0    |UNDEF  |EVP_CIPHER_CTX_init
[1139]  |         0|       0|FUNC |GLOB |0    |UNDEF  |EVP_CIPHER_CTX_iv_length
[801]   |         0|       0|FUNC |GLOB |0    |UNDEF  |EVP_CIPHER_CTX_key_length
[660]   |         0|       0|FUNC |GLOB |0    |UNDEF  |EVP_CIPHER_flags
[823]   |         0|       0|FUNC |GLOB |0    |UNDEF  |EVP_CIPHER_iv_length
[873]   |         0|       0|FUNC |GLOB |0    |UNDEF  |EVP_CIPHER_key_length
[1132]  |         0|       0|FUNC |GLOB |0    |UNDEF  |EVP_MD_size


Also looks like some others have had similar problems:
http://marc.info/?l=php-install&m=119696768506493&w=2
http://www.phpbuilder.com/board/archive/index.php/t-10357481.html
 [2010-04-13 21:37 UTC] tkevans at tkevans dot com
Still seems to be a problem with 5.3.2, AIX 5.3, and OpenSSL 1.0
 [2010-06-07 02:35 UTC] jonsmith04 at hotmail dot com
This is potentially a zlib/openssl issue. I had a source compiled version of php 5.3.2 with openssl (0.9.8) working just fine. I tried to add zlib (1.2.5) for pear and starting getting similar errors. I upgraded and compiled openssl (1.0.0a) with no-zlib configure option, did a make distclean on php and recompiled with openssl and zlib enabled, and it worked just fine. YMMV.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC