"C compiler identification is unknown" error on Debian (ARM)

asked 2016-01-09 14:25:09 -0500

Hi, I am getting this error when trying to compile from source:

-- The CXX compiler identification is GNU 4.9.2
-- The C compiler identification is unknown
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- broken
CMake Error at /usr/share/cmake-3.0/Modules/CMakeTestCXXCompiler.cmake:54 (message):
  The C++ compiler "/usr/bin/g++" is not able to compile a simple test
  program.

  It fails with the following output:
...
 g++: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found

compilation terminated.

It appears that it can't recognize my compiler(s), I am using the following command:

cmake  -D CMAKE_BUILD_TYPE=RELEASE -D WITH_OPENGL=ON -D WITH_TBB=ON -D WITH_V4L=ON -D ENABLE_VFPV3=ON -D ENABLE_NEON=ON -D BUILD_EXAMPLES=ON -D CMAKE_INSTALL_PREFIX=/usr/local/ -D CMAKE_CXX_COMPILER=/usr/bin//g++ -D CMAKE_CXX_FLAGS=  -D CMAKE_C_COMPILER=/usr/bin//gcc -D CMAKE_C_FLAGS=  -D CMAKE_EXE_LINKER_FLAGS=  -D CMAKE_TOOLCHAIN_FILE=/opt/opencv/platforms/linux/arm-gnueabi.toolchain.cmake /opt/opencv

My platform info is:

OS: Debian 8.2, kernel Linux 3.10.80-10-odrobian
HW: odroid C1+ (Amlogic ARM® Cortex®-A5(ARMv7))

GCC -v output:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.9/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.9.2 (Debian 4.9.2-10)

Any help would be appreciated.

Thx

edit retag flag offensive close merge delete