Fail to build current Gazebo git

Issue #2059 new
Pei JIA
created an issue

Environment:

OS: Ubuntu 16.04.1 GCC/G++: 5.4.0 CMakeError.log under CMakeFiles gave me the following error message:

Determining if the pthread_create exist failed with the following output: Change Dir: ....../gazebo/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_7c4e6/fast" /usr/bin/make -f CMakeFiles/cmTC_7c4e6.dir/build.make CMakeFiles/cmTC_7c4e6.dir/build make[1]: Entering directory '....../gazebo/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_7c4e6.dir/CheckSymbolExists.c.o /usr/bin/cc -o CMakeFiles/cmTC_7c4e6.dir/CheckSymbolExists.c.o -c ....../gazebo/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c Linking C executable cmTC_7c4e6 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7c4e6.dir/link.txt --verbose=1 /usr/bin/cc CMakeFiles/cmTC_7c4e6.dir/CheckSymbolExists.c.o -o cmTC_7c4e6 -rdynamic CMakeFiles/cmTC_7c4e6.dir/CheckSymbolExists.c.o: In function main': CheckSymbolExists.c:(.text+0x16): undefined reference topthread_create' collect2: error: ld returned 1 exit status CMakeFiles/cmTC_7c4e6.dir/build.make:97: recipe for target 'cmTC_7c4e6' failed make[1]: [cmTC_7c4e6] Error 1 make[1]: Leaving directory '....../gazebo/build/CMakeFiles/CMakeTmp' Makefile:126: recipe for target 'cmTC_7c4e6/fast' failed make: [cmTC_7c4e6/fast] Error 2

File ....../gazebo/build/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: ....../gazebo/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_0da70/fast" /usr/bin/make -f CMakeFiles/cmTC_0da70.dir/build.make CMakeFiles/cmTC_0da70.dir/build make[1]: Entering directory '....../gazebo/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_0da70.dir/CheckFunctionExists.c.o /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_0da70.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.5/Modules/CheckFunctionExists.c Linking C executable cmTC_0da70 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0da70.dir/link.txt --verbose=1 /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_0da70.dir/CheckFunctionExists.c.o -o cmTC_0da70 -rdynamic -lpthreads /usr/bin/ld: cannot find -lpthreads collect2: error: ld returned 1 exit status CMakeFiles/cmTC_0da70.dir/build.make:97: recipe for target 'cmTC_0da70' failed make[1]: [cmTC_0da70] Error 1 make[1]: Leaving directory '....../gazebo/build/CMakeFiles/CMakeTmp' Makefile:126: recipe for target 'cmTC_0da70/fast' failed make: [cmTC_0da70/fast] Error 2

Performing C++ SOURCE FILE Test HAVE_ISNAN failed with the following output: Change Dir: ....../gazebo/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_38373/fast" /usr/bin/make -f CMakeFiles/cmTC_38373.dir/build.make CMakeFiles/cmTC_38373.dir/build make[1]: Entering directory '....../gazebo/build/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_38373.dir/src.cxx.o /usr/bin/c++ -Wall -Wextra -Wno-long-long -Wno-unused-value -Wfloat-equal -Wshadow -Winit-self -Wswitch-default -Wmissing-include-dirs -pedantic -fvisibility=hidden -fvisibility-inlines-hidden -std=c++11 -DHAVE_ISNAN -o CMakeFiles/cmTC_38373.dir/src.cxx.o -c ....../gazebo/build/CMakeFiles/CMakeTmp/src.cxx In file included from ....../gazebo/build/CMakeFiles/CMakeTmp/src.cxx:1:0: ....../gazebo/build/CMakeFiles/CMakeTmp/src.cxx: In function ‘int main()’: ....../gazebo/build/CMakeFiles/CMakeTmp/src.cxx:2:13: error: non-floating-point argument in call to function ‘__builtin_isnan’ int main() {isnan(0); return 1;} ^ CMakeFiles/cmTC_38373.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_38373.dir/src.cxx.o' failed make[1]: [CMakeFiles/cmTC_38373.dir/src.cxx.o] Error 1 make[1]: Leaving directory '....../gazebo/build/CMakeFiles/CMakeTmp' Makefile:126: recipe for target 'cmTC_38373/fast' failed make: [cmTC_38373/fast] Error 2

Source file was:

include <math.h>

int main() {isnan(0); return 1;}

Comments (0)

  1. Log in to comment