在cmake步骤中未找到Boost_program_option

hmtdttj4  于 2022-11-11  发布在  其他
关注(0)|答案(1)|浏览(288)

我正在一个新的conda环境中安装一个名为SuperDCA的生物信息学工具。但是,我在cmake步骤中收到一个错误。它表明:

  1. -- The C compiler identification is GNU 12.1.0
  2. -- The CXX compiler identification is GNU 12.1.0
  3. -- Detecting C compiler ABI info
  4. -- Detecting C compiler ABI info - done
  5. -- Check for working C compiler: /mnt/d/conda/superdca/bin/cc - skipped
  6. -- Detecting C compile features
  7. -- Detecting C compile features - done
  8. -- Detecting CXX compiler ABI info
  9. -- Detecting CXX compiler ABI info - done
  10. -- Check for working CXX compiler: /mnt/d/conda/superdca/bin/CC - skipped
  11. -- Detecting CXX compile features
  12. -- Detecting CXX compile features - done
  13. -- Setting build type to "Release" since none was specified by user.
  14. SUPERDCA_DEPENDENCIES setup: check for Boost
  15. CMake Error at /mnt/d/conda/superdca/lib/cmake/Boost-1.80.0/BoostConfig.cmake:141 (find_package):
  16. Found package configuration file:
  17. /mnt/d/conda/superdca/lib/cmake/boost_program_options-1.80.0/boost_program_options-config.cmake
  18. but it set boost_program_options_FOUND to FALSE so package
  19. "boost_program_options" is considered to be NOT FOUND. Reason given by
  20. package:
  21. No suitable build variant has been found.
  22. The following variants have been tried and rejected:
  23. * libboost_program_options.so.1.80.0 (shared, Boost_USE_STATIC_LIBS=ON)
  24. Call Stack (most recent call first):
  25. /mnt/d/conda/superdca/lib/cmake/Boost-1.80.0/BoostConfig.cmake:262 (boost_find_component)
  26. /mnt/d/conda/superdca/share/cmake-3.24/Modules/FindBoost.cmake:594 (find_package)
  27. externals/boost.cmake:25 (find_package)
  28. externals/CMakeLists.txt:14 (include)
  29. -- Configuring incomplete, errors occurred!
  30. See also "/mnt/d/download/SuperDCA/SuperDCA/build/CMakeFiles/CMakeOutput.log".

因为它显示it set boost_program_options_FOUND to FALSE,我应该将它设置为TRUE吗?
软件包版本包括:

  1. # Name Version Build Channel
  2. boost-cpp 1.80.0 h75c5d50_0 conda-forge
  3. cmake 3.24.1 h5432695_0 conda-forge
iezvtpos

iezvtpos1#

线索就在这里:

  1. * libboost_program_options.so.1.80.0 (shared, Boost_USE_STATIC_LIBS=ON)

假设您的Conda环境只有$CONDA_PREFIX/lib中的Boost共享库,而没有静态库。由于某种原因,您尝试构建的软件将Boost_USE_STATIC_LIBS设置为需要静态链接。不知道为什么会这样,有两种可能的解决方案:
1.找到设置Boost_USE_STATIC_LIBS的位置,然后将其删除。
1.找到一个包含静态库的Boost包。这在Linux上可能很少见,因为大多数时候都使用共享库。

相关问题