php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27795 make install fails (PHP5 RC1, PHP5 latest)
Submitted: 2004-03-31 05:58 UTC Modified: 2004-04-08 04:49 UTC
From: peoyli at bredband dot net Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5CVS-2004-04-07 OS: OpenBSD 3.4
Private report: No CVE-ID: None
 [2004-03-31 05:58 UTC] peoyli at bredband dot net
Description:
------------
Make install fails on installing libphp5.so

# make install
Installing PHP SAPI module:       apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp5.la /usr/local/apache2/modules
/usr/local/apache2/build/libtool --mode=install cp libphp5.la /usr/local/apache2/modules/
cp .libs/libphp5.lai /usr/local/apache2/modules/libphp5.la
cp .libs/libphp5.a /usr/local/apache2/modules/libphp5.a
ranlib -t /usr/local/apache2/modules/libphp5.a
chmod 644 /usr/local/apache2/modules/libphp5.a
libtool: install: warning: remember to run `libtool --finish /usr/local/src/php5-200403310830/libs'
Warning!  dlname not found in /usr/local/apache2/modules/libphp5.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache2/modules/libphp5.so
chmod: /usr/local/apache2/modules/libphp5.so: No such file or directory
apxs:Error: Command failed with rc=65536
.
*** Error code 1

Stop in /usr/local/src/php5-200403310830 (line 138 of Makefile).


Reproduce code:
---------------
# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs \
--with-config-file-path=/usr/local/php/conf --with-mysql=/usr/local/mysql \
--enable-track-vars --with-gd --with-zlib-dir=/usr/local \
--with-jpeg-dir=/usr/local --with-png-dir=/usr/local --enable-cli

# make

# make install
...
chmod: /usr/local/apache2/modules/libphp5.so: No such file or directory
apxs:Error: Command failed with rc=65536
.
*** Error code 1

Stop in /usr/local/src/php5-200403310830 (line 138 of Makefile).


Actual result:
--------------
Installation fails to complete

libphp5.la and libphp4.a is installed in Apache module directory.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-31 16:38 UTC] manish_dharwadker at yahoo dot com
I had the same issue with php5/4 as well as latest Apache2 sources. None of the shared library files libphp5.so, etc. were being created. 

I think this is because libtool shipped with OpenBSD is faulty and unfortunately even subsequent ones do not work. I think the libtool team needs to look at it.

I switched to Mandrake 10.0 RC1 but unfortunately I am having other problems compiling php4/5 on it.
 [2004-04-07 06:17 UTC] sniper@php.net
Looks more like an Apache bug..or incompatible libtool version  . (PHP _requires_ 1.4.3)

 [2004-04-07 06:36 UTC] peoyli at bredband dot net
Both Apache2 and PHP have and is using the correct version:

# pwd
/usr/local/src/php5-200404070830
# ./libtool --version
ltmain.sh (GNU libtool) 1.4.3 (1.922.2.110 2002/10/23 01:39:54)

# /usr/local/apache2/build/libtool --version
ltmain.sh (GNU libtool) 1.4.3 (1.922.2.110 2002/10/23 01:39:54)
#
 [2004-04-07 08:24 UTC] sniper@php.net
Does PHP 4.3.5 work for you?

 [2004-04-07 09:24 UTC] peoyli at bredband dot net
4.3.5 can be compiled and installed with the exact same configure command line...

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 -t /usr/local/apache2/modules/libphp4.a
chmod 644 /usr/local/apache2/modules/libphp4.a
libtool: install: warning: remember to run `libtool --finish /usr/local/src/php-4.3.5/libs'
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
[activating module `php4' in /usr/local/apache2/conf/httpd.conf]
 [2004-04-07 09:31 UTC] peoyli at bredband dot net
I forgot to move out libphp4.so from the modules directory, so (it didn't work with 4.3.5):

#mv /usr/local/apache2/modules/libphp4.so /usr/local/apache2/modules/libphp4.so_

# make install-sapi
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 -t /usr/local/apache2/modules/libphp4.a
chmod 644 /usr/local/apache2/modules/libphp4.a
libtool: install: warning: remember to run `libtool --finish /usr/local/src/php-4.3.5/libs'
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: /usr/local/apache2/modules/libphp4.so: No such file or directory
apxs:Error: Command failed with rc=65536
.
*** Error code 1

Stop in /usr/local/src/php-4.3.5 (line 126 of Makefile).
 [2004-04-07 11:02 UTC] sniper@php.net
Don't do that..do 'make clean'..and how did you get that libphp4.so in there in the first place?!! (and yet claim here it doesn't work?)


 [2004-04-07 16:06 UTC] peoyli at bredband dot net
I already had a working libphp4 (4.3.4) there since an older installation, and because of that, the chmod command was executed on that version  instead of the 4.3.5 library which was not created.
 [2004-04-07 16:08 UTC] peoyli at bredband dot net
-
 [2004-04-08 04:49 UTC] peoyli at bredband dot net
Tracked this problem down to the --with-jpeg-dir=/usr/local

Changed status of this report to "Bogus" because it was actually a problem caused by the jpeg-6b library.

Solution:
configure jpeg-6b with --enable-shared
 [2004-04-08 19:13 UTC] heinemann dot juergen at t-online dot de
Tt is not a BUG - but incomplit with Permission on your 
Configuration, to fix this problem. 
Open Makefile and edit Line 93 with Variable "INSTALL_IT" 
for more Information get apxs --help 
example: 
INSTALL_IT = $(mkinstalldirs) 
'$(INSTALL_ROOT)/srv/www/modules'  && /usr/sbin/apxs -S 
LIBEXECDIR='/srv/www/modules' -i -a -g php5 libphp5.la
 [2004-05-09 13:28 UTC] jelly_bean_junky at hotmail dot com
Hvae you tried adding the '--enable-so=shared' and double checking your '--with-apxs2' flag?

I'm just trying it out own my system:
$ automake --version
automake (GNU automake) 1.8.3
$ autoconf --version
autoconf (GNU Autoconf) 2.59
$ libtool --version
ltmain.sh (GNU libtool) 1.5.6 (1.1220.2.94 2004/04/10 16:27:27)
$ make --version
GNU Make 3.80
$ gcc --version
2.95.3
$ uname -mprsv
OpenBSD 3.5 GENERIC#34 i386 AMD-K6(tm) 3D processor ("AuthenticAMD" 586-class)

With PHP 4.3.6, althou I'm sure it will work just as well on PHP5 too. :)

I'll let you know if it works, trying it now...
 [2004-05-09 13:40 UTC] jelly_bean_junky at hotmail dot com
Nope didn't work, damn it. :(
 [2004-05-09 14:13 UTC] jelly_bean_junky at hotmail dot com
Okay, I worked it out...

While compiling, do you get an error like this:
*** Warning: linker path does not have real file for library -lc-client.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libc-client and none of the candidates passed a file format test
*** using a file magic. Last file checked: /usr/lib/c-client.a

*** Warning: linker path does not have real file for library -lbz2.
*** ... [blah blah blah] ...
*** ... ... passed a file format test
*** using a file magic. Last file checked: /usr/lib/libbz2.a

*** Warning: libtool could not satisfy all declared inter-library
*** ... [blah blah blah] ...
*** application is linked with the -dlopen flag.

Okay here I have two libraries it can't link properly, so what you need to do is that the compile output just before, it should end with ?-o libphp4.la? and start something like this ?/bin/sh /home/kibble/packages/php-4.3.6/libtool --silent --preserve-dup-deps?

It?s a long string compiling options for the libtool, then all you need to do is remove the references to the lib-c-client and lib-bzip2, so if you have this on the line somewhere, ?blah.lo -lc-client -lssl -lcrypto -lmysqlclient -lintl -lfreetype -lX11 -lXpm -lpng -lz -ljpeg -lexslt -lxml2 -lxslt -lz -ldb-4.2 -lgdbm -lbz2 -lz -lssl -lcrypto -lm -lxml2 -lz -liconv -lm  -o libphp4.la?

You would now have this instead:
?blah.lo -lssl -lcrypto -lmysqlclient -lintl -lfreetype -lX11 -lXpm -lpng -lz -ljpeg -lexslt -lxml2 -lxslt -lz -ldb-4.2 -lgdbm -lz -lssl -lcrypto -lm -lxml2 -lz -liconv -lm  -o libphp4.la?

Can you see I?ve removed the problem libraries ?-lbz2? and ?-lc-client?. Now recompile that with your new string of options and the try ?make install?

p.s. Sorry about the spelling mistake in my first post./comment, that ?Hvae? is meant to say ?Have? **

p.p.s If you get your PHP library working because of this post, please let me know, it?d be great to have some feedback.
 [2004-05-13 20:36 UTC] dparisek at hotmail dot com
I got around this same problem while installing php-4.3.6 by copying the libphp4.so file from the source location - 
<php distribution dir>/.libs/libphp4.so to the modules directory.  Actually I placed the copy (cp) command in the instdso.sh script (called by Makefile) but I assume I could have just as easily copied it manually prior to doing the 'make install'.
 [2004-08-01 02:09 UTC] my-junkmail at earthlink dot net
For x86_64 users, many linux distributions are using a lib64 directory as well as the standard lib directory so both 32 and 64 bit versions are available to your system. If your libtool doesn't know about this, which the one shipped with php doesn't, you will get this error. A lot.

The solution is *in this order*:
-run ./configure with your favorite options
-edit ./libtool: add /usr/lib64 (or wherever yours is) to sys_lib_search_path_spec AND sys_lib_dlsearch_path_spec

then make and make install will run. (although I'm still having issues with mysql's prebuilt binary dist. of libmysqlclient for the x86_64)
 [2004-09-03 18:01 UTC] tuldavid at hotmail dot com
I had the same problem => libphp5.so not found.
Just tried the bunzip2 file instead of the gunzipped tarball and hey presto it works! Well for me anyway ;) Hope that it works for someone else.

============================================================

gentoo x86 kernel 2.4.26
apxs2.0.50
php5.0.1
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Aug 08 21:01:26 2020 UTC