1
votes

I want to use ctest on arm target system. So tried to arm-crosscompile cmake(which includes ctest) but only failed. I built arm cross compiler with cross-ng as guided in the url below:

http://www.kitware.com/blog/home/post/426

My test arm machine is raspberry-pi. So the guide above helped me get arm cross compiler.

With this arm cross compiler I successfully built and tested helloworld!

But, with this arm cross compiler I fail to compile cmake-2.8.12.2 as shown below.

mkdir -p /somepath/bin/cmake

cd /somepath/bin/cmake

cmake -DCMAKE_TOOLCHAIN_FILE=/home/me/bin/RaspberryPi/CMakeToolChain/Toolchain-RaspberryPi.cmake /somepath/src/cmake-2.8.12.2

With this way, I get errors but cmake, ctest and cpack are built. And they are arm binaries. But when I scp ctest into my Raspberry-Pi and test, it fails with the message below:

./ctest: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.15' not found (required by ./ctest)

Let me post my toolchain file.

SET(CMAKE_SYSTEM_NAME Linux)

SET(CMAKE_SYSTEM_VERSION 1)

SET(CMAKE_C_COMPILER /home/me/local/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc)

SET(CMAKE_CXX_COMPILER /home/me/local/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-g++)

SET(CMAKE_FIND_ROOT_PATH /home/me/local/x-tools/arm-unknown-linux-gnueabi)

SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

Could someone guide me how to get arm version of ctest?

1

1 Answers

1
votes

I found the solution for the error message below:

./ctest: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.15' not found (required by ./ctest)

My target machine is raspberry-pi. And the version of libc.so.6 on it is version 2.13! I had to configure this from the menuconfig of crosstool-ng. Choosing the right version of libc from the menuconfig of crosstool-ng is the solution.

Thank you very much stackoverflows.com!