LLVM编译:目标'../lib/IR/Release+Asserts/Intrinsics.gen.tmp'的配方失败

时间:2018-10-04 15:22:54

标签: c++ makefile llvm llvm-ir

我使用llvm 3.6.2使用一些旧代码,因此我尝试从源代码构建此版本的llvm。

我使用以下两个命令:

$ ./configure --enable-assertions
$ make

并出现以下错误(没有enable-assertions时出现相同的错误):

[2]: Leaving directory '/home/zhangysh1995/packages/llvm-build/utils/llvm-lit'
make[2]: Entering directory '/home/zhangysh1995/packages/llvm-build/utils/not'
llvm[2]: Compiling not.cpp for Release+Asserts build
llvm[2]: Linking Release+Asserts executable not (without symbols)
llvm[2]: ======= Finished Linking Release+Asserts Executable not (without symbols)
make[2]: Leaving directory '/home/zhangysh1995/packages/llvm-build/utils/not'
make[2]: Entering directory '/home/zhangysh1995/packages/llvm-build/utils/unittest'
make[3]: Entering directory '/home/zhangysh1995/packages/llvm-build/utils/unittest/googletest'
llvm[3]: Compiling src/gtest-all.cc for Release+Asserts build
llvm[3]: Building Release+Asserts Archive Library libgtest.a
make[3]: Leaving directory '/home/zhangysh1995/packages/llvm-build/utils/unittest/googletest'
make[3]: Entering directory '/home/zhangysh1995/packages/llvm-build/utils/unittest/UnitTestMain'
llvm[3]: Compiling TestMain.cpp for Release+Asserts build
llvm[3]: Building Release+Asserts Archive Library libgtest_main.a
make[3]: Leaving directory '/home/zhangysh1995/packages/llvm-build/utils/unittest/UnitTestMain'
make[2]: Leaving directory '/home/zhangysh1995/packages/llvm-build/utils/unittest'
make[1]: Leaving directory '/home/zhangysh1995/packages/llvm-build/utils'
make[1]: Entering directory '/home/zhangysh1995/packages/llvm-build/lib/IR'
llvm[1]: Building Intrinsics.gen.tmp from Intrinsics.td
0  llvm-tblgen     0x0000000000576a58
1  llvm-tblgen     0x00000000005780ab
2  libpthread.so.0 0x0000153db3008390
3  llvm-tblgen     0x000000000053382e
4  llvm-tblgen     0x0000000000526a76
5  libc.so.6       0x0000153db1f7f830 __libc_start_main + 240
6  llvm-tblgen     0x00000000004053c9
Stack dump:
0.  Program arguments: /home/zhangysh1995/packages/llvm-build/Release+Asserts/bin/llvm-tblgen -I /home/zhangysh1995/packages/llvm/lib/IR -I /home/zhangysh1995/packages/llvm/include -I /home/zhangysh1995/packages/llvm/include -I /home/zhangysh1995/packages/llvm/lib/Target /home/zhangysh1995/packages/llvm/include/llvm/IR/Intrinsics.td -o /home/zhangysh1995/packages/llvm-build/lib/IR/Release+Asserts/Intrinsics.gen.tmp -gen-intrinsic 
Makefile:23: recipe for target '/home/zhangysh1995/packages/llvm-build/lib/IR/Release+Asserts/Intrinsics.gen.tmp' failed
make[1]: *** [/home/zhangysh1995/packages/llvm-build/lib/IR/Release+Asserts/Intrinsics.gen.tmp] Segmentation fault (core dumped)
make[1]: Leaving directory '/home/zhangysh1995/packages/llvm-build/lib/IR'
/home/zhangysh1995/packages/llvm/Makefile.rules:873: recipe for target 'all' failed

我搜索了解决方案,但没有人解决。

1 个答案:

答案 0 :(得分:0)

此问题是由使用clang/clang++作为编译器引起的,如果编译器为gcc,则可以解决此问题。

但是,它在文档中显示为here,受支持的clang