Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem building (MacOS, Homebrew) #49

Closed
MarinDeniaud opened this issue Jul 12, 2023 · 7 comments
Closed

Problem building (MacOS, Homebrew) #49

MarinDeniaud opened this issue Jul 12, 2023 · 7 comments

Comments

@MarinDeniaud
Copy link

Appears to be a problem with cython but I don't know how to proceed

error: subprocess-exited-with-error
  
  × Building wheel for pyg4ometry (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [28 lines of output]
      *** scikit-build-core 0.4.7 using CMake 3.26.4 (wheel)
      *** Configuring CMake...
      2023-07-12 14:22:46,319 - scikit_build_core - WARNING - libdir/ldlibrary: /opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/lib/Python.framework/Versions/3.11/Python is not a real file!
      loading initial cache file build/cpython-311/CMakeInit.txt
      -- Setting build type to 'Release'
      -- Found pybind11: /Users/marindeniaud/venv/py311-prod/lib/python3.11/site-packages/pybind11/include (found version "2.10.4")
      CMake Error at cmake/modules/FindCython.cmake:71 (message):
        Command
        "/private/var/folders/lw/jglsl8693f9_sllwxwgc2fjh0000gn/T/pip-build-env-8w5zpqob/overlay/bin/cython;--version"
        failed with output:
      
      Call Stack (most recent call first):
        CMakeLists.txt:34 (find_package)
      
      
      -- Using header-only CGAL
      -- Targetting Ninja
      -- Using /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ compiler.
      -- Running in macOS DARWIN_VERSION=22
      -- Found Boost: /opt/homebrew/lib/cmake/Boost-1.82.0/BoostConfig.cmake (found suitable version "1.82.0", minimum required is "1.66")
      -- Boost include dirs: /opt/homebrew/include
      -- Boost libraries:
      -- Found CGAL (found version "5.5.2")
      -- Found Boost: /opt/homebrew/lib/cmake/Boost-1.82.0/BoostConfig.cmake (found version "1.82.0")
      -- Found OpenCASCADE (found version "7.7.0")
      -- Configuring incomplete, errors occurred!
      
      *** CMake configuration failed
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyg4ometry
Failed to build pyg4ometry
ERROR: Could not build wheels for pyg4ometry, which is required to install pyproject.toml-based projects
@gipert
Copy link
Member

gipert commented Jul 12, 2023

Hi, the issue is tracked in #19, I just added some instructions there on how to get around it.

@gipert gipert closed this as completed Jul 12, 2023
@MarinDeniaud
Copy link
Author

Thanks for the help ! I tried to remove the build folder and install but I have now a new error :

error: subprocess-exited-with-error
  
  × Building wheel for pyg4ometry (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [50 lines of output]
      *** scikit-build-core 0.4.7 using CMake 3.26.4 (wheel)
      *** Configuring CMake...
      2023-07-12 16:09:59,569 - scikit_build_core - WARNING - libdir/ldlibrary: /opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/lib/Python.framework/Versions/3.11/Python is not a real file!
      loading initial cache file build/cpython-311/CMakeInit.txt
      -- The C compiler identification is AppleClang 14.0.0.14000029
      -- The CXX compiler identification is AppleClang 14.0.0.14000029
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Setting build type to 'Release'
      -- Found Python: /Users/marindeniaud/venv/py311-prod/bin/python3.11 (found version "3.11.4") found components: Interpreter Development.Module
      -- Performing Test HAS_FLTO
      -- Performing Test HAS_FLTO - Success
      -- Performing Test HAS_FLTO_THIN
      -- Performing Test HAS_FLTO_THIN - Success
      -- Found pybind11: /Users/marindeniaud/venv/py311-prod/lib/python3.11/site-packages/pybind11/include (found version "2.10.4")
      -- Found PythonInterp: /Users/marindeniaud/venv/py311-prod/bin/python3.11 (found version "3.11.4")
      -- Found PythonLibs: /opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/Python (found version "3.11.4")
      -- Found Cython: /Users/marindeniaud/venv/py311-prod/bin/cython
      -- Using header-only CGAL
      -- Targetting Ninja
      -- Using /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ compiler.
      -- Running in macOS DARWIN_VERSION=22
      -- Found GMP: /opt/homebrew/lib/libgmp.dylib
      -- Found MPFR: /opt/homebrew/lib/libmpfr.dylib
      -- Found Boost: /opt/homebrew/lib/cmake/Boost-1.82.0/BoostConfig.cmake (found suitable version "1.82.0", minimum required is "1.66")
      -- Boost include dirs: /opt/homebrew/include
      -- Boost libraries:
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
      -- Found Threads: TRUE
      -- Found CGAL (found version "5.5.2")
      -- Found Boost: /opt/homebrew/lib/cmake/Boost-1.82.0/BoostConfig.cmake (found version "1.82.0")
      -- Found OpenCASCADE (found version "7.7.0")
      -- Performing Test Weak Link MODULE -> SHARED (gnu_ld_ignore) - Failed
      -- Performing Test Weak Link MODULE -> SHARED (osx_dynamic_lookup) - Success
      -- Configuring done (1.5s)
      -- Generating done (0.1s)
      -- Build files have been written to: /Users/marindeniaud/PhD/Software/pyg4ometry-gh/build/cpython-311
      *** Building project with Ninja...
      ninja: error: '/opt/homebrew/opt/tbb/lib/libtbb.12.8.dylib', needed by 'src/pyg4ometry/pyoce/BRep.cpython-311-darwin.so', missing and no known rule to make it
      
      *** CMake build failed
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyg4ometry
Failed to build pyg4ometry
ERROR: Could not build wheels for pyg4ometry, which is required to install pyproject.toml-based projects

@gipert gipert reopened this Jul 12, 2023
@gipert
Copy link
Member

gipert commented Jul 12, 2023

Ok, I saw this already once on the GitHub MacOS runners:

https://github.com/g4edge/pyg4ometry/actions/runs/4732759192/jobs/8399328713#step:6:586

It somehow fixed by itself after some time. Seems related to a problem with the OCE installation, but I cannot reproduce it unfortunately since I don't have access to a MacOS machine. You could try upgrading/reinstalling the relevant Homebrew packages.

I'll keep this open, let me know if you figure it out!

@stewartboogert
Copy link
Member

I don’t see this on my Mac with homebrew. @MarinDeniaud can you attach a list of all your installed brew packages.

@gipert
Copy link
Member

gipert commented Jul 12, 2023

FYI this is what we do to configure the MacOS runners:

brew update
brew install --overwrite python # github's fault
brew install boost cgal gmp mpfr opencascade vtk root

@stewartboogert
Copy link
Member

stewartboogert commented Jul 17, 2023

So the OpenCASCADE has an explicit version number to TBB 12.8 and brew version is now TBB 12.9. Can just link or copy the TBB files something like

cd /opt/homebrew/opt/tbb/lib
ln -s libtbb.12.9.dylib libtbb.12.9.dylib
ln -s libtbbmalloc.2.9.dylib libtbbmalloc.2.8.dylib

Thanks @lnevay

@MarinDeniaud
Copy link
Author

With the last changes in Stewart's last message we have been able to fix the installation. Thanks @gipert and @lnevay for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants