[CMake] CMake compiler check failure
Bill Hoffman
bill.hoffman at kitware.com
Sat May 29 14:15:12 EDT 2010
On 5/28/2010 7:07 PM, Zhenyao Mo wrote:
> I got the following errors when CMake tests my compilers. The problem
> is that it seems CMake is checking /usr/bin/gcc, instead of the
> /usr/bin/armv7a-cros-linux-gnueabi-gcc it should have checked.
>
> I manually tried /usr/bin/armv7a-cros-linux-gnueabi-gcc, and it compiles
> fine, and manually tried /usr/bin/gcc, it failed with the same errors as
> below.
>
> So why CMake identified the correct compiler
> (armv7a-cros-linux-gnueabi-gcc), but when it checked the compiler (gcc),
> it used the wrong one?
>
> Thanks in advance for any help.
>
> - Mo
>
> ---------------------------------------------------------------------------------------------------------
> below is the error messages.
> ---------------------------------------------------------------------------------------------------------
>
> -- The C compiler identification is unknown
> -- The CXX compiler identification is unknown
> -- Check for working C compiler: /usr/bin/armv7a-cros-linux-gnueabi-gcc
> -- Check for working C compiler: /usr/bin/armv7a-cros-linux-gnueabi-gcc
> -- broken
> CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:32
> (MESSAGE):
> The C compiler "/usr/bin/armv7a-cros-linux-gnueabi-gcc" is not able to
> compile a simple test program.
>
> It fails with the following output:
>
> Change Dir:
> /build/arm-generic/tmp/portage/app-text/poppler-0.12.3-r3/work/poppler-0.12.3_build/CMakeFiles/CMakeTmp
>
>
>
> Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast"
>
> /usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
> CMakeFiles/cmTryCompileExec.dir/build
>
> gmake[1]: Entering directory
>
> `/build/arm-generic/tmp/portage/app-text/poppler-0.12.3-r3/work/poppler-0.12.3_build/CMakeFiles/CMakeTmp'
>
>
> /usr/bin/cmake -E cmake_progress_report
>
> /build/arm-generic/tmp/portage/app-text/poppler-0.12.3-r3/work/poppler-0.12.3_build/CMakeFiles/CMakeTmp/CMakeFiles
> 1
>
> Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o
>
> /usr/bin/gcc -O2 -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon
> -mfloat-abi=softfp -I/build/arm-generic/usr/include/
> -I/build/arm-generic/include/ -o
> CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c
>
> /build/arm-generic/tmp/portage/app-text/poppler-0.12.3-r3/work/poppler-0.12.3_build/CMakeFiles/CMakeTmp/testCCompiler.c
>
Try removing the whole build tree, it may have some left over stuff from
a wrong selection of the compiler at some point.
-Bill
More information about the CMake
mailing list