a) It has been a hard climb to get httpd-2.4.29 to build using the latest apr and apr-util. Still researching what that is (might be expat related - embedded versus external, still searching). Anyway, working with apr-1.5.2 I was at least able to get httpd-2.4.29 to build so I could proceed to my other "forever" hassle.

b) the forever "hassle": over the years (the first time I posted "a bug may be as far back as 2010", not bothering to post before then (or it was working??) - was getting "make install" to work for PHP.

c) PHP stated correctly - not them - would be instdso.sh. Also posted, but not conclusive. I hacked at instdso - as it knew what to remove (rm -f) but did not install. I just hard-wired it to copy the file, if, at the end, it was not there. With that, the chmod command that follows instdso.sh works.

Quick History, better review:

Currently:

root@x065:[/data/prj/php/php-5.3.29]make install-sapi
Installing PHP SAPI module:       apache2handler
        /data/prj/php/src/php-5.3.29/build/shtool mkdir -p /opt/bin
        if test ! -r /data/prj/php/php-5.3.29/libs/libphp5.so; then  for i in 0.0.0 0.0 0; do  if test -r /data/prj/php/php-5.3.29/libs/libphp5.so.$i; then  ln -s /data/prj/php/php-5.3.29/libs/libphp5.so.$i /data/prj/php/php-5.3.29/libs/libphp5.so;  break;  fi;  done; fi         /data/prj/php/src/php-5.3.29/build/shtool mkdir -p '/opt/httpd/libexec' && /data/prj/php/src/php-5.3.29/build/shtool mkdir -p '/var/httpd/etc' && /opt/httpd/bin/apxs -S LIBEXECDIR='/opt/httpd/libexec' -S SYSCONFDIR='/var/httpd/etc' -i -a -n php5 libphp5.la Use of uninitialized value in concatenation (.) or string at /opt/httpd/bin/apxs line 222. /var/httpd/build/instdso.sh SH_LIBTOOL='/opt/build-1/libtool' libphp5.la /opt/httpd/libexec
rm -f /opt/httpd/libexec/libphp5.so
/opt/build-1/libtool --mode=install install libphp5.la /opt/httpd/libexec/
libtool: install: install .libs/libphp5.a /opt/httpd/libexec/libphp5.a
libtool: install: install .libs/libphp5.lai /opt/httpd/libexec/libphp5.la
libtool: install: warning: remember to run `libtool --finish /data/prj/php/php-5.3.29/libs'
chmod 755 /opt/httpd/libexec/libphp5.so
chmod: /opt/httpd/libexec/libphp5.so: A file or directory in the path name does not exist.
apxs:Error: Command failed with rc=65536
.
make: 1254-004 The error code from the last command is 1.

**** I think I have it!! ****
With one small change: (/opt/build-1/libtool apr-1.5.2)
 +3403      # See the names of the shared library.
 +3404      set dummy $dlname $library_names; shift

root@x065:[/data/prj/php/php-5.3.29]make install-sapi
Installing PHP SAPI module:       apache2handler
        /data/prj/php/src/php-5.3.29/build/shtool mkdir -p /opt/bin
        if test ! -r /data/prj/php/php-5.3.29/libs/libphp5.so; then  for i in 0.0.0 0.0 0; do  if test -r /data/prj/php/php-5.3.29/libs/libphp5.so.$i; then  ln -s /data/prj/php/php-5.3.29/libs/libphp5.so.$i /data/prj/php/php-5.3.29/libs/libphp5.so;  break;  fi;  done; fi         /data/prj/php/src/php-5.3.29/build/shtool mkdir -p '/opt/httpd/libexec' && /data/prj/php/src/php-5.3.29/build/shtool mkdir -p '/var/httpd/etc' && /opt/httpd/bin/apxs -S LIBEXECDIR='/opt/httpd/libexec' -S SYSCONFDIR='/var/httpd/etc' -i -a -n php5 libphp5.la Use of uninitialized value in concatenation (.) or string at /opt/httpd/bin/apxs line 222. /var/httpd/build/instdso.sh SH_LIBTOOL='/opt/build-1/libtool' libphp5.la /opt/httpd/libexec
rm -f /opt/httpd/libexec/libphp5.so
/opt/build-1/libtool --mode=install install libphp5.la /opt/httpd/libexec/
libtool: install: install .libs/libphp5.so /opt/httpd/libexec/libphp5.so
libtool: install: (cd /opt/httpd/libexec && { ln -s -f libphp5.so libphp5.a || { rm -f libphp5.a && ln -s libphp5.so libphp5.a; }; }) libtool: install: (cd /opt/httpd/libexec && { ln -s -f libphp5.so libphp5.a || { rm -f libphp5.a && ln -s libphp5.so libphp5.a; }; })
libtool: install: install .libs/libphp5.lai /opt/httpd/libexec/libphp5.la
libtool: install: warning: remember to run `libtool --finish /data/prj/php/php-5.3.29/libs'
chmod 755 /opt/httpd/libexec/libphp5.so
[activating module `php5' in /var/httpd/etc/httpd.conf]

**** So, I suspect the actual 'bug' is in libtool (this embedded version was 2.4.2). FYI, the base statement (where I can fix it) is, in apr-1.6.2, based on libtool-2.4.6

/opt/build-1/libtool

 +4800          # See the names of the shared library.
 +4801          set dummy $library_names; shift

I have no clue whether prefixing $dlname is the right approach, or that library_names (in the .la file) is wrong.

FYI: libphp5.la contents:

root@x065:[/data/prj/php/php-5.3.29]cat .libs/libphp5.la
# libphp5.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='libphp5.so'

# Names of this library.
library_names='libphp5.a libphp5.a'

# The name of the static archive.
old_library=''

# Libraries that this one depends upon.
dependency_libs=' -lz -lrt -liconv -lz -lcurl -lrt -lm -liconv -lm -lcurl -lssh2 -lssh2 -lz -liconv -lm -lz -lm -liconv -lm -liconv -lm -liconv -lm -liconv -lm -L/opt/lib -L/opt/mysql/lib -lz -lrt -lmysqlclient -liconv /opt/lib/libfreetype.la /opt/lib/libpng15.la -lz -lm -lX11 -lXpm -lpng -lz -ljpeg -lcurl -lrt -lm -liconv -lm -lcurl -lssh2 -lssh2 -lssl -lcrypto -lz -liconv -lm -lmysqlclient_r -lz -lnsl_r -lm -liconv -lm -liconv -lm -liconv -lm /opt/lib/libxml2.la -lpthread -liconv -lm -liconv -lm'

# Version information for libphp5.
current=0
age=0
revision=0

# Is this an already installed library?
installed=no

# Should we warn about portability when linking against -modules?
shouldnotlink=yes

# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''

# Directory that this library needs to be installed in:
libdir='/data/prj/php/php-5.3.29/libs'

******* So, besides sharing my "finding" that I'll just apply locally for php work, my question: Is there any knowledge of others trying to use instdso.sh with a "module" that demands a dlopen-able FILE (as httpd does not accept the packaging of a dlopen() archive member - which is what is in "the library".

root@x065:[/data/prj/php/php-5.3.29]ls -l .libs
total 60000
-rw-r--r--   1 root     1954       15467005 Feb 06 14:39 libphp5.a
-rw-r--r--   1 root     1954         134349 Feb 06 14:39 libphp5.exp
lrwxrwxrwx   1 root     1954             13 Feb 06 14:40 libphp5.la -> ../libphp5.la
-rw-r--r--   1 root     1954           1261 Feb 06 14:40 libphp5.lai
-rwxr-xr-x   1 root     1954       15095281 Feb 06 14:39 libphp5.so
root@x065:[/data/prj/php/php-5.3.29]ar tv .libs/libphp5.a
rwxr-xr-x     0/1954  15095281 Feb 06 14:39 2018 libphp5.so

Just showing, in this last bit - that libtool has 'created' all the contents correctly, but libtool cannot --install it correctly.

Would appreciate APR/APACHE assistance on getting this 'noticed' by GNU libtool - as in, is it $dlname should be prefixing $library_names, or should $library_names be different? I am hoping someone here (ASF) knows.

Many thanks for taking the time to read and think!

Michael

Reply via email to