Re: [pysqlite] failed installation
Gerhard Häring <[email protected]> Wed, 21 Jan 2009 20:46:46 +0100
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
Michael P. Soulier wrote: > Hi, > > I'm trying to build pysqlite2 against python 2.3.7 (production version at > work, ancient, I know). I worked fine on my Ubuntu box but on my Gentoo box > I'm getting a problem. > > I built it from the tarball using distutils. > [...] > ImportError: > /home/msoulier/work/msl8/lib/python2.3/site-packages/pysqlite2/_sqlite.so: > undefined symbol: sqlite3_enable_load_extension > > I don't know why it didn't work, but it looks like the .so is missing a > required interface function. Yep. Apparently your *SQLite* was compiled with nonstandard settings. pysqlite doesn't like that - it assumes SQLite was not compiled with any --disable-this-feature or --disable-that-feature. A quick solution is that you open src/connection.c and remove these lines: #if SQLITE_VERSION_NUMBER >= 3003008 #define HAVE_LOAD_EXTENSION #endif This will lead to HAVE_LOAD_EXTENSION not being defined and the extension loading code of pysqlite not being compiled. -- Gerhard