Bug #1647: ld could not find libpcre.a
| From: | sterling at nrg-inc dot com | Date: | Thu, 01 Jul 1999 21:06:56 +0000 |
| Subject: | Bug #1647: ld could not find libpcre.a | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-7956@lists.php.net to get a copy of this message | ||
From: sterling@nrg-inc.com
Operating system: RedHat 6.0/Linux 2.2.5
PHP version: 3.0.11
PHP Bug Type: Compile Failure
Bug description: ld could not find libpcre.a
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.