php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36852 makefile failed due to apxs's command failure w/ rc=65536 error
Submitted: 2006-03-24 23:53 UTC Modified: 2007-03-30 15:59 UTC
From: scott at abcoa dot com Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 5.1.2 OS: AIX 5.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: scott at abcoa dot com
New email:
PHP Version: OS:

 

 [2006-03-24 23:53 UTC] scott at abcoa dot com
Description:
------------
Apache version 2.2.0

I get a PHP compile failure with the make command.  Configure command was 

--snip--
./configure --with-apxs2=../../apache2/bin/apxs --disable-all --with-unixODBC --with-openssl --with-curl --with-curlwrappers --enable-spl --enable-session --enable-track-vars --enable-ftp --enable-sockets
--snip--

followed by the make command.  Narrowed down the problem to the apxs script in PHP's makefile, when translated is this...

--snip--
/usr/local/apache2/bin/apxs -S LIBEXECDIR='/usr/local/apache2/modules' -S
SYSCONFDIR='/usr/local/apache2/conf' -i -a 
-n php5 libphp5.la
--snip--

Which give this installation output as below...

--snip--
/usr/local/apache2/build/instdso.sh
SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp5.la /usr/local/apache2/modules
rm -f /usr/local/apache2/modules/libphp5.so
/usr/local/apache2/build/libtool --mode=install cp libphp5.la
/usr/local/apache2/modules/
cp .libs/libphp5.a /usr/local/apache2/modules/libphp5.a
cp .libs/libphp5.lai /usr/local/apache2/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish
/usr/local/src/php-5.1.2/libs'
chmod 755 /usr/local/apache2/modules/libphp5.so
chmod: /usr/local/apache2/modules/libphp5.so: A file or directory in the path
name does not exist.
apxs:Error: Command failed with rc=65536
--snip--

Problem is there's no libphp5.so as the libphp5.la and libphp5.a are the only two things that are found in that directory.  Seem that it use the static file instead of the dso file.

Thought it was an Apache bug so filed a bug there, bug #39099 and a couple of bugs report from the bugs.php.net search seem to confirm that.  Then I was told that it's not an Apache bug but a PHP bug.  So, I filed it here instead.

Expected result:
----------------
No apxs error message and to be able to compile successfully with the dso file (php module).


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-10 12:31 UTC] sniper@php.net
If it works with this configure line, there is no bug:

# rm config.cache ; ./configure --disable-all --with-apxs2

If that works, there is propably some static library that PHP is linked with and then libtool thinks you want the whole thing as static. (this is a libtool bug, not PHP bug)

 [2006-04-10 17:40 UTC] scott at abcoa dot com
Followed up with your configure option and still get the same exact error..

I looked at the "install-sapi:" part in the makefile and it point to libphp5.la, then followed by removing the libphp5.so files, then followed by the APXS command.

--snip--
/usr/local/apache2/bin/apxs -S LIBEXECDIR='/usr/local/apache2/modules' -S
SYSCONFDIR='/usr/local/apache2/conf' -i -a 
-n php5 libphp5.la
--snip--

It's the apxs command that look for libphp5.so files.  I can verify that when executing this apxs command.
 [2006-04-10 21:33 UTC] sniper@php.net
It's not PHP bug either. It's libtool bug (or they say it's feature). Make sure you have shared libs of everything installed you link PHP (and Apache!) with.
 [2007-03-30 15:59 UTC] scott at abcoa dot com
I was asked by a couple of folks to post this comment to help anyone who suffer from this issue to help to make their live be made easier and to cut down the loss of their business hours.

--snip--
> My configuration is:
> Apache: v2.2.4, PHP: v5.2.1
>
> I'm not quite clear what the difference between the .la and the .so 
> files. Anyway, what I've figured out is the following: for somewhat 
> the php tries to install the libphp5.la as an apache module, and 
> instdso.sh doesn't like that very well. I don't see the point why to 
> install that, since libphp5.so is also created in the .libs directory.
> So I've changed the INSTALL_IT line in the Makefile and replaced 
> libphp5.la with .libs/libphp5.so
>
> After this make install worked well, installed the .so file, added a 
> line into httpd.conf, etc.
>
> I know this is a quick&dirty fix, but somehow this bug should be 
> addressed, it's out there since a while ago.
--snip--
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 18:01:28 2024 UTC