I'm trying to setup LLVM release version 3.5
on my ubuntu 16.04
LTS 64-bit machine, and have been facing errors related to CMake
.
How to solve: Library `Coroutines' not found in list of llvm libraries
?
- I followed instructions given here, to the T.
I got the following error log on executing
cmake -G "Unix Makefiles" ../llvm
/home/.../llvm_dir/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:27: fatal error: malloc/malloc.h: No such file or directory compilation terminated. CMakeFiles/cmTC_23510.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_23510.dir/CheckIncludeFile.c.o' failed make1: *** [CMakeFiles/cmTC_23510.dir/CheckIncludeFile.c.o] Error 1
...
/home/.../llvm_dir/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:18: fatal error: ndir.h: No such file or directory compilation terminated. CMakeFiles/cmTC_a8c89.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_a8c89.dir/CheckIncludeFile.c.o' failed make1: *** [CMakeFiles/cmTC_a8c89.dir/CheckIncludeFile.c.o] Error 1
...
/home/.../llvm_dir/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:22: fatal error: sys/ndir.h: No such file or directory compilation terminated. CMakeFiles/cmTC_9297d.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_9297d.dir/CheckIncludeFile.c.o' failed make1: *** [CMakeFiles/cmTC_9297d.dir/CheckIncludeFile.c.o] Error 1
...
/home/.../llvm_dir/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:31: fatal error: valgrind/valgrind.h: No such file or directory compilation terminated. CMakeFiles/cmTC_14b5f.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_14b5f.dir/CheckIncludeFile.c.o' failed make1: *** [CMakeFiles/cmTC_14b5f.dir/CheckIncludeFile.c.o] Error 1
...
/home/.../llvm_dir/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:18: fatal error: zlib.h: No such file or directory compilation terminated. CMakeFiles/cmTC_a4254.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_a4254.dir/CheckIncludeFile.c.o' failed make1: *** [CMakeFiles/cmTC_a4254.dir/CheckIncludeFile.c.o] Error 1
...
/home/.../llvm_dir/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:23: fatal error: mach/mach.h: No such file or directory compilation terminated. CMakeFiles/cmTC_43c90.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_43c90.dir/CheckIncludeFile.c.o' failed make1: *** [CMakeFiles/cmTC_43c90.dir/CheckIncludeFile.c.o] Error 1
...
/home/.../llvm_dir/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:25: fatal error: mach-o/dyld.h: No such file or directory compilation terminated. CMakeFiles/cmTC_92df8.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_92df8.dir/CheckIncludeFile.c.o' failed make1: *** [CMakeFiles/cmTC_92df8.dir/CheckIncludeFile.c.o] Error 1
...
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=compress2 CMakeFiles/cmTC_45dee.dir/CheckFunctionExists.c.o -o cmTC_45dee -rdynamic -lz -lm /usr/bin/ld: cannot find -lz collect2: error: ld returned 1 exit status CMakeFiles/cmTC_45dee.dir/build.make:97: recipe for target 'cmTC_45dee' failed make1: *** [cmTC_45dee] Error 1
...
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=el_init CMakeFiles/cmTC_678de.dir/CheckFunctionExists.c.o -o cmTC_678de -rdynamic -ledit -lm /usr/bin/ld: cannot find -ledit collect2: error: ld returned 1 exit status CMakeFiles/cmTC_678de.dir/build.make:97: recipe for target 'cmTC_678de' failed make1: *** [cmTC_678de] Error 1
...
/usr/bin/ld: cannot find -ltinfo collect2: error: ld returned 1 exit status CMakeFiles/cmTC_b7cfe.dir/build.make:97: recipe for target 'cmTC_b7cfe' failed make1: *** [cmTC_b7cfe] Error 1
...
/usr/bin/ld: cannot find -lterminfo collect2: error: ld returned 1 exit status CMakeFiles/cmTC_58a1c.dir/build.make:97: recipe for target 'cmTC_58a1c' failed make1: *** [cmTC_58a1c] Error 1
...
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=setupterm CMakeFiles/cmTC_adafa.dir/CheckFunctionExists.c.o -o cmTC_adafa -rdynamic -lcurses -lm /usr/bin/ld: cannot find -lcurses collect2: error: ld returned 1 exit status CMakeFiles/cmTC_adafa.dir/build.make:97: recipe for target 'cmTC_adafa' failed make1: *** [cmTC_adafa] Error 1
...
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=setupterm CMakeFiles/cmTC_e466b.dir/CheckFunctionExists.c.o -o cmTC_e466b -rdynamic -lncurses -lm /usr/bin/ld: cannot find -lncurses collect2: error: ld returned 1 exit status CMakeFiles/cmTC_e466b.dir/build.make:97: recipe for target 'cmTC_e466b' failed make1: *** [cmTC_e466b] Error 1
...
/usr/bin/ld: cannot find -lncursesw collect2: error: ld returned 1 exit status CMakeFiles/cmTC_8dc06.dir/build.make:97: recipe for target 'cmTC_8dc06' failed make1: *** [cmTC_8dc06] Error 1
...
/home/.../llvm_dir/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: ‘arc4random’ undeclared (first use in this function) return ((int*)(&arc4random))[argc]; ^ /home/.../llvm_dir/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: note: each undeclared identifier is reported only once for each function it appears in CMakeFiles/cmTC_75c3b.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_75c3b.dir/CheckSymbolExists.c.o' failed make1: *** [CMakeFiles/cmTC_75c3b.dir/CheckSymbolExists.c.o] Error 1
...
/home/.../llvm_dir/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:17: fatal error: cmath: No such file or directory compilation terminated. CMakeFiles/cmTC_53670.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_53670.dir/CheckSymbolExists.c.o' failed make1: *** [CMakeFiles/cmTC_53670.dir/CheckSymbolExists.c.o] Error 1
...
/home/.../llvm_dir/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:20: fatal error: ieeefp.h: No such file or directory compilation terminated. CMakeFiles/cmTC_e4e6e.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_e4e6e.dir/CheckSymbolExists.c.o' failed make1: *** [CMakeFiles/cmTC_e4e6e.dir/CheckSymbolExists.c.o] Error 1
...
/home/.../llvm_dir/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:17: fatal error: cmath: No such file or directory compilation terminated. CMakeFiles/cmTC_b8170.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_b8170.dir/CheckSymbolExists.c.o' failed make1: *** [CMakeFiles/cmTC_b8170.dir/CheckSymbolExists.c.o] Error 1
...
/home/.../llvm_dir/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: ‘exp10’ undeclared (first use in this function) return ((int*)(&exp10))[argc]; ^ /home/.../llvm_dir/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: note: each undeclared identifier is reported only once for each function it appears in CMakeFiles/cmTC_392cf.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_392cf.dir/CheckSymbolExists.c.o' failed make1: *** [CMakeFiles/cmTC_392cf.dir/CheckSymbolExists.c.o] Error 1
...
/home/.../llvm_dir/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:27: fatal error: malloc/malloc.h: No such file or directory compilation terminated. CMakeFiles/cmTC_ff0fe.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_ff0fe.dir/CheckSymbolExists.c.o' failed make1: *** [CMakeFiles/cmTC_ff0fe.dir/CheckSymbolExists.c.o] Error 1
...
/home/.../llvm_dir/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: ‘strerror_s’ undeclared (first use in this function) return ((int*)(&strerror_s))[argc]; ^ /home/.../llvm_dir/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: note: each undeclared identifier is reported only once for each function it appears in CMakeFiles/cmTC_97097.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_97097.dir/CheckSymbolExists.c.o' failed make1: *** [CMakeFiles/cmTC_97097.dir/CheckSymbolExists.c.o] Error 1
...
A similar error was faced before and posted here. But since my Python version was of 2.7x series, this didn't help.
- So going by the log above, I started with the simpler one, installing
Valgrind
. - After re-trying the command
cmake -G "Unix Makefiles" ../llvm
to see if it's solving errors: I've been getting the Library Coroutines
error ever since, and I am stuck.
Can you help me?