using /usr/bin/python3 on Ventura +

Ken Cunningham ken.cunningham.webuse at gmail.com
Sun Nov 27 02:18:28 UTC 2022


Well, it didn’t take very long for that to be a problem. Building llvm and clang-9.0 went OK, but building lldb-9.0 fails:

- Check size of el_rfunc_t - done
-- Found PythonLibs: /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/libpython3.10.dylib (found version "3.10.8")  CMake Error at tools/lldb/cmake/modules/LLDBConfig.cmake:234 (message):
  Found incompatible Python interpreter (3.9) and Python libraries (3.10)
Call Stack (most recent call first):
  tools/lldb/CMakeLists.txt:20 (include)


-- Configuring incomplete, errors occurred!
See also "/opt/local/var/macports/build/_opt_macportsofficial_macports-ports_lang_llvm-9.0/lldb-9.0/work/build/CMakeFiles/CMakeOutput.log".
See also "/opt/local/var/macports/build/_opt_macportsofficial_macports-ports_lang_llvm-9.0/lldb-9.0/work/build/CMakeFiles/CMakeError.log".
Command failed:  cd "/opt/local/var/macports/build/_opt_macportsofficial_macports-ports_lang_llvm-9.0/lldb-9.0/work/build" && /opt/local/bin/cmake -DCMAKE_INSTALL_PREFIX='/opt/local/libexec/llvm-9.0' -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_C_COMPILER="$CC" -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_MODULE_PATH=/opt/local/share/cmake/Modules -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local/libexec/llvm-9.0;/opt/local;/usr" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -Wno-dev -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local/libexec/llvm-9.0;/opt/local;/usr" -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_ENABLE_ASSERTIONS=OFF -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_ENABLE_FFI=ON -DLLVM_BINDINGS_LIST=none -DFFI_INCLUDE_DIR=`pkg-config --cflags-only-I libffi | sed 's/-I//'` -DFFI_LIBRARY_DIR=/opt/local/lib -DDARWIN_osx_ARCHS="x86_64;x86_64h" -DLLDB_CODESIGN_IDENTITY=- -DCLANG_ENABLE_ARCMT=OFF -DCLANG_INCLUDE_TESTS=OFF -DCLANG_ENABLE_STATIC_ANALYZER=OFF -DLLVM_BUILD_RUNTIME=ON -DLIBCXX_ENABLE_SHARED=OFF -DLIBCXX_INSTALL_LIBRARY=OFF -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="13.0" -DCMAKE_OSX_SYSROOT="/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk" ../llvm-9.0.1.src  Exit code: 1


I think we have to spec the pythons, rather than mess around with the system versions. It works sometimes to use the system versions, but not reliably enough to count on all the time.

Ken



> On Nov 26, 2022, at 11:13 AM, Ken Cunningham <ken.cunningham.webuse at gmail.com> wrote:
> 
> Trying to sort out some builds that need a python, as python2.7 is now gone from /usr/bin on newer systems.
> 
> It looks like you can reliably use /usr/bin/python3 on these systems if you have either the CLTs or Xcode installed.
> 
> The version is currently 3.9.6 on Ventura, and may not be the same from release to release, but that may be OK for simple “needs a python” uses, like configuring llvm.
> 
> You folks OK with using this, or do you want the full python3.10 installation instead?
> 
> 
> 
> % DEVELOPER_DIR=/Library/Developer/CommandLineTools /usr/bin/python3 --help
> usage: /Library/Developer/CommandLineTools/usr/bin/python3 
> 
> % /usr/bin/python3 --help
> usage: /Applications/Xcode.app/Contents/Developer/usr/bin/python3 
> 
> 
> 
> 



More information about the macports-dev mailing list