首页 > 解决方案 > Cmake 错误:无法加载缓存。故障排除建议?

问题描述

我正在尝试在 Windows 10 上为 RStudio 编译带有 GPU 支持的 xgboost,如下所示。我已成功完成除最后一步之外的所有步骤。

我收到以下错误:

billp@DESKTOP-63F9UDC MINGW64 ~/xgboost/R-package/build (master)
$ cmake --build . --target install --config Release
Error: could not load cache

尝试在此处遵循此响应,我检查了可用磁盘空间。使用 Windows 资源管理器,我看到我在 Windows (C:) 上有 75 个 166 GB 可用空间。我还尝试了以下命令,但我现在知道 CLion 是什么,并且我假设我没有使用它。

billp@DESKTOP-63F9UDC MINGW64 ~/xgboost/R-package/build (master)
$ File---"Reload CMake Project"
bash: File---Reload CMake Project: command not found

任何建议将不胜感激。

编辑添加:这是我在 Bash 会话中的完整命令会话以进行澄清。

billp@DESKTOP-63F9UDC MINGW64 ~
$ git clone https://github.com/dmlc/xgboost
fatal: destination path 'xgboost' already exists and is not an empty directory.

billp@DESKTOP-63F9UDC MINGW64 ~
$ cd xgboost

billp@DESKTOP-63F9UDC MINGW64 ~/xgboost (master)
$ git submodule init
gi
billp@DESKTOP-63F9UDC MINGW64 ~/xgboost (master)
$ git submodule update

billp@DESKTOP-63F9UDC MINGW64 ~/xgboost (master)
$ cd R-package

billp@DESKTOP-63F9UDC MINGW64 ~/xgboost/R-package (master)
$ R CMD INSTALL .
* installing to library 'C:/Program Files/R/R-4.0.2/library'
Error: ERROR: no permission to install to directory 'C:/Program Files/R/R-4.0.2/library'

billp@DESKTOP-63F9UDC MINGW64 ~/xgboost/R-package (master)
$ mkdir build
mkdir: cannot create directory ‘build’: File exists

billp@DESKTOP-63F9UDC MINGW64 ~/xgboost/R-package (master)
$ cd build

billp@DESKTOP-63F9UDC MINGW64 ~/xgboost/R-package/build (master)
$ cmake .. -G"Visual Studio 16 2019" -DUSE_CUDA=ON -DR_LIB=ON -DLIBR_EXECUTABLE="C:/Program Files/R/R-4.0.2/bin/x64/R.exe"
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
-- CMake version 3.18.0
-- xgboost VERSION: 1.2.0
-- Configured CUDA host compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe
-- CUDA GEN_CODE: --generate-code=arch=compute_35,code=sm_35;--generate-code=arch=compute_50,code=sm_50;--generate-code=arch=compute_52,code=sm_52;--generate-code=arch=compute_60,code=sm_60;--generate-code=arch=compute_61,code=sm_61;--generate-code=arch=compute_70,code=sm_70;--generate-code=arch=compute_75,code=sm_75;--generate-code=arch=compute_75,code=compute_75;
-- Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR)
-- C:/Users/billp/xgboost/dmlc-core/cmake/build_config.h.in -> include/dmlc/build_config.h
DMLC_ROOT point to C:/Users/billp/xgboost/rabit/../dmlc-core
-- LIBR_HOME [C:/Program Files/R/R-4.0.2]
-- LIBR_EXECUTABLE [C:/Program Files/R/R-4.0.2/bin/x64/R.exe]
-- LIBR_INCLUDE_DIRS [C:/Program Files/R/R-4.0.2/include]
-- LIBR_LIB_DIR [C:/Program Files/R/R-4.0.2/bin/x64]
-- LIBR_CORE_LIBRARY [C:/Users/billp/xgboost/R-package/R-package/R.lib]
-- Found R: C:/Program Files/R/R-4.0.2/bin/x64/R.exe
-- LIBR_CORE_LIBRARY C:/Users/billp/xgboost/R-package/R-package/R.lib
-- Configuring done
CMake Warning (dev) in CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "runxgboost".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "xgboost".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in src/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "objxgboost".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in dmlc-core/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "dmlc".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in rabit/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "rabit".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in R-package/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "xgboost-r".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: C:/Users/billp/xgboost/R-package

billp@DESKTOP-63F9UDC MINGW64 ~/xgboost/R-package/build (master)
$ cmake --build . --target install --config Release
Error: could not load cache

billp@DESKTOP-63F9UDC MINGW64 ~/xgboost/R-package/build (master)
$ cmake --build . --target install --config Release -DLIBR_HOME="C:\Program Files\R\R-4.0.2"
Unknown argument -DLIBR_HOME=C:\Program Files\R\R-4.0.2
Usage: cmake --build <dir> [options] [-- [native-options]]
Options:
  <dir>          = Project binary directory to be built.
  --parallel [<jobs>], -j [<jobs>]
                 = Build in parallel using the given number of jobs.
                   If <jobs> is omitted the native build tool's
                   default number is used.
                   The CMAKE_BUILD_PARALLEL_LEVEL environment variable
                   specifies a default parallel level when this option
                   is not given.
  --target <tgt>..., -t <tgt>...
                 = Build <tgt> instead of default targets.
  --config <cfg> = For multi-configuration tools, choose <cfg>.
  --clean-first  = Build target 'clean' first, then build.
                   (To clean only, use --target 'clean'.)
  --verbose, -v  = Enable verbose output - if supported - including
                   the build commands to be executed.
  --             = Pass remaining options to the native tool.

标签: rcmakexgboost

解决方案


推荐阅读