php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9161 Undefined symbols in static apache build using PHP 4.0.4pl1
Submitted: 2001-02-07 13:18 UTC Modified: 2001-06-02 20:39 UTC
From: tcyrus at noochee dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0.4pl1 OS: Solaris 2.6
Private report: No CVE-ID: None
 [2001-02-07 13:18 UTC] tcyrus at noochee dot com
apache_1.3.17 & php-4.0.4pl1 (Solaris 2.6 GCC 2.95.2) 

Atempting to static link php into apache.  Getting undefined symbols in apache 
(shown below).  config'd apache 1st, then config'd php using:
   ./configure --with-mysql --with-apache=../apache_1.3.17 --enable-track-vars
did a make and make install and all worked.  Then configured apache with:
    ./configure --prefix=/opt/apache --activate-module=src/modules/php4/libphp4.a
and make fails with the following.

Suggestions?

gcc  -DSOLARIS2=260 -I/opt/local/src/php-4.0.4pl1 -I/opt/local/src/php-4.0.4pl1/
main -I/opt/local/src/php-4.0.4pl1/main -I/opt/local/src/php-4.0.4pl1/Zend -I/op
t/local/src/php-4.0.4pl1/Zend -I/opt/local/src/php-4.0.4pl1/TSRM -I/opt/local/sr
c/php-4.0.4pl1/TSRM -I/opt/local/src/php-4.0.4pl1 -DUSE_EXPAT -I./lib/expat-lite
 -DNO_DL_NEEDED `./apaci`    \
      -o httpd buildmark.o modules.o modules/php4/libphp4.a modules/standard/lib
standard.a main/libmain.a ./os/unix/libos.a ap/libap.a  lib/expat-lite/libexpat.
a  -R/usr/ucblib -R/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2  -L/usr/uc
blib -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2 -Lmodules/php4 -L../mo
dules/php4 -L../../modules/php4 -lmodphp4  -lpam  -ldl -lresolv -lresolv -lm -ld
l -lcrypt -lnsl -lsocket  -lsocket -lgcc   -lsocket -lnsl
Undefined                       first referenced
 symbol                             in file
php_register_variable               modules/php4/libphp4.a(mod_php4.o)
core_globals                        modules/php4/libphp4.a(mod_php4.o)
sapi_startup                        modules/php4/libphp4.a(mod_php4.o)
sapi_shutdown                       modules/php4/libphp4.a(mod_php4.o)
zend_ini_rshutdown                  modules/php4/libphp4.a(mod_php4.o)
php_module_shutdown_for_exec        modules/php4/libphp4.a(mod_php4.o)
apache_php_module_main              modules/php4/libphp4.a(mod_php4.o)
php_request_shutdown_for_exec       modules/php4/libphp4.a(mod_php4.o)
zend_hash_apply                     modules/php4/libphp4.a(mod_php4.o)
executor_globals                    modules/php4/libphp4.a(mod_php4.o)
zend_hash_destroy                   modules/php4/libphp4.a(mod_php4.o)
_estrdup                            modules/php4/libphp4.a(mod_php4.o)
zend_error                          modules/php4/libphp4.a(mod_php4.o)
sapi_get_default_content_type       modules/php4/libphp4.a(mod_php4.o)
php_module_shutdown_wrapper         modules/php4/libphp4.a(mod_php4.o)
sapi_globals                        modules/php4/libphp4.a(mod_php4.o)
zend_startup_module                 modules/php4/libphp4.a(mod_php4.o)
php_request_shutdown                modules/php4/libphp4.a(mod_php4.o)
php_handle_aborted_connection       modules/php4/libphp4.a(mod_php4.o)
zend_hash_add_or_update             modules/php4/libphp4.a(mod_php4.o)
zend_alter_ini_entry                modules/php4/libphp4.a(mod_php4.o)
apache_module_entry                 modules/php4/libphp4.a(mod_php4.o)
zend_hash_merge_ex                  modules/php4/libphp4.a(mod_php4.o)
zend_hash_init                      modules/php4/libphp4.a(mod_php4.o)
empty_string                        modules/php4/libphp4.a(mod_php4.o)
_efree                              modules/php4/libphp4.a(mod_php4.o)
php_module_startup                  modules/php4/libphp4.a(mod_php4.o)
ld: fatal: Symbol referencing errors. No output written to httpd

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-14 14:11 UTC] sniper@php.net
Try doing 'make clean ; make install' for PHP 4 and then try making Apache 
again.

--Jani

 [2001-02-15 13:23 UTC] tcyrus at noochee dot com
No help.  I even started totally from scratch (removing all apache and php files and re-untaring them) and I get the same error.  Unfortunatley when I build Apache to run PHP dynamically, when I run: ./apachectl configtest
the error I get is:

Syntax error on line 207 of /usr/local/apache17/conf/httpd.conf:
Cannot load /usr/local/apache17/libexec/libphp4.so into server: ld.so.1: /usr/local/apache17/bin/httpd: fatal: relocation error: file /usr/local/apache17/libexec/libphp4.so: symbol pcre_free: referenced symbol not found

So on Solaris 2.6 (gcc 2.95.2) I'm stuck either way (static or dynamic) since both give me undefines.

Any other suggestions?
 [2001-02-19 11:40 UTC] tcyrus at noochee dot com
No help.  I even started totally from scratch (removing all apache and php files and re-untaring them) and I get the same error.  Unfortunatley when I build Apache to run PHP dynamically, when I run: ./apachectl configtest
the error I get is:

Syntax error on line 207 of /usr/local/apache17/conf/httpd.conf:
Cannot load /usr/local/apache17/libexec/libphp4.so into server: ld.so.1: /usr/local/apache17/bin/httpd: fatal: relocation error: file /usr/local/apache17/libexec/libphp4.so: symbol pcre_free: referenced symbol not found

So on Solaris 2.6 (gcc 2.95.2) I'm stuck either way (static or dynamic) since both give me undefines.

Any other suggestions?
 [2001-05-29 16:05 UTC] sniper@php.net
Do you get this same with PHP 4.0.5 ?


 [2001-05-29 16:18 UTC] tcyrus at noochee dot com
I fixed the problem by NOT using GCC at all on my Solaris 2.6 box, but instead used Sun's C compiler (WorkShop 4.2.1).  There appears to be a problem with using GCC on Solaris. I had even tried using both gcc and the GCC ld, but no help.  Only using 100% Sun (no GCC stuff) compilers/loaders got it to work on Solaris 2.6
 [2001-06-02 20:39 UTC] sniper@php.net
If it works now -> closed.

I myself have compiled PHP + Apache on Solaris 2.6 many
times with using GNU tools. So I guess you might have
had something broken / misconfigured on your system.

Anyways, I'm glad you got it to work. And using the
SUN cc is actually better. Since it does make faster
binary code on Sparcs than gcc.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 06:01:29 2024 UTC