【标题描述】使用clang编译器编译pymol软件的时候报错。
报错信息如下:clang-12: error: clang frontend command failed with exit code 139
【环境信息】
硬件信息:
1)Kunpeng-920处理器 CPU:96core
软件信息:
1) openEuler 20.03 (LTS-SP3)
2) uname -r:4.19.90
3) pymol-open-source-2.5.0
4) Python 3.8.2
5) BiSheng Compiler 2.1.0.B010 clang version 12.0.0
【问题复现步骤】
1)安装pymol依赖项
2)编译pymol
cd pymol-open-source-2.5.0
python3 setup.py build install --prefix=/opt/pymol
【出现概率(是否必现,概率性错误)】
问题必现
【预期结果】
执行命令python3 setup.py build install --prefix=/opt/pymol后会在/opt/pymol目录下生成pymol的二进制文件
同软件使用gcc编译ok,可生成二进制文件,但是clang编译报错。
【实际结果】
使用clang编译报错,提示llvm存在bug,返回错误clang-12: error: clang frontend command failed with exit code 139
【附件信息】
堆栈信息如下:
fatal: not a git repository (or any of the parent directories): .git
numpy not available
running install
running build
running build_py
running build_ext
building 'pymol._cmd' extension
clang++ -std=c++11 -fPIC -D_PYMOL_LIBPNG -D_PYMOL_FREETYPE -DPYMOL_OPENMP -D_PYMOL_VMD_PLUGINS -D_HAVE_LIBXML -D_PYMOL_NO_MSGPACKC -D_PYMOL_NO_MAIN -Iinclude -Icontrib/uiuc/plugins/include -Iov/src -Ilayer0 -Ilayer1 -Ilayer2 -Ilayer3 -Ilayer4 -Ilayer5 -Ibuild/generated -Icontrib/uiuc/plugins/molfile_plugin/src -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/local/python3/include/python3.8 -c -MMD layer2/ObjectMolecule2.cpp -o build/temp.linux-aarch64-3.8/layer2/ObjectMolecule2.o -Werror=return-type -Wunused-variable -Wno-switch -Wno-narrowing -Wno-char-subscripts -O3 -fopenmp
clang++ -std=c++11 -fPIC -D_PYMOL_LIBPNG -D_PYMOL_FREETYPE -DPYMOL_OPENMP -D_PYMOL_VMD_PLUGINS -D_HAVE_LIBXML -D_PYMOL_NO_MSGPACKC -D_PYMOL_NO_MAIN -Iinclude -Icontrib/uiuc/plugins/include -Iov/src -Ilayer0 -Ilayer1 -Ilayer2 -Ilayer3 -Ilayer4 -Ilayer5 -Ibuild/generated -Icontrib/uiuc/plugins/molfile_plugin/src -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/local/python3/include/python3.8 -c -MMD layer4/Cmd.cpp -o build/temp.linux-aarch64-3.8/layer4/Cmd.o -Werror=return-type -Wunused-variable -Wno-switch -Wno-narrowing -Wno-char-subscripts -O3 -fopenmp
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang++ -std=c++11 -fPIC -D_PYMOL_LIBPNG -D_PYMOL_FREETYPE -DPYMOL_OPENMP -D_PYMOL_VMD_PLUGINS -D_HAVE_LIBXML -D_PYMOL_NO_MSGPACKC -D_PYMOL_NO_MAIN -Iinclude -Icontrib/uiuc/plugins/include -Iov/src -Ilayer0 -Ilayer1 -Ilayer2 -Ilayer3 -Ilayer4 -Ilayer5 -Ibuild/generated -Icontrib/uiuc/plugins/molfile_plugin/src -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/local/python3/include/python3.8 -c -MMD layer2/ObjectMolecule2.cpp -o build/temp.linux-aarch64-3.8/layer2/ObjectMolecule2.o -Werror=return-type -Wunused-variable -Wno-switch -Wno-narrowing -Wno-char-subscripts -O3 -fopenmp
<eof> parser at end of file
Per-file LLVM IR generation
layer2/ObjectMolecule2.cpp:3773:38: Generating code for declaration 'ObjectMoleculeConnect(ObjectMolecule *, int &, pymol::vla<BondType> &, struct CoordSet *, int, int, bool)::(anonymous class)::operator()'
layer2/ObjectMolecule2.cpp:3778:47: LLVM IR generation of compound statement ('{}')
layer2/ObjectMolecule2.cpp:3804:9: LLVM IR generation of compound statement ('{}')
#0 0x0000aaaba25ef140 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x18af140)
#1 0x0000aaaba25ed074 llvm::sys::RunSignalHandlers() (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x18ad074)
#2 0x0000aaaba25ee3f0 llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x18ae3f0)
#3 0x0000aaaba257c334 (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x183c334)
#4 0x0000ffff64a907c0 (linux-vdso.so.1+0x7c0)
#5 0x0000aaaba2ab7950 (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1d77950)
#6 0x0000aaaba29ebaac clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(clang::DeclRefExpr const*) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1cabaac)
#7 0x0000aaaba29e21c0 clang::CodeGen::CodeGenFunction::EmitLValue(clang::Expr const*) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1ca21c0)
#8 0x0000aaaba2a03920 clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr(clang::CallExpr const*, clang::CXXMethodDecl const*, clang::CodeGen::ReturnValueSlot, bool, clang::NestedNameSpecifier*, bool, clang::Expr const*) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1cc3920)
#9 0x0000aaaba2a02e98 clang::CodeGen::CodeGenFunction::EmitCXXMemberCallExpr(clang::CXXMemberCallExpr const*, clang::CodeGen::ReturnValueSlot) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1cc2e98)
#10 0x0000aaaba29f7c9c clang::CodeGen::CodeGenFunction::EmitCallExpr(clang::CallExpr const*, clang::CodeGen::ReturnValueSlot) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1cb7c9c)
#11 0x0000aaaba2a1d2d4 (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1cdd2d4)
#12 0x0000aaaba2a0fe08 clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1ccfe08)
#13 0x0000aaaba29ccd1c clang::CodeGen::CodeGenFunction::EmitScalarInit(clang::Expr const*, clang::ValueDecl const*, clang::CodeGen::LValue, bool) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1c8cd1c)
#14 0x0000aaaba29d09d0 clang::CodeGen::CodeGenFunction::EmitExprAsInit(clang::Expr const*, clang::ValueDecl const*, clang::CodeGen::LValue, bool) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1c909d0)
#15 0x0000aaaba29ce6e8 clang::CodeGen::CodeGenFunction::EmitAutoVarInit(clang::CodeGen::CodeGenFunction::AutoVarEmission const&) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1c8e6e8)
#16 0x0000aaaba29cb1c8 clang::CodeGen::CodeGenFunction::EmitDecl(clang::Decl const&) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1c8b1c8)
#17 0x0000aaaba280bd40 clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1acbd40)
#18 0x0000aaaba280b42c clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1acb42c)
#19 0x0000aaaba2813dd4 clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1ad3dd4)
#20 0x0000aaaba2813170 clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1ad3170)
#21 0x0000aaaba280bb68 clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1acbb68)
#22 0x0000aaaba280b42c clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1acb42c)
#23 0x0000aaaba2ab66c8 (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1d766c8)
#24 0x0000aaaba2aa725c clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(clang::CodeGen::CodeGenFunction&, llvm::omp::Directive, clang::CodeGen::RegionCodeGenTy const&, bool) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1d6725c)
#25 0x0000aaaba2a91d90 clang::CodeGen::CGOpenMPRuntime::emitCriticalRegion(clang::CodeGen::CodeGenFunction&, llvm::StringRef, clang::CodeGen::RegionCodeGenTy const&, clang::SourceLocation, clang::Expr const*) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1d51d90)
#26 0x0000aaaba282a9e4 clang::CodeGen::CodeGenFunction::EmitOMPCriticalDirective(clang::OMPCriticalDirective const&) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1aea9e4)
#27 0x0000aaaba280b698 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1acb698)
#28 0x0000aaaba2813dd4 clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1ad3dd4)
#29 0x0000aaaba2813170 clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1ad3170)
#30 0x0000aaaba280bb68 clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1acbb68)
#31 0x0000aaaba280b42c clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1acb42c)
#32 0x0000aaaba2812e78 clang::CodeGen::CodeGenFunction::EmitCXXForRangeStmt(clang::CXXForRangeStmt const&, llvm::ArrayRef<clang::Attr const*>) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1ad2e78)
#33 0x0000aaaba280b5ac clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1acb5ac)
#34 0x0000aaaba2813dd4 clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1ad3dd4)
#35 0x0000aaaba28578c0 clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1b178c0)
#36 0x0000aaaba28580dc clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1b180dc)
#37 0x0000aaaba287306c clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1b3306c)
#38 0x0000aaaba286cd1c clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1b2cd1c)
#39 0x0000aaaba2862210 clang::CodeGen::CodeGenModule::EmitDeferred() (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1b22210)
#40 0x0000aaaba2860fcc clang::CodeGen::CodeGenModule::Release() (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1b20fcc)
#41 0x0000aaaba319dd80 (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x245dd80)
#42 0x0000aaaba319b19c (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x245b19c)
#43 0x0000aaaba3a5a14c clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x2d1a14c)
#44 0x0000aaaba2c7ab80 clang::FrontendAction::Execute() (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1f3ab80)
#45 0x0000aaaba2c1df4c clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1eddf4c)
#46 0x0000aaaba2d0cc50 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1fccc50)
#47 0x0000aaaba187d354 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0xb3d354)
#48 0x0000aaaba187bfd0 (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0xb3bfd0)
#49 0x0000aaaba2b17e04 (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1dd7e04)
#50 0x0000aaaba257bf9c llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x183bf9c)
#51 0x0000aaaba2b1765c clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optionalllvm::StringRef >, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, bool) const (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1dd765c)
#52 0x0000aaaba2aed79c clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1dad79c)
#53 0x0000aaaba2aedcbc clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&) const (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1dadcbc)
#54 0x0000aaaba2b02114 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&) (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0x1dc2114)
#55 0x0000aaaba187b4f4 main (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0xb3b4f4)
#56 0x0000ffff645c3f80 __libc_start_main (/usr/lib64/libc.so.6+0x23f80)
#57 0x0000aaaba187917c _start (/opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin/clang-12+0xb3917c)
clang-12: error: clang frontend command failed with exit code 139 (use -v to see invocation)
HUAWEI BiSheng Compiler 2.1.0.B010 clang version 12.0.0 (clang-0749c5924208 flang-d6f2a3bc24a5)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/compiler/BS/bisheng-compiler-2.1.0-aarch64-linux/bin
clang-12: note: diagnostic msg:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-12: note: diagnostic msg: /tmp/ObjectMolecule2-26e60f.cpp
clang-12: note: diagnostic msg: /tmp/ObjectMolecule2-26e60f.sh
clang-12: note: diagnostic msg:
error: command 'clang++' failed with exit status 139
Hi wen-minjuan, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Compiler, and any of the maintainers: @hserror , @kuenking111 , @peilin-guo , @pengryan , @eastb233 , @jvmboy
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
请问这个历史问题还存在吗?
暂时关闭该issue,如仍有问题,请reopen
登录 后才可以发表评论