Hi Jens-Ivar etl al, On Wed, 12 Sep 2001 19:59:23 -0100 (GMT+1) Jens Ivar Jordre <jens@fi.uib.no> wrote concerning "Problem with MySQL client SO file.": > Howdy Brahmsers. > > On my system I've configured ROOT with the following: > ./configure linuxegcs --prefix=/usr/local As of ROOT 3.01/06 there's no "linuxegcs" architecture, only "linux". Use that. > --with-mysql-libdir=/usr/lib/mysql --with-mysql-incdir=/usr/include/mysql > --enable-soversion --enable-rpath --enable-star. Really, if your libmysqlclient.so.10 and mysql.h is some standard location, you do not need to specify that one the command line of the ROOT configure. Standard locations include Library Headers =================================================================== /usr/lib /usr/include /usr/lib/mysql /usr/include/mysql /usr/local/lib /usr/local/include /usr/local/lib/mysql /usr/local/include/mysql /usr/local/mysql/lib /usr/local/mysql/include For the full list, please look through the configure script itself It's not hard to read - there's loads of comments - I should know, I've written it :-) > Testing our DB inteface with bratroot and the following > statements is all fine: > > BrMainDb* mainDb = BrMainDb::Instance(); > mainDb->SetUserName("query"); > mainDb->SetHostName("rcas0005.rcf.bnl.gov"); > mainDb->SetDbName("BrahmsMain") So far, no TSQL[Server|Result|Row] service has been used. > I then try to connect by calling mainDb->Connect() and the error message > is the following: Connect is the first place where you actually do stuff with TSQLServer. > brat [1] mainDb->Connect() > dlopen error: libmysqlclient.so.10: cannot open shared object file: No such file or directory > Load Error: Failed to load Dynamic link library /usr/local/lib/root/libMySQL.so > Error in <BrMainDb::Connect>: User query couldn't connect to database BrahmsMain @ rcas0005.rcf.bnl.gov > (class TSQLServer*)0x0 > *** Interpreter error recovered *** > brat [2] This seems odd, especially if you have libmysqlclient.so.10 in /usr/lib. It seems that you ld.so.cache isn't up-to-date. I guess that the mysql-client package is ill written and does not force a ldconfig call. Log in as root and do a ldconfig, and try again. > However, if I add the directory where libmysqlclient.so.10 is situated > into the LD_LIBRARY_PATH environment variable, the everything works fine. > This directory is of course the one specified in the --with-mysql-libdir > flag when configuring root. The MySQL packages is at fault here. They should always setup ld.so to look in additional directories if the packages does not install in /usr/lib, /lib, /usr/X11R6/lib, /usr/local/lib, or /usr/local/X11R6/lib. Some Linux dists, in particular Redhat (sigh), does not automaitically put /usr/local/lib in /etc/ld.so.conf - really really stupid. Anyway, check that /usr/lib/mysql is in you /etc/ld.so.conf. If not, and you have superuser privileges, add the line and run ldconfig. > Should it be necessary to add the MySQL lib directory to > LD_LIBRARY_PATH (or /etc/ld.so.conf for that matter)? As explained above, the packages are at fault here - or if you built it yourself, you are. > According to you, Christian, in a mail to the soft list [1] one does > not have to add anything to LD_LIBRARY_PATH to use BRAT2. Is there > something that I have missed here? Yes, switch to a proper Linux dist (Debnian GNU/Linux + Progeny updates ofcourse :-) No seriously, what you're missing is good packages. Obviously one can not plan for any eventuallity in the build-system, in particular when you get ill-behaved packages, obscure installs and so on. What I took as a baseline for the build-system, was the assumption of a directory structure organised in a standard way. That is, libraries in /usr/lib (and if in subdirectires, they must be listed in /etc/ld.so.conf), headers in /usr/include and subdirectories, programs in /usr/bin. One of the major headaches of designing the ROOT buildsystem, was the intent to be extremly helpfull towards the end-user. That was one of the lessons I incorporated into the BRAT buildsystem. > I know that this has been mentioned on roottalk (e.g. [2], [3]), but as > far as I can see the only work-around there is the use of > LD_LIBRARY_PATH. You can also add /usr/lib/mysql to Unix.*.Root.DynimacPath in you .rootrc file. Maybe one could add the non-standard paths to /etc/system.rootrc - I'll think about it. > Looking forward to some enlightening answer(s). I don't know if this was enlightened, but I hope it clearifies a few things. > Best wishes from > Jens Ivar > > [1] Glad to see others like my way of doing references (which I got from debian-weekly BTW). 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
This archive was generated by hypermail 2b30 : Thu Sep 13 2001 - 08:23:51 EDT