Menu

complie error

Help
2002-09-16
2013-04-17
  • Stephen Liu

    Stephen Liu - 2002-09-16

    disciver complie error in redhat 7.2

    checking whether to build shared libraries... yes
    checking whether to build static libraries... no
    checking whether -lc should be explicitly linked in... no
    creating libtool
    checking for mysql_connect in -lmysqlclient... no
    configure: error: Unable find a functioning MySQL library

    I already install mysql, mysqlclinet9, mysql-server, mysql-devel. I don't missing any package about this error message

    configure:5629: checking for mysql_connect in -lmysqlclient
    configure:5648: gcc -o conftest -g -O2 -I /usr/include/mysql   conftest.c -lmysqlclient   1>&5
    /usr/bin/ld: cannot find -lmysqlclient
    collect2: ld returned 1 exit status
    configure: failed program was:
    #line 5637 "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_connect();

    int main() {
    mysql_connect()
    ; return 0; }

     
    • Ben Goodwin

      Ben Goodwin - 2002-11-20

      You may have figured this out by now but:

      Which version of libnss-mysql?
      Older versions of libnss-mysql didn't check for installations in the area that the RPMs you probably used installed the MySQL libraries in.  If the current version (0.6) doesn't solve the problem, you can tell "configure" where to find the mysql libraries.  First, determine where your library is (type 'locate libmysqlclient') - the directory where libmysqlclient.* is what you want.  Then just include that on the configure line:
      ./configure --with-mysql-lib=/path/to/library
      and that should do the trick.

         -=| Ben

       
  • Luis Rodriguez

    Luis Rodriguez - 2010-09-10

    I'm having the same problem here.

    I´m using centos 5.4, have all mysql libraries installed (vr is 5.0.77-4) and libnss-mysql vr is 1.5

    Here's what the log says:

    configure:19756: checking for main in -lmysqlclient
    configure:19780: gcc -o conftest -g -O2 -I /usr/include/mysql  -D_REENTRANT -L/usr/lib/mysql  conftest.c -lmysqlclient  -lz -ldl -lm -lnsl -Wl,-znodelete  >&
    5
    /usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when searching for -lmysqlclient
    /usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient
    /usr/bin/ld: cannot find -lmysqlclient
    collect2: ld returned 1 exit status
    configure:19786: $? = 1
    

    Am I using the wrong version of mysql or lbnss?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.