Ronald Oussoren <ronaldousso...@mac.com> added the comment:
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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44997> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com