Reputation: 49
I followed this tutorial, Cross compilation for ARM based Linux systems, in order to build Opencv
version 3.3.1 using cmake
for ARM based Linux system (Ubuntu Mate running on ODROID-XU4 Mini PC). For the build process i am running Ubuntu Mate v 16.04.1 x86
.
Note that i already tried to build the same version of Opencv
for my Intel x86 Ubuntu based
running machine by following this tutorial, Opencv Installation in Linux, and i did it successfully. However when building it for ARM using the same machine, i got the following error.
-- The CXX compiler identification is unknown
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:114 (project):
No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:114 (project):
No CMAKE_C_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "/home/jhon/Programs/opencv-3.3.1/arm/CMakeFiles/CMakeOutput.log".
See also "/home/jhon/Programs/opencv-3.3.1/arm/CMakeFiles/CMakeError.log".
Here is my command line that generates this error:
cmake -DCMAKE_TOOLCHAIN_FILE=../platforms/linux/arm-gnueabi.toolchain.cmake ..
Please note that the option -DCMAKE_TOOLCHAIN_FILE
is what tells the cmake
to build Opencv for the ARM based Linux systems and when i tried to remove it, i successfully ended up with building Opencv
for my x86 machine without any errors.
Thanks in advance.
Upvotes: 1
Views: 1523
Reputation: 49
I were always wondering why there is no pre-built binaries for Opencv-Linux (and i still don't know why) so here i put my work for public to benefit from it where it includes Opencv 3.3.1 pre-built versions for Linux x86, x64 and armv7hf (including corresponding java binaries).
OpenCV Linux x86, x62 & armv7hf binaries
Upvotes: 0
Reputation: 66089
OpenCV documentation tells to install only C cross-compiler (package gcc-arm-linux-gnueabi
), but actually OpenCV requires C++ compiler too.
So one need to install g++-arm-linux-gnueabi
package as well.
Upvotes: 1