I have been trying to my vain to compile and install PHP on a red hat linux system:
The version of PHP I'm trying to compile is 4.3.3. The configure line that I use is:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --without-pear --with-ftp
Configure runs fine and on checking the configure log the only thing that raises any eye brow is:
configure:85464: checking whether dlsym() requires a leading underscore in symbol names
configure:85532: gcc -o conftest -g -O2 conftest.c 1>&5
/tmp/ccuV3fq0.o(.text+0x1b): In function main':
dlopen'
/usr/shares/adam/linux/php/php-4.3.3/configure:85518: undefined reference to
/tmp/ccuV3fq0.o(.text+0x34):/usr/shares/adam/linux/php/php-4.3.3/configure:85523: undefined refere
nce to dlsym'
dlsym'
/tmp/ccuV3fq0.o(.text+0x52):/usr/shares/adam/linux/php/php-4.3.3/configure:85524: undefined refere
nce to
I then run make. Just before it finishes this warning appears:
Warning: inter-library dependencies are not known to be supported.
All declared inter-library dependencies are being dropped.
Warning: libtool could not satisfy all declared inter-library
dependencies of module libphp4. Therefore, libtool will create
a static module, that should work as long as the dlopening
application is linked with the -dlopen flag.
When I attempt to run make install however I got the following output:
[Installing PHP CLI binary: /usr/local/bin/
Installing PHP CLI man page: /usr/local/man/man1/
Installing PHP SAPI module: apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp4.la /usr/local/apache2/modules
/usr/local/apache2/build/libtool --mode=install cp libphp4.la /usr/local/apache2/modules/
cp .libs/libphp4.lai /usr/local/apache2/modules/libphp4.la
cp .libs/libphp4.a /usr/local/apache2/modules/libphp4.a
ranlib /usr/local/apache2/modules/libphp4.a
chmod 644 /usr/local/apache2/modules/libphp4.a
libtool: install: warning: remember to run libtool --finish /usr/shares/adam/linux/php/php-4.3.3/libs'
/usr/local/apache2/modules/libphp4.so': No such file or directory
Warning! dlname not found in /usr/local/apache2/modules/libphp4.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache2/modules/libphp4.so
chmod: failed to get attributes of
apxs:Error: Command failed with rc=65536
.
make: *** [install-sapi] Error 1
It appears as if make install has created the following files:
$ ls libs
libphp4.a libphp4.la
$ ls .libs
libphp4.a libphp4.la libphp4.lai
So why it is attempting chmod a file which it didn't create is beyond me. I have a feeling that this may all stem from the configure error. I have upgraded to the latest version of libtool and have also done some research on a similar issue that occured in php 4.2.x whereby the a a flag in libtool needed to be changed.
I have also read this bug report which instructs you to change the configure file. However I am not confident with doing this:
http://bugs.php.net/bug.php?id=19918
I would greatly appriate any help. I enjoy compiling programs instead of just installing as it presents a challenge. However PHP is proving a very difficult challenge.