I'm trying to compile php 5.1.2 against MySQL 5.0.18
official RPM's.
I have installed the development RPM for MySQL as well.
This is my configure comand:
./configure --with-apxs2=/usr/local/apache-2.0.55/bin/apxs
--prefix=/usr/local/php-5.1.2
--with-mysql=shared,/usr/lib/mysql
I keep getting the following eror:
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check
config.log for more information.
Here is what seems to be the relevant part of config.log
configure:58893: checking for MySQL support
configure:58939: checking for specified location of the MySQL UNIX socket
configure:58996: checking for MySQL UNIX socket location
configure:59182: checking for mysql_close in -lmysqlclient
configure:59201: gcc -o conftest -I/usr/include -g -O2
-L/usr/lib conftest.c -lmysqlclient -lz -lresolv -lm -ldl
-lnsl -lxml2 -lz -lm -lxml2 -lz -lm 1>&5
/usr/lib/gcc-lib/i586-suse-linux/3.3.4/../../../../i586-suse-linux/bin/ld:
cannot find -lmysqlclient
collect2: ld returned 1 exit status
configure: failed program was:
#line 59190 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mysql_close();
int main() {
mysql_close()
; return 0; }
configure:59422: checking for mysql_error in -lmysqlclient
configure:59441: gcc -o conftest -I/usr/include -g -O2
-L/usr/lib conftest.c -lmysqlclient -lz -lresolv -lm -ldl
-lnsl -lxml2 -lz -lm -lxml2 -lz -lm 1>&5
/usr/lib/gcc-lib/i586-suse-linux/3.3.4/../../../../i586-suse-linux/bin/ld:
cannot find -lmysqlclient collect2: ld returned 1 exit
status
configure: failed program was:
#line 59430 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mysql_error();
int main() {
mysql_error()
; return 0; }
I have checked the directory /usr/lib/mysql, and that seems
to have the correct files there.
Am I missing somehing here?
Also, would it be safe to use the same .tar.gz version of
mysql to compile php5 against, then use the compiled version
of php with the RPM mysql version?
Keith
In theory, theory and practice are the same;
In practice they are not.