This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ronaldoussoren
Recipients erlendaasland, jett8998, ned.deily, ronaldoussoren
Date 2021-08-26.18:44:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1630003459.82.0.77984910435.issue44997@roundup.psfhosted.org>
In-reply-to
Content
Note that sqlite3_enable_load_extension was unavailable way before macOS 11.5.1, the symbol is not present on 10.15 (I used 'nm /usr/lib/libsqlite3.dylib' to check for symbol availability).

Just checking for MACOS and a system include directory should do the trick for giving a nicer error message, something like:

diff --git a/setup.py b/setup.py
index bc2ea16089..ae5d827339 100644
--- a/setup.py
+++ b/setup.py
@@ -1601,6 +1601,9 @@ def detect_sqlite(self):
             if '--enable-loadable-sqlite-extensions' not in sysconfig.get_config_var("CONFIG_ARGS"):
                 sqlite_defines.append(("SQLITE_OMIT_LOAD_EXTENSION", "1"))
 
+            elif MACOS and sqlite_incdir == os.path.join(MACOS_SDK_ROOT, 'usr/include'): 
+                raise DistutilsError("System version of SQLite3 does not support loadable extensions") 
+
             if MACOS:
                 # In every directory on the search path search for a dynamic
                 # library and then a static library, instead of first looking

With this patch I get a nice error message when trying to build with loadable sqlite extensions:

make                                                                                                                                                                      (main)cpython
 CC='gcc' LDSHARED='gcc -bundle -undefined dynamic_lookup    ' OPT='-DNDEBUG -g -fwrapv -O3 -Wall' 	_TCLTK_INCLUDES='' _TCLTK_LIBS='' 	./python.exe -E ../setup.py  build
running build
running build_ext
error: System version of SQLite3 does not support loadable extensions
make: *** [sharedmods] Error 1


My clone of the CPython repository is a bit of a mess at the moment, otherwise I'd have created a PR for this. Feel free to run with this.
History
Date User Action Args
2021-08-26 18:44:19ronaldoussorensetrecipients: + ronaldoussoren, ned.deily, erlendaasland, jett8998
2021-08-26 18:44:19ronaldoussorensetmessageid: <1630003459.82.0.77984910435.issue44997@roundup.psfhosted.org>
2021-08-26 18:44:19ronaldoussorenlinkissue44997 messages
2021-08-26 18:44:19ronaldoussorencreate