Igor Ceh <ceh.i...@outlook.com> added the comment:

I've changed ./Modules/_sqlite/util.h

//#if SQLITE_VERSION_NUMBER >= 3007014
#if SQLITE_VERSION_NUMBER >= 3107014 // Change
#define SQLITE3_CLOSE sqlite3_close_v2
#else
#define SQLITE3_CLOSE sqlite3_close
#endif

#endif

And tried to recompile with a new error:
*** WARNING: renaming "_sqlite3" since importing it failed: 
build/lib.linux-x86_64-3.8/_sqlite3.cpython-38-x86_64-linux-gnu.so: undefined 
symbol: sqlite3_errstr                                                          
                                                                                
                                                                                
                                                                                
                The following modules found by detect_modules() in setup.py, 
have been                                                                       
                                                                                
                built by the Makefile instead, as configured by the Setup 
files:                                                                          
                                                                                
                   _abc                  atexit                pwd
time


Failed to build these modules:
_uuid


Following modules built successfully but were removed because they could not be 
imported:
_sqlite3

Went into ./Modules/_sqlite/connection.c and also changed:
//#if SQLITE_VERSION_NUMBER > 3007015
#if SQLITE_VERSION_NUMBER > 3107015 // Change                                   
                                                                                
                                                                                
                   PyErr_SetString(pysqlite_OperationalError, 
sqlite3_errstr(rc));

With these changes the build was successful and I can import sqlite3. But I 
have no idea if this has any unforeseen consequences.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39410>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to