Home › Forum › SOFA › Building SOFA › [SOLVED] Error at installing a newer CMake version
Tagged: 64_bits, GCC, Linux_ubuntu, SOFA_2006
- This topic has 2 replies, 2 voices, and was last updated 4 years, 2 months ago by Hugo.
-
AuthorPosts
-
22 August 2020 at 09:24 #17053antonio.8196Blocked
Hi dear team, I was trying to install a newer CMake version because I have the 3.10 version.
I have followed these steps:wget https://github.com/Kitware/CMake/releases/download/v3.17.3/cmake-3.17.3.tar.gz tar -zxvf cmake-3.17.3.tar.gz cd cmake-3.17.3 sudo ./bootstrap
here i got a problem and i wrote sudo apt -get install libssl-dev
The problem was solved and I was able to get the message “Cmake has bootstraped. Now run make”
When i write make i get this errorklugerjaeger@klugerjaeger-VirtualBox:~/cmake-3.17.3$ make Scanning dependencies of target cmsys CMake Error: Cannot open file for write: /home/klugerjaeger/cmake-3.17.3/Source/kwsys/CMakeFiles/cmsys.dir/depend.make.tmp CMake Error: : System Error: Permission denied Source/kwsys/CMakeFiles/cmsys.dir/build.make:357: recipe for target 'Source/kwsys/CMakeFiles/cmsys.dir/depend' failed make[2]: *** [Source/kwsys/CMakeFiles/cmsys.dir/depend] Error 2 CMakeFiles/Makefile2:1649: recipe for target 'Source/kwsys/CMakeFiles/cmsys.dir/all' failed make[1]: *** [Source/kwsys/CMakeFiles/cmsys.dir/all] Error 2 Makefile:182: recipe for target 'all' failed make: *** [all] Error 2
any ideas how to solve it? Thanks you very much in advance
22 August 2020 at 18:24 #17054antonio.8196BlockedHi, I was able to install correctly CMAke but now when I try to do the CMake configuration i get this error
Configuring incomplete, errors occurred! See also "/home/klugerjaeger/My-SOFA/build/CMakeFiles/CMakeOutput.log". See also "/home/klugerjaeger/My-SOFA/build/CMakeFiles/CMakeError.log".
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/klugerjaeger/My-SOFA/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/ninja cmTC_6de9b && [1/2] Building C object CMakeFiles/cmTC_6de9b.dir/src.c.o [2/2] Linking C executable cmTC_6de9b FAILED: cmTC_6de9b : && /usr/bin/gcc -DCMAKE_HAVE_LIBC_PTHREAD CMakeFiles/cmTC_6de9b.dir/src.c.o -o cmTC_6de9b && : CMakeFiles/cmTC_6de9b.dir/src.c.o: In function main': src.c:(.text+0x3e): undefined reference to pthread_create' src.c:(.text+0x4a): undefined reference to pthread_detach' src.c:(.text+0x56): undefined reference to pthread_cancel' src.c:(.text+0x67): undefined reference to pthread_join' src.c:(.text+0x7b): undefined reference to pthread_atfork' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed.
Source file was:
#include <pthread.h> void* test_func(void* data) { return data; } int main(void) { pthread_t thread; pthread_create(&thread, NULL, test_func, NULL); pthread_detach(thread); pthread_cancel(thread); pthread_join(thread, NULL); pthread_atfork(NULL, NULL, NULL); pthread_exit(NULL); return 0; }
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/klugerjaeger/My-SOFA/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/ninja cmTC_58820 && [1/2] Building C object CMakeFiles/cmTC_58820.dir/src.c.o [2/2] Linking C executable cmTC_58820 FAILED: cmTC_58820 : && /usr/bin/gcc -DCMAKE_HAVE_LIBC_PTHREAD CMakeFiles/cmTC_58820.dir/src.c.o -o cmTC_58820 && : CMakeFiles/cmTC_58820.dir/src.c.o: In function main': src.c:(.text+0x3e): undefined reference to pthread_create' src.c:(.text+0x4a): undefined reference to pthread_detach' src.c:(.text+0x56): undefined reference to pthread_cancel' src.c:(.text+0x67): undefined reference to pthread_join' src.c:(.text+0x7b): undefined reference to pthread_atfork' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed.
Source file was:
#include <pthread.h> void* test_func(void* data) { return data; } int main(void) { pthread_t thread; pthread_create(&thread, NULL, test_func, NULL); pthread_detach(thread); pthread_cancel(thread); pthread_join(thread, NULL); pthread_atfork(NULL, NULL, NULL); pthread_exit(NULL); return 0; }
This is the CMakeError.log
and this is the CMakeOutput.log
The system is: Linux - 4.15.0-112-generic - x86_64 Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. Compiler: /usr/bin/gcc Build flags: Id flags: The output was: 0 Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out" The C compiler identification is GNU, found in "/home/klugerjaeger/My-SOFA/build/CMakeFiles/3.18.2/CompilerIdC/a.out" Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. Compiler: /usr/bin/g++ Build flags: Id flags: The output was: 0
14 September 2020 at 23:10 #17136HugoKeymasterWelcome on the forum!
I am really sorry for the latency, we are busy to get more and more workforce on SOFA! We will now be more active on the forum.Could you restart the entire compilation process, i.e. delete your build repo.
Create a new one, configure with CMake following the doc. And could you tell us:
– if you specify any specific option/compiler options
– the output of this CMake stepBest
Hugo
-
AuthorPosts
- You must be logged in to reply to this topic.