Closed williamwiebe closed 1 month ago
Thank you very much for the instructions! I have updated the CMakeLists.txt and the setup.py. The build process should now work on Apple Silicon out of the box. See the install instructions in the readme for more information.
Hardware: Apple M1 Max MacBook Pro (2021) System: Ventura 13.6.2
Apple clang version 15.0.0 (clang-1500.0.40.1) Target: arm64-apple-darwin22.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
I installed the following packages with homebrew (specified here), after having issues with
cmake
andnasm
which caused theffmpeg
install to fail:After cloning the repository in installation step 1B, I pulled the current master of
oneTBB
and replaced the submodule downloaded at PyPupilEXT/3rdparty/oneTBB. This was necessary because the Apple clang compiler failed with this issue, which has been fixed in subsequent releases.My build finally compiled! Except when I tried to run the files, it threw an
[ImportError: dlopen(): Symbol not found:.... Expected in: flat namespace]
like this and this. I take it it was because PyPupilEXT specifies x86_64/x64 architectures for the compilers, but my clang was compiling for arm64.So I changed setup.py as follows: line 81:
cmake_args += ["-DVCPKG_TARGET_TRIPLET=arm64-osx"]
Along with CMakeLists.txt: line 60:
set(VCPKG_TARGET_TRIPLET arm64-osx CACHE STRING "")
line 61:set(CMAKE_OSX_ARCHITECTURES arm64 CACHE STRING "")
line 80:CMAKE_ARGS -DTBB_TEST=OFF -DCMAKE_INSTALL_PREFIX=build -DCMAKE_OSX_ARCHITECTURES=arm64 -DBUILD_SHARED_LIBS=OFF -DTBBMALLOC_BUILD=OFF -DTBBMALLOC_PROXY_BUILD=OFF
And now it's running. I think those are all my emendations. Hope this is useful to someone!