0

I am trying to build cppyy via cmake but I keep getting this error:

CPYY_MODULE_PATH: /usr/local/anaconda3/envs/bwcpp_env/lib/python3.10/site-packages/cppyy_backend/cmake
CMake Error at /usr/local/anaconda3/envs/bwcpp_env/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find LibClang (missing: LibClang_PYTHON_EXECUTABLE) (found
  version "/usr/local/anaconda3/envs/bwcpp_env/lib/libclang.dylib")
Call Stack (most recent call first):
  /usr/local/anaconda3/envs/bwcpp_env/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/anaconda3/envs/bwcpp_env/lib/python3.10/site-packages/cppyy_backend/cmake/FindLibClang.cmake:77 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:99 (find_package)

The comment here: Cppyy cmake build unable to find LibClang implies that using the linked findLibClang.cmake file fixes the issue but I checked my file located here: /usr/local/anaconda3/envs/bwcpp_env/lib/python3.10/site-packages/cppyy_backend/cmake/FindLibClang.cmake and found that they were identical and the issue is still there.

I have also tried running with and without these flags but I keep getting the same error

-DLibClang_PYTHON_EXECUTABLE=/usr/local/anaconda3/envs/bwcpp_env/bin/python
-DLibClang_LIBRARY=/usr/local/anaconda3/envs/bwcpp_env/lib/libclang.dylib

shouriha
  • 79
  • 6

1 Answers1

0

Looks like I was actually just missing the python-clang package. I installed that with conda install -c conda-forge python-clang and the problem was fixed.

shouriha
  • 79
  • 6