MaximeHerpin / modular_tree

GNU General Public License v3.0
1.23k stars 218 forks source link

Doesn't work/build for M1 Macs #320

Open CyanBlob opened 2 years ago

CyanBlob commented 2 years ago

I've tried both compiling from source and importing the latest MacOS release into Blender. It fails in both cases, because Modular Tree seems to only support x86.

Error:

-- Configuring x64-osx-rel
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
    Command failed: /Users/andrew/Development/modular_tree/m_tree/dependencies/vcpkg/downloads/tools/cmake-3.20.2-osx/cmake-3.20.2-macos-universal/CMake.app/Contents/bin/cmake /Users/andrew/Development/modular_tree/m_tree/dependencies/vcpkg/scripts/detect_compiler -DCMAKE_MAKE_PROGRAM=/Users/andrew/Development/modular_tree/m_tree/dependencies/vcpkg/downloads/tools/ninja-1.10.2-osx/ninja -DCMAKE_SYSTEM_NAME=Darwin -DBUILD_SHARED_LIBS=OFF -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=/Users/andrew/Development/modular_tree/m_tree/dependencies/vcpkg/scripts/toolchains/osx.cmake -DVCPKG_TARGET_TRIPLET=x64-osx -DVCPKG_SET_CHARSET_FLAG=ON -DVCPKG_PLATFORM_TOOLSET=external -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE -DCMAKE_VERBOSE_MAKEFILE=ON -DVCPKG_APPLOCAL_DEPS=OFF -DCMAKE_TOOLCHAIN_FILE=/Users/andrew/Development/modular_tree/m_tree/dependencies/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON -DVCPKG_CXX_FLAGS= -DVCPKG_CXX_FLAGS_RELEASE= -DVCPKG_CXX_FLAGS_DEBUG= -DVCPKG_C_FLAGS= -DVCPKG_C_FLAGS_RELEASE= -DVCPKG_C_FLAGS_DEBUG= -DVCPKG_CRT_LINKAGE=dynamic -DVCPKG_LINKER_FLAGS= -DVCPKG_LINKER_FLAGS_RELEASE= -DVCPKG_LINKER_FLAGS_DEBUG= -DVCPKG_TARGET_ARCHITECTURE=x64 -DCMAKE_INSTALL_LIBDIR:STRING=lib -DCMAKE_INSTALL_BINDIR:STRING=bin -D_VCPKG_ROOT_DIR=/Users/andrew/Development/modular_tree/m_tree/dependencies/vcpkg -D_VCPKG_INSTALLED_DIR=/Users/andrew/Development/modular_tree/m_tree/dependencies/vcpkg/installed -DVCPKG_MANIFEST_INSTALL=OFF -DCMAKE_OSX_ARCHITECTURES=x86_64 -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/Users/andrew/Development/modular_tree/m_tree/dependencies/vcpkg/packages/detect_compiler_x64-osx
    Working Directory: /Users/andrew/Development/modular_tree/m_tree/dependencies/vcpkg/buildtrees/detect_compiler/x64-osx-rel
    Error code: 1
    See logs for more information:
      /Users/andrew/Development/modular_tree/m_tree/dependencies/vcpkg/buildtrees/detect_compiler/config-x64-osx-rel-out.log
      /Users/andrew/Development/modular_tree/m_tree/dependencies/vcpkg/buildtrees/detect_compiler/config-x64-osx-rel-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_configure_cmake.cmake:371 (vcpkg_execute_required_process)
  scripts/detect_compiler/portfile.cmake:18 (vcpkg_configure_cmake)
  scripts/ports.cmake:141 (include)

Error: vcpkg was unable to detect the active compiler's information. See above for the CMake failure output.
Traceback (most recent call last):
  File "/Users/andrew/Development/modular_tree/m_tree/install.py", line 58, in <module>
    install()
  File "/Users/andrew/Development/modular_tree/m_tree/install.py", line 26, in install
    install_vcpkg_dependencies()
  File "/Users/andrew/Development/modular_tree/m_tree/install.py", line 44, in install_vcpkg_dependencies
    subprocess.check_call([os.path.join(VCPKG_PATH, "vcpkg"), "install", package+triplet])
  File "/opt/homebrew/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProces
[config-x64-osx-rel-err.log](https://github.com/MaximeHerpin/modular_tree/files/7771078/config-x64-osx-rel-err.log)
[config-x64-osx-rel-out.log](https://github.com/MaximeHerpin/modular_tree/files/7771079/config-x64-osx-rel-out.log)
sError: Command '['/Users/andrew/Development/modular_tree/m_tree/dependencies/vcpkg/vcpkg', 'install', 'eigen3:x64-osx']' returned non-zero exit status 1.
cp: ./m_tree/binaries/m_tree.cpython-39-darwin.so: No such file or directory

Full build and error log are attached.

Attempting to import the addon into Blender (from the Releases page) gives a similar error about the architecture not matching.

Are there plans to support ARM?

htorrendell commented 2 years ago

Same issue here. Any roadmap schedule?

SUP3RMAR1O commented 2 years ago

Same issue, Mac OS 11.6, M1 Mac