Over the years (2007 being the first time for me) there have been at least three bugs reported re: instdso.sh - two on PHP - which they closed as not a PHP bug, and one on the apache bug list.
1. https://bugs.php.net/bug.php?id=27795
2. https://bugs.php.net/bug.php?id=43032
3. https://bz.apache.org/bugzilla/show_bug.cgi?id=43012

Further, I started a mail discussion here as well http://mail-archives.apache.org/mod_mbox/httpd-dev/201405.mbox/ See message titled:Subject Unhappy interactions between AIX, apxs, instdso.sh, apr/build-1/libtool and php

Today I started repackaging php again (I lost my previous archive during a NAS update. User error, snif) - and this brought me back to this problem.

The patch I am using is:

--- ./build/instdso.sh  2006-07-12 03:38:44 +0000
+++ /var/httpd/build/instdso.sh 2014-06-20 19:13:56 +0000
@@ -72,6 +72,20 @@
   exit 0
 fi

+if test "$DLNAME" != "$TARGET_NAME"
+then
+    mv $TARGETDIR/$DLNAME $TARGETDIR/$TARGET_NAME
+fi
+
+# at this point $TARGETDIR/$TARGET_NAME should exist
+# if not, let's hope it is in .libs and copy it to $TARGET_DIR
+status=0
+if ! test -e  $TARGETDIR/$TARGET_NAME
+then
+       cp -p .libs/$TARGET_NAME  $TARGETDIR/$TARGET_NAME || exit 1
+       status=$?
+fi
+
 if test -n "$LIBRARY_NAMES"
 then
     for f in $LIBRARY_NAMES
@@ -80,14 +94,9 @@
     done
 fi

-if test "$DLNAME" != "$TARGET_NAME"
-then
-    mv $TARGETDIR/$DLNAME $TARGETDIR/$TARGET_NAME
-fi
-
 rm -f $TARGETDIR/$DSOARCHIVE_BASENAME
 rm -f $TARGETDIR/$DSOBASE.a
 rm -f $TARGETDIR/lib$DSOBASE.a
 rm -f $TARGETDIR/lib$TARGET_NAME

-exit 0
+exit $status

And I would be very happy - after 8 years of waiting - if instdso.sh could be 
patched.
Feel free to delete my comments about hoping TARGET_NAME is in .libs

p.s. Something "nice", but optional
* the patch above fixes the regular make install command - however, when 
working with
INSTALL_ROOT (the php equivalent of using DESTDIR) - the update of httpd.conf 
to add
the module basically always fails. Rather than exit with non-zero status - only 
giving
a warning message would be nicer - so the "DESTDIR" aka INSTALL_ROOT install 
finishes.

Currently I am getting:
+ make install DESTDIR=/var/aixtools/prj/php/5.2.17.0>  .buildaix/install.out
/var/httpd/build/instdso.sh SH_LIBTOOL='/opt/build-1/libtool' libphp5.la 
/var/aixtools/prj/php/5.2.17.0/opt/httpd/libexec
libtool: install: warning: remember to run `libtool --finish 
/data/prj/php/php-5.2.17/libs'
chmod 755 /var/aixtools/prj/php/5.2.17.0/opt/httpd/libexec/libphp5.so
apxs:Error: Config file /var/aixtools/prj/php/5.2.17.0/var/httpd/etc/httpd.conf 
not found.
make: 1254-004 The error code from the last command is 1.

I can almost get the same using "make -i install"

root@x064:[/data/prj/php/php-5.2.17]INSTALL_ROOT=/var/aixtools/prj/php/5.2.17.0
root@x064:[/data/prj/php/php-5.2.17]export INSTALL_ROOT
root@x064:[/data/prj/php/php-5.2.17]make -i install
Installing PHP SAPI module:       apache2handler
/var/httpd/build/instdso.sh SH_LIBTOOL='/opt/build-1/libtool' libphp5.la 
/var/aixtools/prj/php/5.2.17.0/opt/httpd/libexec
rm -f /var/aixtools/prj/php/5.2.17.0/opt/httpd/libexec/libphp5.so
/opt/build-1/libtool --mode=install cp libphp5.la 
/var/aixtools/prj/php/5.2.17.0/opt/httpd/libexec/
libtool: install: cp .libs/libphp5.a 
/var/aixtools/prj/php/5.2.17.0/opt/httpd/libexec/libphp5.a
libtool: install: cp .libs/libphp5.lai 
/var/aixtools/prj/php/5.2.17.0/opt/httpd/libexec/libphp5.la
libtool: install: warning: remember to run `libtool --finish 
/data/prj/php/php-5.2.17/libs'
chmod 755 /var/aixtools/prj/php/5.2.17.0/opt/httpd/libexec/libphp5.so
apxs:Error: Config file /var/aixtools/prj/php/5.2.17.0/var/httpd/etc/httpd.conf 
not found.
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
Installing PHP CLI binary:        /var/aixtools/prj/php/5.2.17.0/opt/bin/
Installing PHP CLI man page:      /var/aixtools/prj/php/5.2.17.0/opt/man/man1/
Installing build environment:     
/var/aixtools/prj/php/5.2.17.0/opt/lib/php/build/
Installing header files:          
/var/aixtools/prj/php/5.2.17.0/opt/include/php/
Installing helper programs:       /var/aixtools/prj/php/5.2.17.0/opt/bin/
  program: phpize
  program: php-config
Installing man pages:             /var/aixtools/prj/php/5.2.17.0/opt/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /var/aixtools/prj/php/5.2.17.0/opt/lib/php/
[PEAR] Archive_Tar    - installed: 1.3.7
[PEAR] Console_Getopt - installed: 1.2.3
[PEAR] Structures_Graph- installed: 1.0.3
[PEAR] XML_Util       - installed: 1.2.1
[PEAR] PEAR           - installed: 1.9.1
Wrote PEAR system config file at: 
/var/aixtools/prj/php/5.2.17.0//opt/etc/pear.conf
You may want to add: /opt/lib/php to your php.ini include_path
Installing PDO headers:          
/var/aixtools/prj/php/5.2.17.0/opt/include/php/ext/pdo/
Target "install" is up to date.



Reply via email to