klee-install icon indicating copy to clipboard operation
klee-install copied to clipboard

Compile LLVM with commands frome step-by-step guide

Open zhangysh1995 opened this issue 5 years ago • 0 comments

Hi, I followed the guide and got the following error:

  ^
/usr/include/stdlib.h:837:12: note: conflicting declaration
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
           ^
1 error generated.
Makefile:267: recipe for target '/root/munch/llvm/tools/clang/runtime/compiler-rt/clang_linux/asan-x86_64/x86_64/SubDir.lib__sanitizer_common/sanitizer_stoptheworld_linux_libcdep.o' failed
make[5]: *** [/root/munch/llvm/tools/clang/runtime/compiler-rt/clang_linux/asan-x86_64/x86_64/SubDir.lib__sanitizer_common/sanitizer_stoptheworld_linux_libcdep.o] Error 1
3 errors generated.
Makefile:267: recipe for target '/root/munch/llvm/tools/clang/runtime/compiler-rt/clang_linux/asan-x86_64/x86_64/SubDir.lib__asan/asan_posix.o' failed
make[5]: *** [/root/munch/llvm/tools/clang/runtime/compiler-rt/clang_linux/asan-x86_64/x86_64/SubDir.lib__asan/asan_posix.o] Error 1
make[5]: Leaving directory '/root/munch/llvm/projects/compiler-rt'
Makefile:163: recipe for target 'BuildRuntimeLibraries' failed
make[4]: *** [BuildRuntimeLibraries] Error 2
rm /root/munch/llvm/Release/lib/clang/3.4.2/lib/linux/.dir
make[4]: Leaving directory '/root/munch/llvm/tools/clang/runtime/compiler-rt'
/root/munch/llvm/Makefile.rules:900: recipe for target 'compiler-rt/.makeall' failed
make[3]: *** [compiler-rt/.makeall] Error 2
make[3]: Leaving directory '/root/munch/llvm/tools/clang/runtime'
/root/munch/llvm/Makefile.rules:851: recipe for target 'all' failed
make[2]: *** [all] Error 1
make[2]: Leaving directory '/root/munch/llvm/tools/clang'
/root/munch/llvm/Makefile.rules:900: recipe for target 'clang/.makeall' failed
make[1]: *** [clang/.makeall] Error 2
make[1]: Leaving directory '/root/munch/llvm/tools'
/root/munch/llvm/Makefile.rules:851: recipe for target 'all' failed
make: *** [all] Error 1

I tried to change my gcc version downward to gcc-5 but it didn't work.

Environment:

root@a0d709d639d5:~/munch/llvm# uname -a
Linux a0d709d639d5 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
root@a0d709d639d5:~/munch/llvm# gcc --version
gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0

zhangysh1995 avatar Mar 24 '19 03:03 zhangysh1995