[Python-Dev] Need help with C - problem in sqlite3 module

Gerhard Häring gh at ghaering.de
Sat Sep 23 19:31:00 CEST 2006

Hash: SHA1

Looks like I don't know C so well after all ...

Apparently at least gcc on Linux exports all symbols by default that are
not static. This creates problems with Python extensions that export
symbols that are also used in other contexts. For example some people use
Python and the sqlite3 module under Apache, and the sqlite3 module exports
a symbol cache_init, but cache_init is also used by Apache's mod_cache
module. Thus there are crashes when using the sqlite3 module that only
occur in the mod_python context.

Can somebody with more knowledge about C tell me how to fix the sqlite3
module or compiler settings for distutils so that this does not happen?

Of course this only happens because the sqlite3 module is distributed among
multiple .c files and thus I couldn't make everything "static".

Thanks in advance.

- -- Gerhard
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the Python-Dev mailing list