Bug #63182 [Com]: make install to INSTALL_ROOT fails
Edit report at https://bugs.php.net/bug.php?id=63182&edit=1
ID: 63182
Comment by: aixtools at felt dot demon dot nl
Reported by: mamfelt at gmail dot com
Summary: make install to INSTALL_ROOT fails
Status: Open
Type: Bug
Package: *General Issues
Operating System: AIX
PHP Version: 5.3.17
Block user comment: N
Private report: N
New Comment:
Bother. Your protection - has bungled a difficult post.
So, the short version:
All the files are made: note the stand-alone .so file and the archive member have are "the
same".
root@x065:[/data/prj/php/php-7.2.2]ls -l .libs
total 82216
-rw-r--r-- 1 root felt 21163709 Feb 13 21:15 libphp7.a
-rw-r--r-- 1 root felt 145998 Feb 13 21:15 libphp7.exp
lrwxrwxrwx 1 root felt 13 Feb 13 21:15 libphp7.la -> ../libphp7.la
-rw-r--r-- 1 root felt 1096 Feb 13 21:15 libphp7.lai
-rwxr-xr-x 1 root felt 20768010 Feb 13 21:15 libphp7.so
root@x065:[/data/prj/php/php-7.2.2]ar tv .libs/libphp7.a
rwxr-xr-x 0/1954 20768010 Feb 13 21:15 2018 libphp7.so
On my server (and using xlc) the test here always fails (i.e., != yes)
+99767 if test "$aix_use_runtimelinking" = yes; then
+99768 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+99769 # instead of lib<name>.a to let people know that these are not
+99770 # typical AIX shared libraries.
+99771 library_names_spec='${libname}${release}${shared_ext}$versuffix
${libname}${release}${shared_ext}$major $libname${shared_ext}'
+99772 else
+99773 # We preserve .a as extension for shared libraries through AIX4.2
+99774 # and later when we are not doing run time linking.
+99775 library_names_spec='${libname}${release}.a $libname.a'
+99776 soname_spec='${libname}${release}${shared_ext}$major'
+99777 fi
And I expect this explains why the .la file always has the following lines:
# libphp7.la - a libtool library file
# Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56)
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname='libphp7.so'
# Names of this library.
library_names='libphp7.a libphp7.a'
*****
Note: maybe this will go away when you update libtool in the php package:
libtool-2.4.6.tar.xz 2015-02-16 05:16 950K
compared with:
[ ] libtool-1.5.26.tar.gz 2008-02-01 12:12 2.8M
*****
Anyway, for the moment I fix this problem:
rm -f /var/tmp/root/php-5.3.17.0/opt/httpd/libexec/libphp5.so
/var/apr/build-1/libtool --mode=install cp libphp5.la /var/tmp/root/php-5.3.17.0/opt/httpd/libexec/
libtool: install: cp .libs/libphp5.a /var/tmp/root/php-5.3.17.0/opt/httpd/libexec/libphp5.a
libtool: install: cp .libs/libphp5.lai /var/tmp/root/php-5.3.17.0/opt/httpd/libexec/libphp5.la
libtool: install: warning: remember to run `libtool --finish /data/prj/php/php-5.3.17/libs'
chmod 755 /var/tmp/root/php-5.3.17.0/opt/httpd/libexec/libphp5.so
chmod: cannot access `/var/tmp/root/php-5.3.17.0/opt/httpd/libexec/libphp5.so': A file or
directory in the path name does not exist.
apxs:Error: Command failed with rc=65536
with:
+3190 # func_mode_install arg...
+3191 func_mode_install ()
+3192 {
+3193 $opt_debug
+3194 # There may be an optional sh(1) argument at the beginning of
+3195 # install_prog (especially on Windows NT).
...
+3403 # See the names of the shared library.
+3404 set dummy $library_names; shift
+3405 if test -n "$1"; then
+3406 realname="$1"
+3407 shift
+3408
modified to:
+3403 # See the names of the shared library.
+3404 set dummy $dlname $library_names; shift
+3405 if test -n "$1"; then
+3406 realname="$1"
+3407 shift
+3408
In short, this issue has been around for years - and it does not look like it is in apxs or apr -
aka - apache software.
It "feels" like it is some extremely dated configure.in code (developed in 2002-2008?) and
very old version of libtool components.
Hope this helps!!
Michael
Previous Comments:
------------------------------------------------------------------------
[2012-09-28 20:22:36] mamfelt at gmail dot com
Description:
------------
Trying to get php installed to a temporary directory to create a package.
Defined both DESTDIR and INSTALL_ROOT to /var/tmp/root/php-5.3.17.0
Directory is empty at start; /opt/httpd/* is installed
Let's assume that the bug is with /var/httpd/build/instdso.sh - I am hoping php will know
'faster' what is expected, and how/what I can do to debug it.
Note (see results below) - Nothing has been copied to INSTALL_ROOT, but the directories have been
made.
Neither has anything been added to /opt/httpd/libexec/.
Test script:
---------------
root@x104:[/data/prj/php/php-5.3.17]make INSTALL_ROOT=/var/tmp/root/php-5.3.17.0 install
Expected result:
----------------
a completed installation
Actual result:
--------------
root@x104:[/data/prj/php/php-5.3.17]make INSTALL_ROOT=/var/tmp/root/php-5.3.17.0 install
Installing PHP SAPI module: apache2handler
/var/httpd/build/instdso.sh SH_LIBTOOL='/var/apr/build-1/libtool' libphp5.la
/var/tmp/root/php-5.3.17.0/opt/httpd/libexec
rm -f /var/tmp/root/php-5.3.17.0/opt/httpd/libexec/libphp5.so
/var/apr/build-1/libtool --mode=install cp libphp5.la /var/tmp/root/php-5.3.17.0/opt/httpd/libexec/
libtool: install: cp .libs/libphp5.a /var/tmp/root/php-5.3.17.0/opt/httpd/libexec/libphp5.a
libtool: install: cp .libs/libphp5.lai /var/tmp/root/php-5.3.17.0/opt/httpd/libexec/libphp5.la
libtool: install: warning: remember to run `libtool --finish /data/prj/php/php-5.3.17/libs'
chmod 755 /var/tmp/root/php-5.3.17.0/opt/httpd/libexec/libphp5.so
chmod: cannot access `/var/tmp/root/php-5.3.17.0/opt/httpd/libexec/libphp5.so': A file or
directory in the path name does not exist.
apxs:Error: Command failed with rc=65536
.
make: *** [install-sapi] Error 1
root@x104:[/data/prj/php/php-5.3.17]find . -name libphp5.so
./.libs/libphp5.so
root@x104:[/data/prj/php/php-5.3.17]ls -lR /var/tmp/root/php*/opt
/var/tmp/root/php-5.3.17.0/opt:
total 0
drwxr-xr-x 2 root system 256 Sep 28 22:05 bin
drwxr-xr-x 3 root system 256 Sep 28 22:05 httpd
/var/tmp/root/php-5.3.17.0/opt/bin:
total 0
/var/tmp/root/php-5.3.17.0/opt/httpd:
total 0
drwxr-xr-x 2 root system 256 Sep 28 22:07 libexec
/var/tmp/root/php-5.3.17.0/opt/httpd/libexec:
total 0
root@x104:[/data/prj/php/php-5.3.17]type install
install is /opt/bin/install
root@x104:[/data/prj/php/php-5.3.17]lslpp -w /opt/bin/install
File Fileset Type
----------------------------------------------------------------------------
/opt/bin/install
aixtools.coreutils.rte File
root@x104:[/data/prj/php/php-5.3.17]
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63182&edit=1
Thread (8 messages)