php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16970 Unable to load libphp_java.so - core_globals not found
Submitted: 2002-05-02 12:25 UTC Modified: 2002-06-21 13:23 UTC
From: Daniel dot Schneider at NOSPAM dot tecfa dot unige dot ch Assigned:
Status: Closed Package: Java related
PHP Version: 4.2.0 OS: Solaris 8
Private report: No CVE-ID: None
 [2002-05-02 12:25 UTC] Daniel dot Schneider at NOSPAM dot tecfa dot unige dot ch
Configuration information:
--------------------------

* System: 
   Solaris 8
* PHP config:
./configure --prefix=/usr/local --enable-versioning --enable-libgcc
--with-apxs=/usr/local/apache/bin/apxs --with-zlib=/usr/local
--enable-bcmath --enable-debug --enable-magic-quotes --with-gdbm
--with-mcrypt --with-mhash --with-mysql
--with-ldap=/usr/local/openldap --with-pdflib --with-xml
--with-jpeg-dir=/usr/local --with-png-dir=/usr/local
--with-zlib-dir=/usr/local --with-gd --enable-xslt --with-xslt-sablot
--with-dom=/usr/local/lib --with-java

* Compiler and Java Versions: I tried several combinations

gcc 2.95.3, gcc 3.0.4
java 1.3.1, java 1.4

* Problem: unreferenced symbol in libphp_java.so

ldd -d /usr/local/lib/php/extensions/debug-non-zts-20010901/libphp_java.so
symbol not found: core_globals (/usr/local/lib/php/extensions/debug-non-zts-20010901/libphp_java.so)

Or seen from the apache error log (the php module loads and runs fine otherwise)

PHP Warning: Unable to load dynamic library
'/usr/local/lib/php/extensions/debug-non-zts-20010901/libphp_java.so'
- ld.so.1: /usr/local/apache/bin/httpd: fatal: relocation error: file
/usr/local/lib/php/extensions/debug-non-zts-20010901/libphp_java.so:
symbol core_globals: referenced symbol not found in Unknown on line 0

Sorry I am not a C programmer and can't hint at a solution.
Certainly libphp_java.so is NOT looking for some other dynamic library it can't
find ... I know that much :)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-03 09:03 UTC] Daniel dot Schneider at NOSPAM dot tecfa dot unige dot ch
I managed to get it work now, but don't know really why.
Basically:
- I installed/compiled all gnu tools (binutils 2.12, autoconf, automake all latest versions)
- added the -with-gnu-ld option to php's configure.
- recompiled apache too with the same gcc (3.0.4)

Can't understand why it works now, since 'core_globals'
is still missing from libphp_java.so if I look at it from 'ldd -d libphp_java.so'

I also tried to compile with the workshop 6.0 update 2 compiler and got the same problem
 [2002-06-21 13:23 UTC] hholzgra@php.net
it is a linker issue triggerd by the
--enable-versioning configure option

do *not* use this option unless you 
have to have php 3 & 4 modules loaded
within the same webserver

solaris and gnu linkers seem to have slightly 
different visibility rules regarding shared
objects loading other shared objects

by configuring with --enable-versioning you
reduce the symbols exported by the php apache 
module, so that you can load php3 and php4 modules
into the same webserver without conflicts

the GNU linker restricts symbol visibility 
only towards whatever a .so is loaded into,
not what itself loads later while the solaris
linker seems to limit visibility in both directions
so that php extensions do not find the symbols
they need from the php module itself when loaded



 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Dec 07 00:03:49 2021 UTC