php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1647 ld could not find libpcre.a
Submitted: 1999-07-01 17:06 UTC Modified: 1999-07-01 17:22 UTC
From: sterling at nrg-inc dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 3.0.11 OS: RedHat 6.0/Linux 2.2.5
Private report: No CVE-ID: None
 [1999-07-01 17:06 UTC] sterling at nrg-inc dot com
When performing a compile of Apache and PHP3, creating a shared module, I ran PHP3 configure as follows:

./configure --with-shared-apache=../apache_1.3.6 --with-mysql --enable-debug --enable-track-vars

It configured and compiled fine.  However, apache fails to configure under the following directives:

./configure --enable-rule=SHARED_CORE --activate-module=src/modules/php3/libphp3.a --enable-shared=php3 --enable-module=so

It fails with the following message:

Configuring for APache, Version 1.3.6
 + using installation path layout: Apache (config.layout)
 + activated php3 module (modules/php3/libphp3.a)
Creating Makefile
Creating Configuration.apaci in src
/usr/bin/ld: cannot open -lpcre: No such file or directory
collect2: ld returned 1 exit status
make: *** [dummy] Error 1
Creating Makefile in src
 + configured for Linux platform
 + setting C compiler to gcc
 + setting C pre-processor to gcc -E
 + checking for system header files
 + adding selected modules
     o php3_module uses ConfigStart/End
 + enabling generation of Apache core as DSO
 + using -ldl for vendor DSO support
 + doing sanity check on compiler and options
** A test compilation with your Makefile configuration
** failed. This is most likely because your C compiler
** is not ANSI. Apache requires an ANSI C Compiler, such
** as gcc. The above error message from your compiler
** will also provide a clue.
 Aborting!

The library (libpcre.a) is compiled and exists, but is never copied out of the php-3.0.11 source tree, so I manually copied to /usr/lib:

cp ./pcrelib/libpcre.a /usr/lib

This solves the problem, but I'd expect a more automated solution.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-01 17:22 UTC] rasmus at cvs dot php dot net
This is fixed in CVS and will be in 3.0.12, but note that the --with-shared-apache 
mechanism is likely to be deprecated in the future and you should start using
--with-apxs instead.  See README.DSO
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 15:01:29 2024 UTC