Cmake FindBoost错误-POP没有匹配PUSH
Posted
技术标签:
【中文标题】Cmake FindBoost错误-POP没有匹配PUSH【英文标题】:Cmake FindBoost error-POP without matching PUSH 【发布时间】:2020-11-30 09:19:41 【问题描述】:我正在尝试在 Centos 上安装 LightGBM-gpu。貌似boost 1.56可以找到,但是出现了这个错误,google了一天也没解决。
这是消息
$ cmake -DUSE_GPU=1 -DOpenCL_LIBRARY=/usr/local/cuda/lib64/libOpenCL.so -DOpenCL_INCLUDE_DIR=/usr/local/cuda/include/ ..
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenMP_C: -fopenmp (found version "3.1")
-- Found OpenMP_CXX: -fopenmp (found version "3.1")
-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - not found
-- Looking for CL_VERSION_1_2
-- Looking for CL_VERSION_1_2 - found
-- Found OpenCL: /usr/local/cuda/lib64/libOpenCL.so (found version "1.2")
-- OpenCL include directory: /usr/local/cuda/include
Boost 1.56.0 found.
Found Boost components:
filesystem;system
CMake Error in /usr/local/share/cmake-3.9/Modules/FindBoost.cmake:
cmake_policy POP without matching PUSH
Call Stack (most recent call first):
CMakeLists.txt:144 (find_package)
-- Performing Test MM_PREFETCH
-- Performing Test MM_PREFETCH - Success
-- Using _mm_prefetch
-- Performing Test MM_MALLOC
-- Performing Test MM_MALLOC - Success
-- Using _mm_malloc
-- Configuring incomplete, errors occurred!
See also "/home/rd/LightGBM/build/CMakeFiles/CMakeOutput.log".
See also "/home/rd/LightGBM/build/CMakeFiles/CMakeError.log".
【问题讨论】:
看起来像that issue。只需将 CMake(不是 Boost!)更新到任何新版本即可。 【参考方案1】:此问题已作为microsoft/LightGBM#3613 交叉发布到 LightGBM 问题页面。问题在那里解决了。
将 CMake
更新到至少 3.14 版可修复此问题。
【讨论】:
以上是关于Cmake FindBoost错误-POP没有匹配PUSH的主要内容,如果未能解决你的问题,请参考以下文章
有没有办法在 if 语句中将 stack.pop() 与数组(比如“标签”)进行比较? [关闭]
Cmake忍者错误android。尽管文件存在,但“缺少并且没有已知的规则”