Description
In 3.12.0a2 vs. 3.11.0, the configure script does not reliably select libraries from /usr/local over /usr when available. In fact, in some cases it appears to use headers from /usr/local/include for configuration tests, and then builds against the library in /usr/lib.
e.g.
% CC=clang CXX=clang++ ./configure
.
.
.
% make
.
.
.
./python.exe -E -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
[ERROR] readline failed to import: dlopen(/tera/tera/debo/Projects/Python/v3.12.0a2/build/lib.macosx-10.12-x86_64-3.12/readline.cpython-312-darwin.so, 2): Symbol not found: _rl_completion_suppress_append
Referenced from: /tera/tera/debo/Projects/Python/v3.12.0a2/build/lib.macosx-10.12-x86_64-3.12/readline.cpython-312-darwin.so
Expected in: flat namespace
in /tera/tera/debo/Projects/Python/v3.12.0a2/build/lib.macosx-10.12-x86_64-3.12/readline.cpython-312-darwin.so
The necessary bits to build these optional modules were not found:
_gdbm _tkinter
To find the necessary bits, look in configure.ac and config.log.
Following modules built successfully but were removed because they could not be imported:
readline
Checked 110 modules (30 built-in, 75 shared, 2 n/a on macosx-10.12-x86_64, 0 disabled, 2 missing, 1 failed on import)
In this case, the configure script used the header from /usr/local/include to check for the existence of rl_completion_suppress_append
, and then linked against the library in /usr/lib, which failed.
There are other cases where it selects an library in /usr/lib over a more recent one in /usr/local/lib. Note that the same system builds 3.11.0 and selects the correct libraries without any problems, so this is a new issue in the configure script.
Your environment
Python 3.12.0a2 vs. 3.11.0. Same machine, same toolchain used for both.
macOS 10.12.6 using clang-15.