From: [EMAIL PROTECTED] Operating system: AIX PHP version: 4.3.0 PHP Bug Type: Apache2 related Bug description: EXTRA_LDFLAGS for AIX not quite right
In the build for apache2filter, there is some AIX-specific logic to set EXTRA_LDFLAGS: APXS_SBINDIR=`$APXS -q SBINDIR` EXTRA_LDFLAGS="$EXTRA_LDFLAGS \ -Wl,-bI:$APXS_SBINDIR/httpd.exp" Problem: 1) With Apache 2.0, httpd.exp is in the libexec dir, not the sbin dir, so the link step fails. 2) Once the path for httpd.exp is tweaked, the DSO is built but run-time linking is not enabled so PHP segfaults the first time it tries to call an APR function (httpd.exp doesn't have apr_ stuff in it; run-time linking is used to resolve APR references) The fix for that is to add -Wl,-brtl to the link step. For my own gcc build I had to include -L/path/to/libgcc.a -lgcc in EXTRA_LDFLAGS to resolve references to some arithmetic operations, but I doubt that is something for PHP to worry about. So here is a patch to sapi/apache2filter/config.m4 (tested with 4.3.0, but CVS HEAD looks like patch should apply fine there too). See http://www.apache.org/~trawick/php.patch1 A funny thing about existing code in the area of the patch is the use of $(INSTALL_ROOT) in front of directories printed by "apxs -q"... I don't see how that makes any sense, but for my builds INSTALL_ROOT was unset so it worked. Here is a line from config.m4 that has an example of this use of $(INSTALL_ROOT): APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR` My patch depends on the setting of APXS_LIBEXECDIR. -- Edit bug report at http://bugs.php.net/?id=22035&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22035&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22035&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22035&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22035&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22035&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22035&r=support Expected behavior: http://bugs.php.net/fix.php?id=22035&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22035&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22035&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22035&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22035&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22035&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22035&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22035&r=gnused
