_mysqlmodule.so
Here are some common errors that happen during the build.
This section covers UNIX/Linux problems only, as I don't do Windows.
.so
is a dynamically loading library on Linux and most other UNIX
variants; a few use extensions other than .so
. Windows probably
uses .dll
.
You have dynamic MySQL libraries, and by default, your compiler links
_mysqlmodule.so
against these, but these are not on your loader path
when you start Python.
You have two basic options:
-static
will do this for gcc/egcs; YMMV for
other C compilers./etc/ld.so.conf
(see
man ldconfig
for more details) or you can add to or create the
LD_LIBRARY_PATH
environment variable before starting Python, i.e.
LD_LIBRARY_PATH=/path/to/mysql/libs python ... # Bourne-ish shell
PyLong_FromUnsignedLongLong()
first appears in Python 1.5.2, so you are
linking against an earlier version. You may also have more than one version
installed. Get Python 1.5.2 from your vendor or python.org.
It seems that MySQL-3.23 client libraries require libz for gzip compression. Add -lz to the link line in Setup.
The include path (-I) to your MySQL include files is wrong; modify
Setup. OR: You don't have the MySQL development stuff loaded. If you
are using the Red Hat RPMs, you need the MySQL-devel
RPM to compile
_mysqlmodule.so
. However, if you link against the static MySQL
libraries (see above), you can install _mysqlmodule.so
on a system
that does not have the MySQL client libraries (libmysqlclient
).
Say no more.
There is a compile.py
script which supposedly gets the job done
for Windows, but I can't test it.