|  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.
Block user comment
Status: Assign to:
Bug Type:
From: scott at abcoa dot com
New email:
PHP Version: OS:


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

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

./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

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

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

Which give this installation output as below...

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

Problem is there's no as the 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 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).


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-10 12:31 UTC]
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, then followed by removing the files, then followed by the APXS command.

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

It's the apxs command that look for files.  I can verify that when executing this apxs command.
 [2006-04-10 21:33 UTC]
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.

> 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 as an apache module, and 
> doesn't like that very well. I don't see the point why to 
> install that, since is also created in the .libs directory.
> So I've changed the INSTALL_IT line in the Makefile and replaced 
> with .libs/
> 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.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Dec 02 00:01:27 2023 UTC