php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23383 linker commands *might* be wrong
Submitted: 2003-04-28 10:50 UTC Modified: 2003-07-15 13:06 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:0 of 0 (0.0%)
From: msopacua at idg dot nl Assigned: msopacua (profile)
Status: Wont fix Package: XSLT related
PHP Version: 4.3.1 OS: AIX 4.3.x
Private report: No CVE-ID: None
 [2003-04-28 10:50 UTC] msopacua at idg dot nl
Below a copy of a bugreport filed with Gingerall. Working with 
Juha on resolving this. Not sure yet, whether this is only a 
problem with Sablotron, linking (or even a libtool error), or C/C++ 
issue. 
 
Issue may apply to certain builds even. 
Verified has been though, that removing ext/xslt from the 
equation, resolves the apache startup problem, mentioned below, 
therefore categorizing it here. 
 
Assigning to myself in a jiffy and currently verifying PHP_4_3 
branch. 
 
Original report (http://bugzilla.gingerall.cz/show_bug.cgi?id=1553): 
Several users have reported problems on AIX platform. 
 
Juha Moisio has provided some steps which make it work well, 
apart from a few warnings about duplicate symbols (this may also 
be resolved). 
 
The steps involved show, that the linker commands generated by 
libtool are not sufficient to create reliable shared libraries on AIX. 
 
This could very well be, a libtool issue, but we should work around 
it, or at least provide some detailed info to the libtool guys on how 
to resolve this and what exactly the problem is. 
 
I think though, that with the information provided and the 
coorperation of Juha and my own efforts on our AIX machines, 
this issue can be resolved alltogether with a few 
Makefile.am/configure.in hacks, depending on whether the 
problems are generated by libtool and are not overridable. 
 
In short: 
1) the current linker commands create bogus .exp files, with a 
wrong syntax and a little change in the command execution for 
that step, should make it workable. 
The bogus .exp files, leave a loader section, with an insufficient 
LIBPATH, causing libraries which are needed by sablotron not to 
be found. 
 
2) in the final link command there's a '${wl}' variable echo'ed, 
which should have been translated to -Wl, 
 
3) linking with php needs the -Wl,-bbigtoc for Juha - this may be 
system dependant, but could also be caused by exporting 
unnecessary symols, using the -Wl,-bexpall option. Creating 
customized .exp files (whether in php or in sablotron) could 
resolve this issue. 
 
4) duplicate symbols appear for some core functions, like 'strcmp' 
and various malloc related syscalls on the final linking stage of 
php. Using the option '-Wl,-bdelcsect' resolves the issue for the 
php cli binary and does not show the duplicate symbols anymore, 
but reportedly creates a faulty apache binary, which basically fails 
to fork without error indication or >0 exit status. 
 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-15 13:23 UTC] sniper@php.net
Are you going to do something about this or not?

 [2003-07-15 13:06 UTC] msopacua@php.net
There's one thing, that clears the initial error: when apache is built with --disable-rule=expat, the httpd.exp is not updated. This causes the segfault at startup.
Deleting all related expat symbols, clears that.

There's however no way with current or even historical libtool tools, to link the combination dynamically into apache and I've tried many combinations.

Since the extension is moved to PECL in PHP-5 and linking the CLI works, as well as using a statically linked apache, those are to be the only solution at this time, until somebody 'really into the IBM linker' comes along and fixes this properly.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 15:01:32 2024 UTC