#146 Getting undefined symbol pthread_key_delete

MySQLdb-1.2
closed
MySQLdb (285)
5
2012-09-19
2005-07-15
No

After trying to install MySQLdb-1.2.0 on my FreeBSD
server, it gives the following error when I import it.

File
"/usr/local/lib/python2.4/site-packages/MySQLdb/init.py",
line 27, in ?
import _mysql

ImportError:
/usr/local/lib/mysql/libmysqlclient_r.so.12: Undefined
symbol "pthread_key_delete"

I used the port from FreeBSD. I've got Python-2.4.1
without threads, and I wonder if that might be the
problem, although it seems the problem is with MySQL
rather than with Python. Is it at all possible to run
MySQLdb without Python threads support?

Discussion

  • Andy Dustman

    Andy Dustman - 2005-07-15

    Logged In: YES
    user_id=71372

    You are linking against libmysqlclient_r, which is the
    re-entrant version, and needs threads. On linux:

    chef ~ # ldd /usr/lib/mysql/libmysqlclient.so
    linux-gate.so.1 => (0xffffe000)
    libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7e7c000)
    libnsl.so.1 => /lib/libnsl.so.1 (0xb7e66000)
    libm.so.6 => /lib/tls/libm.so.6 (0xb7e43000)
    libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0xb7e0d000)
    libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7
    (0xb7cf8000)
    libz.so.1 => /lib/libz.so.1 (0xb7ce7000)
    libc.so.6 => /lib/tls/libc.so.6 (0xb7bd0000)
    /lib/ld-linux.so.2 (0x80000000)
    libdl.so.2 => /lib/libdl.so.2 (0xb7bcb000)
    chef ~ # ldd /usr/lib/mysql/libmysqlclient_r.so
    linux-gate.so.1 => (0xffffe000)
    libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7e7a000)
    libnsl.so.1 => /lib/libnsl.so.1 (0xb7e64000)
    libm.so.6 => /lib/tls/libm.so.6 (0xb7e41000)
    libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0xb7e0b000)
    libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7
    (0xb7cf6000)
    libz.so.1 => /lib/libz.so.1 (0xb7ce5000)
    libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb7cd3000)
    libc.so.6 => /lib/tls/libc.so.6 (0xb7bbb000)
    /lib/ld-linux.so.2 (0x80000000)
    libdl.so.2 => /lib/libdl.so.2 (0xb7bb7000)

    Note that libmysqlclient.so does not need a thread library.

    Based on the current port:

    http://www.freebsd.org/cgi/cvsweb.cgi/ports/databases/py-MySQLdb/Makefile?rev=1.30&content-type=text/x-cvsweb-markup

    You need this build option: WITHOUT_MYSQLCLIENT_R=yes

    This is an upstream vendor/LNBK issue.

     
  • Nobody/Anonymous

    Logged In: NO

    Thanks! That solved the problem.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks