Re: [ROOT] Problem loading libMySQL.so

From: Christian Holm Christensen (cholm@hehi03.nbi.dk)
Date: Fri Mar 01 2002 - 10:32:01 MET


Hi Luis, 

On Thu, 28 Feb 2002 20:07:24 +0100
Luis Silva <lsilva@mail.desy.de> wrote
concerning "Re: [ROOT] Problem loading libMySQL.so":
> 	Dear Rene.
> 
> 	Now I understand what you mean.
> 
> 	1. I did all procidure steps in
> http://root.cern.ch/root/Install.html
> 
> 	using configure's flags, in my case, for mysql:
> 
> root@hb-lippc2:/usr/local/root > ./configure linux --build=--enable-mysql
> --with-mysql-libdir=/usr/local/mysql/lib/
> --with-mysql-incdir=/usr/local/mysql/include/
>
> 	3. But when I do gmake, I get:
> ...
> g++ -O -pipe -Wall -Woverloaded-virtual -fPIC -Iinclude/  -D_REENTRANT
> -I/usr/local/mysql/include/ -o mysql/src/TMySQLServer.o -c
> mysql/src/TMySQLServer.cxx
> mysql/src/TMySQLServer.cxx: In method `Int_t
> TMySQLServer::CreateDataBase(const char *)':
> mysql/src/TMySQLServer.cxx:201: implicit declaration of function `int
> mysql_create_db(...)'
> mysql/src/TMySQLServer.cxx: In method `Int_t
> TMySQLServer::DropDataBase(const char *)':
> mysql/src/TMySQLServer.cxx:214: implicit declaration of function `int
> mysql_drop_db(...)'
> gmake: *** [mysql/src/.o] Error 1


Hmm.  Are you sure you've got a compatible version of MySQL?  These
errors has nothing to do with the build system per se.  Rather, it's
errors/warnings that spring up if the functions mysql_drop_db() and
mysql_create_db() have not been declared in your code, either via a
header inclussion or an explicit declaration. 
  
Check if your MySQL headers really does contain the declarations with: 

  grep "mysql_drop_db\|mysql_create_db" /usr/local/mysql/include/mysql.h
 
Some thing like 

  int		STDCALL mysql_create_db(MYSQL *mysql, const char *DB);
  int		STDCALL mysql_drop_db(MYSQL *mysql, const char *DB);

should show up. 

> 	4. And I also did the installation not using configure's flags,
> but instead adding this line to Makefile:
> 
> export MYSQL= /usr/local/mysql/
> 
> 
> 	And then running ./configure, and the paths are also recognized.

The build system works :-)  The reason it still fails, is that it has
nothing to do with the build system. 

> 	6. What am I doing wrong this time?

Something may be screwy in your MySQL installation.  Try installing
the regular RPMs, DEBs, whatever, for your system, if you have that
possiblity.  Otherwise, menace your BOFH [1] until s/he finally
succumbs - usually works for me :-) 
 
Yours, 

Christian Holm Christensen -------------------------------------------
Address: Sankt Hansgade 23, 1. th.           Phone:  (+45) 35 35 96 91 
         DK-2200 Copenhagen N                Cell:   (+45) 28 82 16 23
         Denmark                             Office: (+45) 353  25 305 
Email:   cholm@nbi.dk                        Web:    www.nbi.dk/~cholm

[1] http://bofh.ntk.net/Bastard.html



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:43 MET