0

I am trying to build some project (crocoddyl) against the conda environment using CMake. Build command is:

cmake -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX ${CMAKE_ARGS} -S . -B build

I have all the necessary dependencies, namely pinocchio, libboost-python-devel, eignepy. CMake successfully finds eignepy, it is fine, however, when eigenpy checks for boost-python dependency, everything crashes with error:

CMake Error at /home/m8/micromamba/envs/sber-croc/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Boost (missing: python310) (found version "1.85.0")
Call Stack (most recent call first):
  /home/m8/micromamba/envs/sber-croc/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /home/m8/micromamba/envs/sber-croc/share/cmake-3.29/Modules/FindBoost.cmake:2393 (find_package_handle_standard_args)
  /home/m8/micromamba/envs/sber-croc/lib/cmake/eigenpy/boost.cmake:144 (find_package)
  /home/m8/micromamba/envs/sber-croc/lib/cmake/eigenpy/eigenpyConfig.cmake:149 (SEARCH_FOR_BOOST_PYTHON)
  cmake/package-config.cmake:110 (find_package)
  CMakeLists.txt:90 (add_project_dependency)

I know for sure, that $CONDA_PREFIX/lib contains libboost_python310.so and libboost_python310.so.1.84.0. However my host system does not have python bindings and only has 1.85.0 version of boost. So I think that during CMake, somehow find_package of eigenpy messes with prefixes and looks in the wrong lib dir.

How do I either ignore the system lib or properly specify prefixes?

I have tried export CMAKE_PREFIX_PATH=$CONDA_PREFIX as well as -DCMAKE_PREFIX_PATH=$CONDA_PREFIX with no luck. Exporting LD_LIBRARY_PATH did not have effect either. CMake, compilers, pkg-config, everything is installed in conda environment.

0

1 Answer 1

0

For anyone who might face this issue. The answer is that boost has own FindBoost. It might be useful to specify Boost_DEBUG to debug issues. Also consider using BOOST_INCLUDEDIR and BOOST_LIBRARYDIR, they solved the issue for me and helped to avoid the system installation. This link is particularly helpful: https://discourse.cmake.org/t/findboost-ignores-all-hints-and-wont-find-the-right-installation/3883

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.