php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39697 apxs:Error: Command failed with rc=65536
Submitted: 2006-11-30 18:20 UTC Modified: 2006-12-10 11:41 UTC
From: michael dot v dot kells at uscg dot mil Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.2.0 OS: Centos
Private report: No CVE-ID: None
 [2006-11-30 18:20 UTC] michael dot v dot kells at uscg dot mil
Description:
------------
I have searched and read through all of the other bug reports mentioning this same error and found them all to be not very helpful. This is on a x86 linux distribution with x86 libraries of everything.

When I run the configure script like so:
./configure --prefix=/www/php --with-apxs2=/www/bin/apxs --with-config-filepath=/www/php --enable-sockets --with-mysql=/usr/local/mysql --with-zlibdir=/usr/include ?with-gd

The configure script works fine. The make script runs fine as well. Everything looks good until I run the make install script then I get the error:

[root@localhost php-5.2.0]# make install 
Installing PHP SAPI module:       apache2handler /www/build/instdso.sh SH_LIBTOOL='/www/build/libtool' libphp5.la /www/modules
/www/build/libtool --mode=install cp libphp5.la /www/modules/
cp .libs/libphp5.lai /www/modules/libphp5.la
cp .libs/libphp5.a /www/modules/libphp5.a
ranlib /www/modules/libphp5.a
chmod 644 /www/modules/libphp5.a
libtool: install: warning: remember to run `libtool --finish /tmp/cacti_install/php-5.2.0/libs'
Warning!  dlname not found in /www/modules/libphp5.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /www/modules/libphp5.so
chmod: cannot access `/www/modules/libphp5.so': No such file or directory
apxs:Error: Command failed with rc=65536
.
make: *** [install-sapi] Error 1

Reproduce code:
---------------
./configure --with-apxs2=/www/bin/apxs --with-mysqli
make
make install



Expected result:
----------------
I expect PHP 5.2.0 to be to compiled with out erroe and to work well.

Actual result:
--------------
[root@localhost php-5.2.0]# make install 
Installing PHP SAPI module:       apache2handler /www/build/instdso.sh SH_LIBTOOL='/www/build/libtool' libphp5.la /www/modules
/www/build/libtool --mode=install cp libphp5.la /www/modules/
cp .libs/libphp5.lai /www/modules/libphp5.la
cp .libs/libphp5.a /www/modules/libphp5.a
ranlib /www/modules/libphp5.a
chmod 644 /www/modules/libphp5.a
libtool: install: warning: remember to run `libtool --finish /tmp/cacti_install/php-5.2.0/libs'
Warning!  dlname not found in /www/modules/libphp5.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /www/modules/libphp5.so
chmod: cannot access `/www/modules/libphp5.so': No such file or directory
apxs:Error: Command failed with rc=65536
.
make: *** [install-sapi] Error 1

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-30 21:41 UTC] tony2001@php.net
I'm unable to reproduce this. Please provide more information on the steps required to replicate and software versions used (apache, autoconf, ld, gcc and others).
 [2006-12-01 13:02 UTC] michael dot v dot kells at uscg dot mil
Here are the versions that I have loaded on Centos 4.3 kernel 2.6.9-42.0.3.EL i686.

zlib-1.2.1.2-1.2, gd-2.0.28-4.4E.1, mysql-5.0.27, apache-2.2.3, autoconf-2.59-5, gcc-3.4.6-3, and I do not have ld installed on this system
 [2006-12-01 13:09 UTC] michael dot v dot kells at uscg dot mil
I am sorry I do have ld loaded and the version is 2.15.92.0.2
 [2006-12-01 13:15 UTC] tony2001@php.net
There are no such options:
--with-zlibdir
–with-gd

Please try with ./configure --disable-all --with-apxs2=/www/bin/apxs
 [2006-12-01 13:57 UTC] michael dot v dot kells at uscg dot mil
I have tried what you said. I am still getting the same error code.

[root@localhost php-5.2.0]# make install
Installing PHP SAPI module:       apache2handler
/www/build/instdso.sh SH_LIBTOOL='/www/build/libtool' libphp5.la /www/modules
/www/build/libtool --mode=install cp libphp5.la /www/modules/
cp .libs/libphp5.lai /www/modules/libphp5.la
cp .libs/libphp5.a /www/modules/libphp5.a
ranlib /www/modules/libphp5.a
chmod 644 /www/modules/libphp5.a
libtool: install: warning: remember to run `libtool --finish /tmp/cacti_install/php-5.2.0/libs'
Warning!  dlname not found in /www/modules/libphp5.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /www/modules/libphp5.so
chmod: cannot access `/www/modules/libphp5.so': No such file or directory
apxs:Error: Command failed with rc=65536
.
make: *** [install-sapi] Error 1
 [2006-12-01 22:48 UTC] tony2001@php.net
Do you see any warnings/errors during configure or make?
In php-5.2.0 please run `ls -la .libs/` and paste the output here.
"/www/bin/apxs" - where does this file come from? Is it from a package or was it self-compiled? What does `/www/bin/httpd -l` show you?
 [2006-12-03 15:55 UTC] ccohen at ntelos dot net
I am having the same problem on x86 RH Fedora Core.  Apache 2.2.3 compiled from source and the latest snapshot of php 5.2 as of Dec. 3, 06. Fail is on make install with some similar config options to the person below including:
--with-apxs2=/usr/local/apache/bin/apxs. 

after make this is what .libs looks like in my source dir:
drwxr-sr-x  2 root 1004     4096 Dec  3 10:46 .
drwxr-sr-x 18 1004 1004     4096 Dec  3 10:46 ..
-rw-r--r--  1 root 1004 19061188 Dec  3 10:46 libphp5.a
lrwxrwxrwx  1 root 1004       13 Dec  3 10:46 libphp5.la -> ../libphp5.la
-rw-r--r--  1 root 1004     1391 Dec  3 10:46 libphp5.lai

after make install
libphp5.la and libphp5.a files do get created in /usr/local/apache/modules, but not libphp5.so.
 [2006-12-03 16:01 UTC] ccohen at ntelos dot net
also, no real hiccups in config or make that I saw.
 [2006-12-03 16:28 UTC] ccohen at ntelos dot net
just tried to roll back to 5.1.4 and am now getting same problem again, from make install:

/usr/local/apache/build/instdso.sh SH_LIBTOOL='/usr/local/apache/build/libtool' libphp5.la /usr/local/apache/modules
/usr/local/apache/build/libtool --mode=install cp libphp5.la /usr/local/apache/modules/
cp .libs/libphp5.lai /usr/local/apache/modules/libphp5.la
cp .libs/libphp5.a /usr/local/apache/modules/libphp5.a
ranlib /usr/local/apache/modules/libphp5.a
chmod 644 /usr/local/apache/modules/libphp5.a
libtool: install: warning: remember to run `libtool --finish /source/php-5.1.4/libs'
Warning!  dlname not found in /usr/local/apache/modules/libphp5.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache/modules/libphp5.so
chmod: cannot access `/usr/local/apache/modules/libphp5.so': No such file or directory
apxs:Error: Command failed with rc=65536
 [2006-12-03 16:33 UTC] ccohen at ntelos dot net
I also have the newest version of libtool installed:

ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
 [2006-12-03 16:54 UTC] tony2001@php.net
>just tried to roll back to 5.1.4 and am now getting same problem again
Did it work before?
If yes, what has changed since then?
 [2006-12-03 18:48 UTC] ccohen at ntelos dot net
php 5.1.4 was previously installed as part of apache, not DSO/style, so it wasn't exactly a "roll back"  :D
 [2006-12-04 16:32 UTC] michael dot v dot kells at uscg dot mil
Their are no warnings or errors when I run configure or make.

[root@localhost php-5.2.0]# ls -al libs/
total 8
drwxr-xr-x   2 root root 4096 Dec  1 09:58 .
drwxr-xr-x  17 1002 1002 4096 Dec  1 09:58 ..

"/www/bin/apxs" I have compiled and installed Apache prior to trying to install PHP. So apxs is a tool for building and installing extension modules for Apache.

"/www/bin/httpd -l"
[root@DSES-Cacti-test1 ~]# /www/bin/httpd -l
Compiled in modules:
  core.c
  mod_authn_file.c
  mod_authn_default.c
  mod_authz_host.c
  mod_authz_groupfile.c
  mod_authz_user.c
  mod_authz_default.c
  mod_auth_basic.c
  mod_include.c
  mod_filter.c
  mod_log_config.c
  mod_env.c
  mod_setenvif.c
  prefork.c
  http_core.c
  mod_mime.c
  mod_status.c
  mod_autoindex.c
  mod_asis.c
  mod_cgi.c
  mod_negotiation.c
  mod_dir.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_so.c
 [2006-12-04 20:48 UTC] ccohen at ntelos dot net
Hate to admit this (blush), but I solved this problem by double checking the dependencies on all of the different modules I was asking PHP to install and making sure I had up to date versions of all the shared libraries by installing them all again in this order:

libiconv
./configure --enable-extra-encodings --prefix=/usr/lib
libxml2
./configure --with-iconv=/usr/lib/ --prefix=/usr/lib/
libxslt
./configure --prefix=/usr/lib/ --with-libxml-prefix=/usr/lib/ --with-libxml-include-prefix=/usr/lib/include/ --with-libxml-libs-prefix=/usr/lib/lib/
zlib
./configure --shared --prefix=/usr/lib/
libmcrypt*
./configure --disable-posix-threads --prefix=/usr/lib
libltdl
./configure --prefix=/usr/lib --enable-ltdl-install
mhash
./configure --prefix=/usr/lib
libidn
./configure --with-iconv-prefix=/usr/lib/ --prefix=/usr/lib/

make install then worked just like it was supposed to  (surprise). Hope this little confession helps somebody.
 [2006-12-10 11:41 UTC] tony2001@php.net
Please reopen the report when/if you have more information on this issue.
At the moment it looks like the problem is in your system/libraries, rather than PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 23:01:30 2024 UTC