php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20701 ld: can't locate file for: -laprutil and after
Submitted: 2002-11-28 10:54 UTC Modified: 2002-12-08 02:45 UTC
From: esj at ufr-info-p6 dot jussieu dot fr Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 4CVS-2002-11-28 (dev) OS: Mac OS 10.2.2
Private report: No CVE-ID: None
 [2002-11-28 10:54 UTC] esj at ufr-info-p6 dot jussieu dot fr
I tried to install php 4.4.0dev with Apache 2.0.43 by doing:

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-pgsql
make

and got:

ld: can't locate file for: -laprutil

I deduced from bug reports on other OS that my be this file
was not necessary, and removed "-laprutil" from the makefile.
Then, make goes further, with similar problems.
You will find below the diff between the original Makefile
and the final. With this, make achieve its goal, and php
seems to work, and to connect to the pgsql server through
my browser. 
However, ld produced a lot of warnings about multiple
definition

ld: warning multiple definitions of symbol _XmlInitEncodingNS
ext/xml/expat/xmltok.o definition of _XmlInitEncodingNS in section (__TEXT,__text)
/usr/local/apache2/bin/httpd definition of _XmlInitEncodingNS

and lot of others. Is there any problems with this ?


Here is the diff :

14c14
< MH_BUNDLE_FLAGS = -bundle -bundle_loader /usr/local/apache2/bin/httpd -L/Users/Shared/httpd-2.0.43/srclib/apr-util/xml/expat/lib -L/usr/local/apache2/lib -laprutil /Users/Shared/httpd-2.0.43/srclib/apr-util/xml/expat/lib/libexpat.la -L/usr/local/apache2/lib -lapr-0 -lm
---
> MH_BUNDLE_FLAGS = -bundle -bundle_loader /usr/local/apache2/bin/httpd -L/Users/Shared/httpd-2.0.43/srclib/apr-util/xml/expat/lib -L/usr/local/apache2/lib -L/usr/lib -lssl -lcrypto
69c69
< EXTRA_LIBS = -lpq -lm
---
> EXTRA_LIBS = -lpq -lm -lssl -lcrypto
84c84
< PHP_LDFLAGS = -L/usr/local/pgsql/lib
---
> PHP_LDFLAGS = -L/usr/local/pgsql/lib -L/usr/lib


-------

E. Saint-James

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-28 22:01 UTC] iliaa@php.net
Does it compile if you remove the  --with-apxs2=/usr/local/apache2/bin/apxs configure option?
 [2002-11-29 08:38 UTC] esj at ufr-info-p6 dot jussieu dot fr
> Does it compile if you remove the 
> --with-apxs2=/usr/local/apache2/bin/apxs configure option?

YES

esj
 [2002-12-07 01:59 UTC] iliaa@php.net
Please try using this CVS snapshot:

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

try compiling with --with-apxs2 without specifying the patch to the apxs utility.
 [2002-12-07 15:23 UTC] esj at ufr-info-p6 dot jussieu dot fr
With the new release and no patch in the makefile,
the aprutil library is found but I got:
ld: Bad magic number
I think now the problem is not in Php but in Apache2. 
The path to this library belongs
to Apache source tree, not the install tree,
as if the install fails to build the library
for my machine, leaving a pointer to a (useless)
default library in the source tree. I continue
to investigate this.
Thanks a lot
 [2002-12-08 02:45 UTC] sniper@php.net
Not PHP bug -> bogus.

 [2003-01-04 23:28 UTC] bchesneau at mac dot com
If we remove path of apxs2 and have apache 1.3 installed 
configure  first detect apache1 and stop.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 24 03:01:33 2024 UTC