Test `FindModulesExecuteAll` fails when KDE4 is installed
Building CMake 3.8.0, and running the test suite with /dev/shm/bee-joey/cmake/cmake-3.8.0-0/build/bin/ctest -j60
the tests below fail.
The following tests FAILED:
28 - FindModulesExecuteAll (Failed)
120 - CPackComponents (Failed)
121 - CPackComponentsForAll-RPM-default (Failed)
122 - CPackComponentsForAll-RPM-OnePackPerGroup (Failed)
123 - CPackComponentsForAll-RPM-IgnoreGroup (Failed)
124 - CPackComponentsForAll-RPM-AllInOne (Failed)
436 - GTK2Targets.giomm (Failed)
438 - GTK2Targets.cairomm (Failed)
Errors while running CTest
Please find the start of the log file ./Tests/FindModulesExecuteAll/CMakeFiles/CMakeError.log
below, and the full file attached.
Determining if the pthread_create exist failed with the following output:
Change Dir: /dev/shm/bee-joey/cmake/cmake-3.8.0-0/build/Tests/FindModulesExecuteAll/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_c4d54/fast"
/usr/bin/make -f CMakeFiles/cmTC_c4d54.dir/build.make CMakeFiles/cmTC_c4d54.dir/build
make[1]: Entering directory '/dev/shm/bee-joey/cmake/cmake-3.8.0-0/build/Tests/FindModulesExecuteAll/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_c4d54.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTC_c4d54.dir/CheckSymbolExists.c.o -c /dev/shm/bee-joey/cmake/cmake-3.8.0-0/build/Tests/FindModulesExecuteAll/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_c4d54
/dev/shm/bee-joey/cmake/cmake-3.8.0-0/build/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c4d54.dir/link.txt --verbose=1
/usr/bin/cc -rdynamic CMakeFiles/cmTC_c4d54.dir/CheckSymbolExists.c.o -o cmTC_c4d54
CMakeFiles/cmTC_c4d54.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x16): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_c4d54.dir/build.make:97: recipe for target 'cmTC_c4d54' failed
make[1]: *** [cmTC_c4d54] Error 1
make[1]: Leaving directory '/dev/shm/bee-joey/cmake/cmake-3.8.0-0/build/Tests/FindModulesExecuteAll/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_c4d54/fast' failed
make: *** [cmTC_c4d54/fast] Error 2
File /dev/shm/bee-joey/cmake/cmake-3.8.0-0/build/Tests/FindModulesExecuteAll/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /dev/shm/bee-joey/cmake/cmake-3.8.0-0/build/Tests/FindModulesExecuteAll/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_08fac/fast"
/usr/bin/make -f CMakeFiles/cmTC_08fac.dir/build.make CMakeFiles/cmTC_08fac.dir/build
make[1]: Entering directory '/dev/shm/bee-joey/cmake/cmake-3.8.0-0/build/Tests/FindModulesExecuteAll/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_08fac.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_08fac.dir/CheckFunctionExists.c.o -c /dev/shm/bee-joey/cmake/cmake-3.8.0-0/source/Modules/CheckFunctionExists.c
Linking C executable cmTC_08fac
/dev/shm/bee-joey/cmake/cmake-3.8.0-0/build/bin/cmake -E cmake_link_script CMakeFiles/cmTC_08fac.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -rdynamic CMakeFiles/cmTC_08fac.dir/CheckFunctionExists.c.o -o cmTC_08fac -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_08fac.dir/build.make:97: recipe for target 'cmTC_08fac' failed
make[1]: *** [cmTC_08fac] Error 1
make[1]: Leaving directory '/dev/shm/bee-joey/cmake/cmake-3.8.0-0/build/Tests/FindModulesExecuteAll/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_08fac/fast' failed
make: *** [cmTC_08fac/fast] Error 2
[…]