cmake 不适用于树莓派 2
cmake not working on Raspberry Pi 2
>我正在尝试在运行Raspbian Jessie的Raspberry Pi 2上构建OpenCV 3.0.0。安装所有依赖项后,我尝试使用以下参数运行 cmake:cmake -D CMAKE_C_COMPILER=/usr/bin/gcc -D CMAKE_CXX_COMPILER=/usr/bin/c++ -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
但后来我得到了以下错误。
CMake Error: Error in cmake code at
/usr/share/cmake-3.0/Modules/CMakeDetermineCXXCompiler.cmake:112:
Parse error. Function missing ending ")". End of file reached.
CMake Error: Could not find cmake module file: /usr/share/cmake-3.0/Modules/CMakeDetermineCXXCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Could not find cmake module file: /home/pi/Downloads/opencv-3.0.0/release/CMakeFiles/3.0.2/CMakeCXXCompiler.cmake
CMake Error: Error in cmake code at
/usr/share/cmake-3.0/Modules/CMakeDetermineCCompiler.cmake:119:
Parse error. Expected a command name, got unquoted argument with text "".
CMake Error: Could not find cmake module file: /usr/share/cmake-3.0/Modules/CMakeDetermineCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Could not find cmake module file: /home/pi/Downloads/opencv-3.0.0/release/CMakeFiles/3.0.2/CMakeCCompiler.cmake
CMake Error: Error in cmake code at
/usr/share/cmake-3.0/Modules/CMakeCXXInformation.cmake:221:
Parse error. Function missing ending ")". End of file reached.
CMake Error: Could not process cmake module file: /usr/share/cmake-3.0/Modules/CMakeCXXInformation.cmake
-- Check for working CXX compiler: /usr/bin/c++
CMake Error at /usr/share/cmake-3.0/Modules/CMakeTestCXXCompiler.cmake:40 (try_compile):
Unknown extension ".cxx" for file
/home/pi/Downloads/opencv-3.0.0/release/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
try_compile() works only for enabled languages. Currently these are:
C CXX
See project() command to enable other languages.
Call Stack (most recent call first):
CMakeLists.txt:88 (project)
-- Check for working CXX compiler: /usr/bin/c++ -- broken
CMake Error at /usr/share/cmake-3.0/Modules/CMakeTestCXXCompiler.cmake:54 (message):
The C++ compiler "/usr/bin/c++" is not able to compile a simple test
program.
It fails with the following output:
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:88 (project)
CMake Error: Error in cmake code at
/usr/share/cmake-3.0/Modules/CMakeCInformation.cmake:113:
Parse error. Function missing ending ")". End of file reached.
CMake Error: Could not process cmake module file: /usr/share/cmake-3.0/Modules/CMakeCInformation.cmake
-- Configuring incomplete, errors occurred!
See also "/home/pi/Downloads/opencv-3.0.0/release/CMakeFiles/CMakeOutput.log".
See also "/home/pi/Downloads/opencv-3.0.0/release/CMakeFiles/CMakeError.log".
有什么建议吗?
这实际上不是一个解决方案,但我再次重新安装了我的 Raspberry Pi,但这次使用的是较旧的 Raspbian 版本"Wheezy"。在 Wheezy 上,一切都很好。所以我想Raspbian"Jessie"与OpenCV和/或cmake有问题。
相关文章:
- FLTK 2.0构建和演示,适用于VS2019的2011年左右的代码库
- "string.h"在构建适用于iOS的qt应用程序中找不到消息
- 为什么 std::erase(std::erase_if) 不是适用于<algorithm>任何容器的模板?
- 为什么这适用于 G++ 而不是 CLANG?
- 为什么不区分大小写适用于 std::unordered_set的 std::hash 函数?
- 声明适用于 auto,但不能显式声明类型?
- 什么是通用运行时组件 #ifdef 适用于Windows(UWP)而不是iOS
- Windows 上的 Cmake 不添加共享库路径(适用于 linux)
- Typedef适用于结构,但不适用于枚举,仅适用于C++
- 为什么函数模板不理解 NULL,但适用于 nullptr
- 链接器读取库,但在其中找不到符号?未解析的外部符号,但仅适用于 Win32 而不是 x64
- Netbeans 8.1(适用于 C/C++)找不到我的编译器(gcc-6.0.0 开发版本)
- random_shuffle() 适用于 Windows,但不能在 Linux 上编译
- C++指针到方法模板推导在面向 x86 时不编译,但适用于 x64
- 不在异常中嵌入std::字符串的规则是否仍然适用于move构造函数
- 移动文件夹Windows c++:适用于Vista及以上版本,不包括XP
- 适用于Android的Qt找不到任何兼容的设备答案找到但不知道如何
- 在Windows 7上不起作用,但它适用于Windows 8 dll。
- 可变参数模板转换为 std::function<R(ARGS...)>适用于 GCC 而不是 MSVC2013,为什么?
- C++11 cmath 函数不在 std 命名空间中,适用于 android NDK w/gcc-4.8 或 clang