Re: config problem with mysql RPM libraries
| From: | php at karsites dot net | Date: | Mon, 13 Feb 2006 19:04:52 +0000 |
| Subject: | Re: config problem with mysql RPM libraries | ||
| References: | 1 2 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-17011@lists.php.net to get a copy of this message | ||
Well I seem to have it sorted now.
I linked php5 to the .tar.gz static binary's libraries of
MySQL 5.0.18 .
And am using it with the same version installed as an RPM.
Should be all the same source code, so I cannot see any
problems with that. Hopefull, it will not crash!
This the contents of php5's config.nice
#! /bin/sh
#
# Created by configure
'./configure' \
'--with-apxs2=/usr/local/apache-2.0.55/bin/apxs' \
'--prefix=/usr/local/php-5.1.2' \
'--with-mysql=shared,/downloads/mysql/bin/mysql-standard-5.0.18-linux-i686' \
'--with-mysql-sock=/var/lib/mysql/mysql.sock' \
'--with-zlib-dir=/usr/include' \
'--with-mysqli=shared,/downloads/mysql/bin/mysql-standard-5.0.18-linux-i686/bin/mysql_config'
\
"$@"
Keith
In theory, theory and practice are the same;
In practice they are not.
On Mon, 13 Feb 2006 php@karsites.net wrote:
> To: php-install@lists.php.net
> From: php@karsites.net
> Subject: [PHP-INSTALL] config problem with mysql RPM libraries
>
>
> 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