On Tue, Nov 09, 2004 at 05:11:18PM +0530, shyam kumar wrote:
>
> Hi James/all
> Thank you for the suggestions/help
> There's little progress from the past error.
> i configured using the parameters given but it is telling unable to
> find MyAQL client libraries
> but i had installed mysqlclient software a server software and the
> mysql is working fine,
> may be the problem is with -lmysqlclient since in the /usr/lib/mysql
> we have all
> libmysqlclient.x.x... x=a,so
> and i searched the system for any mysqlclient but no use
> i tried to change the mysql_config file with libmysqlclient for
> mysqlclient but no use
> as i am novice to the script language used, so finding it difficult to
> make it.
> Hope to get the solution.
> thanks in advance
> below is the error code generated.
> [bash]$ ./configure --disable-ssl --with-mysql
> --with-mysql-dir=/usr/lib/mysql
that configure line looks incorrect
--with-mysql-dir=/usr not --with-mysql-dir=/usr/lib/mysql
--with-mysql-dir is set to where lib/mysql/ is
if I do this I get a configure error too:
./configure --disable-ssl --with-mysql --with-mysql-dir=/usr/lib/mysql
Configuring DB support ...
checking whether to compile with MySQL support... searching
checking for mysql_config... /usr/bin/mysql_config
checking mysql version... 3.23.58
checking mysql libs... -L'/usr/lib/mysql' -lmysqlclient -lz -lcrypt -lnsl -lm
checking for mysql_init in -lmysqlclient... no
configure: error: Unable to find MySQL client libraries
if I do this configure with unedited configure I get same problem:
./configure --disable-ssl --with-mysql --with-mysql-dir=/usr
because I haven't fixed the configure script
hmm. work is impinging on this reply
probably by this stage someone else has answered but ... in case not ...
I'm going to expand but the solution is a simple one really - a one line
change to configure script in my case. Hopefully the same for others.
gateway-cvshead/$ grep -Hni MYSQL_LIBS configure
configure:4496: MYSQL_LIBS=""
configure:4498: MYSQL_LIBS="$($MYSQL_CONFIG --libs_r)"
configure:4501: echo "$ac_t"" $MYSQL_LIBS " 1>&6
configure:4509:LIBS="-lmysqlclient_r $MYSQL_LIBS $LIBS"
configure:4537: LIBS="$LIBS $MYSQL_LIBS"
configure:4540: MYSQL_LIBS=""
configure:4544: if test -z "$MYSQL_LIBS" ; then
configure:4545: MYSQL_LIBS="$($MYSQL_CONFIG --libs)"
configure:4548: echo "$ac_t"" $MYSQL_LIBS " 1>&6
configure:4556:LIBS="-lmysqlclient $MYSQL_LIBS $LIBS"
configure:4584: LIBS="$LIBS $MYSQL_LIBS"
gateway-cvshead/$ grep -Hni \$MYSQL_CONFIG configure
configure:4399: case "$MYSQL_CONFIG" in
configure:4401: ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user
override the test with a path.
configure:4404: ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user
override the test with a dos path.
configure:4422:if test -n "$MYSQL_CONFIG"; then
configure:4423: echo "$ac_t""$MYSQL_CONFIG" 1>&6
configure:4428: if test "$MYSQL_CONFIG" = "no"; then
configure:4494: mysql_version=`$MYSQL_CONFIG --version`
configure:4497: if $MYSQL_CONFIG --libs_r &>/dev/null ; then
configure:4498: MYSQL_LIBS="$($MYSQL_CONFIG --libs_r)"
configure:4545: MYSQL_LIBS="$($MYSQL_CONFIG --libs)"
configure:4593: if $MYSQL_CONFIG --include &>/dev/null ; then
configure:4594: CFLAGS="$CFLAGS $($MYSQL_CONFIG --include)"
configure:4595: echo "$ac_t""$($MYSQL_CONFIG --include)" 1>&6
configure:4597: CFLAGS="$CFLAGS $($MYSQL_CONFIG --cflags)"
configure:4598: echo "$ac_t""$($MYSQL_CONFIG --cflags)" 1>&6
configure:5756:[EMAIL PROTECTED]@%$MYSQL_CONFIG%g
each call to $MYSQL_CONFIG is a potential problem
your configure is different to the lastest cvshead configure ... but perhaps
not by much
same principles apply
we want to fix things somewhat like this
bash$ mysql_config --cflags |sed s/\'//g
-I/usr/include/mysql
bash$ MYSQL_CONFIG=mysql_config
bash$ MYSQL_LIBS="$($MYSQL_CONFIG --libs |sed s/\'//g)"
bash$ echo $MYSQL_LIBS
-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm
cp configure configure.oldset_MYSQL_LIBS # or something
edit configure
configure:4498: MYSQL_LIBS="$($MYSQL_CONFIG --libs_r)"
configure:4545: MYSQL_LIBS="$($MYSQL_CONFIG --libs)"
I just edited one line. The --libs line.
If I just change the --libs call to MYSQL_CONFIG in the configure script
my configure is okay.
bash$ ./configure --disable-ssl --with-mysql --with-mysql-dir=/usr
Configuring DB support ...
checking whether to compile with MySQL support... searching
checking for mysql_config... /usr/bin/mysql_config
checking mysql version... 3.23.58
checking mysql libs... -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm
checking for mysql_init in -lmysqlclient... yes
checking mysql includes... -I'/usr/include/mysql'
checking for mysql/mysql.h... yes
checking for mysql/mysql_version.h... yes
checking whether to compile with MySQL support... yes
checking whether to compile with LibSDB support... disabled
checking whether to compile with SQLite support... disabled
checking whether to compile with Oracle support... disabled
checking whether to compile with PostgresSQL support... disabled
bash$ diff -u configure configure-MYSAL_LIBS_setfix
--- configure 2004-11-09 14:15:18.000000000 +0000
+++ configure-MYSQL_LIBS_setfix 2004-11-09 14:14:41.000000000 +0000
@@ -4542,7 +4542,7 @@
fi
if test -z "$MYSQL_LIBS" ; then
- MYSQL_LIBS="$($MYSQL_CONFIG --libs |sed s/\'//g)"
+ MYSQL_LIBS="$($MYSQL_CONFIG --libs)"
echo $ac_n "checking mysql libs""... $ac_c" 1>&6
echo "configure:4548: checking mysql libs" >&5
echo "$ac_t"" $MYSQL_LIBS " 1>&6
If you still have problems ... send me a diff -u of your edited vs uneditided
configure script ? Or send me the whole script.
James.