I'm trying to play with TurboGears, which requires MySQLdb (since I'm trying to use it against a MySQL database), and I'm getting the following error when importing MySQLdb:
=======================================
ImportError: ld.so.1: python: fatal: libmtmalloc.so.1: DF_1_NOOPEN tagged object may not be dlopen()'ed
=======================================
Now, I've dug as much as I could and am not seeing the issue. Running the import with the verbose option shows that Python is looking in the right place (/usr/local/lib/python2.4/site-packages) for _mysql.so, as seen in:
import MySQLdb # precompiled from MySQLdb/init.pyc
dlopen("./_mysql.so", 2);
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.4/site-packages/MySQLdb/init.py", line 27, in ?
import _mysql
ImportError: ld.so.1: python: fatal: libmtmalloc.so.1: DF_1_NOOPEN tagged object may not be dlopen()'ed
=======================================
I'm not sure where else to look, so any advice would be appreciated.
System Specifics:
Solaris 10
Sun Studio 11
Python 2.4.2 (built from source)
MySQL 5.0.18
MySQLdb 1.2.0
None of the above compiled software had issues compiling installing, and I kept the Solaris-included Python (2.3.3 in /usr/sfw/) out of all my environment variables when compiling it (so things shouldn't be linked to the wrong libs).
Thanks in advance for any help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hmmmm. I can't offer much advice on Solaris. Did you install MySQL binaries from mysql.com? I wonder which compiler it uses. Did you build MySQLdb-1.2.0? (i'm thinking yes since I don't have a binary build for it)
Give 1.2.1c4 a try, since it has an improved build system. It could solve your problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I did use the MySQL binary install, I'm not certain which compiler it uses, but if I had to fathom a guess I'd say GCC (I have a wayward memory of reading it somewhere). I built Python and MySQLdb with Studio 11, which may be the issue. I'll try MySQLdb 1.2.1c4 and see if it helps. If not, I'll try building MySQL from source using Studio 11 and see where that gets me.
Thanks for the quick response.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Excellent. I'll give it another shot tomorrow and see how things go. I've encountered issues with different compilers before, now that I think about it. I won't be surprised if this fails and I have to build MySQL from source. It isn't a big deal, since I have no databases running yet.
Thanks for the quick responses!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everyone,
I'm trying to play with TurboGears, which requires MySQLdb (since I'm trying to use it against a MySQL database), and I'm getting the following error when importing MySQLdb:
=======================================
ImportError: ld.so.1: python: fatal: libmtmalloc.so.1: DF_1_NOOPEN tagged object may not be dlopen()'ed
=======================================
Now, I've dug as much as I could and am not seeing the issue. Running the import with the verbose option shows that Python is looking in the right place (/usr/local/lib/python2.4/site-packages) for _mysql.so, as seen in:
>>> import MySQLdb
import MySQLdb # directory MySQLdb
MySQLdb/init.pyc matches MySQLdb/init.py
import MySQLdb # precompiled from MySQLdb/init.pyc
dlopen("./_mysql.so", 2);
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.4/site-packages/MySQLdb/init.py", line 27, in ?
import _mysql
ImportError: ld.so.1: python: fatal: libmtmalloc.so.1: DF_1_NOOPEN tagged object may not be dlopen()'ed
=======================================
I'm not sure where else to look, so any advice would be appreciated.
System Specifics:
Solaris 10
Sun Studio 11
Python 2.4.2 (built from source)
MySQL 5.0.18
MySQLdb 1.2.0
None of the above compiled software had issues compiling installing, and I kept the Solaris-included Python (2.3.3 in /usr/sfw/) out of all my environment variables when compiling it (so things shouldn't be linked to the wrong libs).
Thanks in advance for any help.
Sorry for the exceedingly long wait. Using Solaris 10 and Sun Studio 11, I've been able to compile everything from scratch and get MySQLdb to work.
The only kicker was I had to use crle to update the runtime linker for the libraries:
crle -u -l /usr/local/mysql/lib/mysql
crle -u -l /usr/local/lib
And everything worked like a champ. This is with the 1.2.1 version (not the alpha/beta version).
Thanks again!
Hmmmm. I can't offer much advice on Solaris. Did you install MySQL binaries from mysql.com? I wonder which compiler it uses. Did you build MySQLdb-1.2.0? (i'm thinking yes since I don't have a binary build for it)
Give 1.2.1c4 a try, since it has an improved build system. It could solve your problem.
I did use the MySQL binary install, I'm not certain which compiler it uses, but if I had to fathom a guess I'd say GCC (I have a wayward memory of reading it somewhere). I built Python and MySQLdb with Studio 11, which may be the issue. I'll try MySQLdb 1.2.1c4 and see if it helps. If not, I'll try building MySQL from source using Studio 11 and see where that gets me.
Thanks for the quick response.
Looks like some files might be missing (or I'm missing something) in the 1.2.1c4 tarball. I get the following error on 'python setup.py build':
=====================================
Traceback (most recent call last):
File "setup.py", line 17, in ?
metadata = dict(config.items('metadata'))
File "/usr/local/lib/python2.4/ConfigParser.py", line 544, in items
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'metadata'
=====================================
Looking at setup.py, it appears to be trying to read site.cfg or metadata.cfg, neither of which exist in the tarball that I extracted.
That's not good. It means I left them out of the MANIFEST.
I'll put up a new tarball tonight.
Excellent. I'll give it another shot tomorrow and see how things go. I've encountered issues with different compilers before, now that I think about it. I won't be surprised if this fails and I have to build MySQL from source. It isn't a big deal, since I have no databases running yet.
Thanks for the quick responses!