php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19918 no libphp4.so produced
Submitted: 2002-10-15 11:23 UTC Modified: 2003-02-25 09:09 UTC
Votes:11
Avg. Score:5.0 ± 0.0
Reproduced:7 of 7 (100.0%)
Same Version:3 (42.9%)
Same OS:5 (71.4%)
From: mad at dactar dot ch Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.3.1 OS: HP-UX 11.00
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: mad at dactar dot ch
New email:
PHP Version: OS:

 

 [2002-10-15 11:23 UTC] mad at dactar dot ch
I can compile php with apache 2.0.43 but there's no libphp4.so produced.

configure line : 

./configure \
--enable-debug \
--with-config-file-path=/PKl01h01/soft/web/cfg \
--without-mysql \
--without-gd \
--prefix=/PKl01h01/soft/web \
--with-apxs2=/PKl01h01/soft/web/httpd/bin/apxs

make : no errors
make install : 

Installing PHP SAPI module
/PKl01h01/soft/web/httpd/build/instdso.sh SH_LIBTOOL='/PKl01h01/soft/web/httpd/build/libtool' libphp4.la /PKl01h01/soft/web/httpd/modules
/PKl01h01/soft/web/httpd/build/libtool --mode=install cp libphp4.la /PKl01h01/soft/web/httpd/modules/
cp .libs/libphp4.lai /PKl01h01/soft/web/httpd/modules/libphp4.la
cp .libs/libphp4.a /PKl01h01/soft/web/httpd/modules/libphp4.a
ranlib /PKl01h01/soft/web/httpd/modules/libphp4.a
chmod 644 /PKl01h01/soft/web/httpd/modules/libphp4.a
libtool: install: warning: remember to run `libtool --finish /PKl01h01/soft/src/php4httpd/libs'
Warning!  dlname not found in /PKl01h01/soft/web/httpd/modules/libphp4.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /PKl01h01/soft/web/httpd/modules/libphp4.so
chmod: can't access /PKl01h01/soft/web/httpd/modules/libphp4.so
apxs:Error: Command failed with rc=65536
.
*** Error exit code 1

Stop.

if I look into libs directory, there's no shared library : 

-rw-r--r--   1 xxx   xxx   10057366 Oct 15 18:09 libphp4.a
-rw-r-----   1 xxx   xxx        698 Oct 15 18:09 libphp4.la

What can I do ??

PS : it works with apache 1.3.x

@++
JC

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-26 18:46 UTC] pbriggs at clinitech dot net
Using the latest CVS snapshot php4-STABLE-200211262230, I was able to locate what I believe to be the problem.  Apparently PHP is trying to link in -lcrypt, and because libcrypt.a is not a shared library object, libtool is complaining and then not creating a shared libphp.so object because of it:

*** Warning: linker path does not have real file for library -lcrypt.
*** 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 libcrypt and none of the candidates passed a file format test
*** using a file magic. Last file checked: /usr/lib/libcrypt.a

*** 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.

So what I did was re-run the last libtool command, which is supposed to link all the objects together, and create a libphp4.so, but I took out the -lcrypt portion of the command. Once that was done, a libphp4.so was created as expected, and then a 'make install' worked also as expected putting libphp4.so into /opt/apache/modules.  Starting apache so far also works without an error about 'Bad magic number'.  I took a gamble that php didn't use or require the crypt library, otherwise I was half expecting to get an error from dld.sl about missing reference to 'crypt', but so far so good.
 [2003-02-18 22:58 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

I have added a possible fix for this problem.
Now if crypt() is found in libc, then we don't
force adding of libcrypt anymore.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu May 08 21:01:31 2025 UTC