[CMake] CMake Cross Compiling for arm-linux

Alexander Neundorf a.neundorf-work at gmx.net
Thu Mar 13 13:19:48 EDT 2008


On Thursday 13 March 2008, John Xu wrote:
...
> > /build/cmake_tool/share/cmake-2.4/Modules/Platform/UnknownOS.cmake to use
> > this system, please send your config file to cmake at www.cmake.org so it
> > can be added to cmake
> >
> > -- Check for working C compiler: /cross/arm-linux/bin/arm-linux-gcc --
> > broken
> >
> > CMake Error: The C compiler "/cross/arm-linux/bin/arm-linux-gcc" is not
> > able to compile a simple test program.
> >
> > It fails with the following output:
> >
> > /tools/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make
> > CMakeFiles/cmTryCompileExec.dir/build
> >
> > make[1]: Entering directory `/build/opensync/CMakeFiles/CMakeTmp'
> >
> > /build/cmake_tool/bin/cmake -E cmake_progress_report
> > /build/opensync/CMakeFiles/CMakeTmp/CMakeFiles 1
> >
> > make[1]: Leaving directory `/build/opensync/CMakeFiles/CMakeTmp'
> >
> > /bin/sh: error while loading shared libraries: /usr/lib/libncurses.so.5:
> > ELF file OS ABI invalid
> >
> > make[1]: *** [CMakeFiles/cmTryCompileExec.dir/testCCompiler.o] Error 127
> >
> > make: *** [cmTryCompileExec/fast] Error 2
> >
> >
> >
> > CMake will not be able to correctly generate this project.
> >
> > -- Configuring done
> >
> > make: *** No targets specified and no makefile found. Stop.
> >
> > make: *** No rule to make target `install'. Stop.
> >
> > Part of the build script is as follows:
> >
> > export CC=arm-linux-gcc
> >
> > export CXX=arm-linux-g++

Don't do that, but instead set the cmake variables in the toolchain file.
And use cmake cvs, this doesn't work with 2.4.x.

Alex


More information about the CMake mailing list