Problem with MySQL client SO file.

From: Jens Ivar Jordre (jens@fi.uib.no)
Date: Wed Sep 12 2001 - 16:59:23 EDT

  • Next message: Hironori Ito: "BB vertex"

    Howdy Brahmsers.
    
    On my system I've configured ROOT with the following:
    ./configure linuxegcs --prefix=/usr/local
    --with-mysql-libdir=/usr/lib/mysql --with-mysql-incdir=/usr/include/mysql
    --enable-soversion --enable-rpath --enable-star.
    
    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")
    
    I then try to connect by calling mainDb->Connect() and the error message
    is the following:
    
    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]
    
    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.
    
    Should it be necessary to add the MySQL lib directory to LD_LIBRARY_PATH
    (or /etc/ld.so.conf for that matter)? 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?
    
    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.
    
    Looking forward to some enlightening answer(s).
    
    Best wishes from
    Jens Ivar
    
    [1]
    http://www.sdcc.bnl.gov/brahms/private/list_hyper/brahms-soft-l/0162.html
    [2]
    http://root.cern.ch/root/roottalk/roottalk01/1065.html
    [3]
    http://root.cern.ch/root/roottalk/roottalk01/1066.html
    
    --
    Jens Ivar Jřrdre
    e-mail:  JensIvar.Jordre@fi.uib.no
    usually:  Dep. of Phys., Allégt. 55, N-5007 BERGEN, NORWAY
    currently: Bldg 510D, P.O.Box 5000, Upton, NY 11973-5000,
    USA phone: +1-631-344-4223
    



    This archive was generated by hypermail 2b30 : Wed Sep 12 2001 - 14:57:40 EDT