php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63182 make install to INSTALL_ROOT fails
Submitted: 2012-09-28 20:22 UTC Modified: 2018-08-09 16:40 UTC
Votes:5
Avg. Score:3.8 ± 1.6
Reproduced:2 of 3 (66.7%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: mamfelt at gmail dot com Assigned:
Status: Open Package: *Compile Issues
PHP Version: 5.3.X,7.2.X,5.6.X OS: AIX
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mamfelt at gmail dot com
New email:
PHP Version: OS:

 

 [2012-09-28 20:22 UTC] 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]


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-02-13 22:09 UTC] aixtools at felt dot demon dot nl
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
 [2018-02-15 18:44 UTC] mamfelt at gmail dot com
FYI: the step to correct the refusal to install (when everything else is working) is to not try to add to httpd.conf (as it does not exist in INSTALL_ROOT).

as such, I manually edit Makefile, $INSTALL_IT and remove the "-a" flags to apxs. Then "make INSTALL_ROOT=/some/where/to/prep/for/packaging install" works.
 [2018-02-15 18:47 UTC] mamfelt at gmail dot com
-PHP Version: 5.3.17 +PHP Version: 5.3.X,7.2.X,5.6.X
 [2018-02-15 18:47 UTC] mamfelt at gmail dot com
still actual in 7.2.X, 5.6.X, etc.
 [2018-08-09 11:54 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2018-08-09 11:54 UTC] cmb@php.net
Any particular reason why you don't configure --prefix (and
friends; see ./configure --help)?
 [2018-08-09 11:59 UTC] spam2 at rhsoft dot net
@cmb@php.net:

> Any particular reason why you don't configure --prefix

because --prefix is a completly different world

--prefix=/usr
INSTALL_ROOT=/home/builduser/BUILDROOT/php

nobody right in his mind does "make install" directly into the running system
 [2018-08-09 13:12 UTC] cmb@php.net
-Package: *General Issues +Package: Testing related
 [2018-08-09 16:40 UTC] cmb@php.net
-Status: Feedback +Status: Open -Package: Testing related +Package: *Compile Issues -Assigned To: cmb +Assigned To:
 [2018-08-09 16:40 UTC] cmb@php.net
Okay, thanks!
 [2023-06-18 05:23 UTC] zdailymedia at gmail dot com
Daily Media zone are sharing latest news about about fashion, shopping,finance, health etc. More info to visit:(https://dailymediazone.com)github.com
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 16:01:29 2024 UTC