【发布时间】:2021-05-01 10:23:35
【问题描述】:
我正在尝试在 Windows 10 上安装 Caffe 框架以使用 python 训练深度学习模型,当我运行文件“build-win.cmd”时遇到以下错误:
The system cannot find the drive specified.
The system cannot find the drive specified.
INFO: ============================================================
INFO: Summary:
INFO: ============================================================
INFO: MSVC_VERSION = 14
INFO: WITH_NINJA = 1
INFO: CMAKE_GENERATOR = "Ninja"
INFO: CPU_ONLY = 0
INFO: CUDA_ARCH_NAME = Auto
INFO: CMAKE_CONFIG = Release
INFO: USE_NCCL = 0
INFO: CMAKE_BUILD_SHARED_LIBS = 0
INFO: PYTHON_VERSION = 2
INFO: BUILD_PYTHON = 1
INFO: BUILD_PYTHON_LAYER = 1
INFO: BUILD_MATLAB = 0
INFO: PYTHON_EXE = "python"
INFO: RUN_TESTS = 0
INFO: RUN_LINT = 0
INFO: RUN_INSTALL = 0
INFO: ============================================================
The system cannot find the path specified.
-- The C compiler identification is Clang 3.7.0
-- The CXX compiler identification is Clang 3.7.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Program Files/LLVM/bin/clang.exe
-- Check for working C compiler: C:/Program Files/LLVM/bin/clang.exe - broken
CMake Error at C:/Users/Aryan/Desktop/cmake/cmake-3.20.2-windows-x86_64/share/cmake-3.20/Modules/CMakeTestCCompiler.cmake:66 (message):
The C compiler
"C:/Program Files/LLVM/bin/clang.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: D:/caffe/scripts/build/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Users/Aryan/Downloads/Compressed/ninja/ninja.exe cmTC_105cf && [1/2] Building C object CMakeFiles/cmTC_105cf.dir/testCCompiler.c.obj
[2/2] Linking C executable cmTC_105cf.exe
FAILED: cmTC_105cf.exe
cmd.exe /C "cd . && C:\PROGRA~1\LLVM\bin\clang.exe CMakeFiles/cmTC_105cf.dir/testCCompiler.c.obj -o cmTC_105cf.exe -Wl,--out-implib,libcmTC_105cf.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
clang.exe: error: unable to execute command: program not executable
clang.exe: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:18 (project)
-- Configuring incomplete, errors occurred!
See also "D:/caffe/scripts/build/CMakeFiles/CMakeOutput.log".
See also "D:/caffe/scripts/build/CMakeFiles/CMakeError.log".
ERROR: Configure failed
我已经为 C 编译器安装了 clang,并且我也将它添加到了 PATH。
任何有关如何克服此错误的解决方案将不胜感激。
【问题讨论】: