Gak! Why are you running cmake under sudo?!?! The horror.
This error is because you haven't added -lpthread
(the POSIX thread library) to your link line. I don't think adding -pthread
to the end of the cmake command line will do that. You'll need to modify the CMakeLists.txt file and ensure the flag is present on both the compilation and link lines.
Or I guess you could try to do it like this:
cmake -DCMAKE_C_COMPILER='/usr/bin/arm-linux-gnueabi-gcc-4.7 -pthread' \
-DCMAKE_CXX_COMPILER='/usr/bin/arm-linux-gnueabi-g++-4.7 -pthread' \
-DCMAKE_INSTALL_PREFIX=/opt ...