cheribuild
cheribuild copied to clipboard
An error when run ./cheribuild.py run-riscv64-purecap -d
[1/2321] Linking target tests/qemu-iotests/socket_scm_helper
FAILED: tests/qemu-iotests/socket_scm_helper
/usr/bin/clang -o tests/qemu-iotests/socket_scm_helper tests/qemu-iotests/socket_scm_helper.p/socket_scm_helper.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -m64 -flto -Werror=return-type -O3 -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=incompatible-pointer-types-discards-qualifiers -Wno-address-of-packed-member -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers -fuse-ld=/home/yangxianshuai/cheri/output/sdk/bin/ld.lld -flto
!dbg attachment points at wrong subprogram for function
!30 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 92, type: !31, scopeLine: 93, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !36)
i32 (i32, i8**, i8**)* @main
br label %85, !dbg !200, !llvm.loop !201
!202 = !DILocation(line: 51, column: 5, scope: !44)
!44 = distinct !DISubprogram(name: "send_fd", scope: !1, file: !1, line: 23, type: !45, scopeLine: 24, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !47)
!44 = distinct !DISubprogram(name: "send_fd", scope: !1, file: !1, line: 23, type: !45, scopeLine: 24, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !47)
!dbg attachment points at wrong subprogram for function
!30 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 92, type: !31, scopeLine: 93, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !36)
i32 (i32, i8**, i8**)* @main
br label %87, !dbg !200, !llvm.loop !201
!202 = !DILocation(line: 51, column: 5, scope: !44)
!44 = distinct !DISubprogram(name: "send_fd", scope: !1, file: !1, line: 23, type: !45, scopeLine: 24, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !47)
!44 = distinct !DISubprogram(name: "send_fd", scope: !1, file: !1, line: 23, type: !45, scopeLine: 24, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !47)
LLVM ERROR: Broken module found, compilation aborted!
PLEASE submit a bug report to https://github.com/CTSRD-CHERI/llvm-project/issues and include the crash backtrace.
Stack dump:
0. Program arguments: /home/yangxianshuai/cheri/output/sdk/bin/ld.lld -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o tests/qemu-iotests/socket_scm_helper /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crt1.o /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/bin/../lib/gcc/x86_64-linux-gnu/9/crtbegin.o -L/usr/bin/../lib/gcc/x86_64-linux-gnu/9 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../lib64 -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib64 -L/usr/lib/x86_64-linux-gnu/../../lib64 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../.. -L/usr/lib/llvm-6.0/bin/../lib -L/lib -L/usr/lib -plugin /usr/lib/llvm-6.0/bin/../lib/LLVMgold.so -plugin-opt=mcpu=x86-64 -plugin-opt=O3 tests/qemu-iotests/socket_scm_helper.p/socket_scm_helper.c.o --as-needed --no-undefined -z relro -z now -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/bin/../lib/gcc/x86_64-linux-gnu/9/crtend.o /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o
#0 0x000000000081dc53 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x81dc53)
#1 0x000000000081b7fe llvm::sys::RunSignalHandlers() (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x81b7fe)
#2 0x000000000081e256 SignalHandler(int) Signals.cpp:0:0
#3 0x00007ffff7bc6980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
#4 0x00007ffff65ebfb7 raise /build/glibc-S9d2JN/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#5 0x00007ffff65ed921 abort /build/glibc-S9d2JN/glibc-2.27/stdlib/abort.c:81:0
#6 0x00000000007d1f9f (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x7d1f9f)
#7 0x00000000007d1dc8 (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x7d1dc8)
#8 0x0000000002fb0ded (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x2fb0ded)
#9 0x0000000002f2f7a5 llvm::FPPassManager::doFinalization(llvm::Module&) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x2f2f7a5)
#10 0x0000000002f29155 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x2f29155)
#11 0x0000000001a6d4fa llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::vector<unsigned char, std::allocator<unsigned char> > const&) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x1a6d4fa)
#12 0x0000000001a6d8fd llvm::lto::backend(llvm::lto::Config const&, std::function<std::unique_ptr<llvm::lto::NativeObjectStream, std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x1a6d8fd)
#13 0x0000000001a60f39 llvm::lto::LTO::runRegularLTO(std::function<std::unique_ptr<llvm::lto::NativeObjectStream, std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x1a60f39)
#14 0x0000000001a60614 llvm::lto::LTO::run(std::function<std::unique_ptr<llvm::lto::NativeObjectStream, std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>, std::function<std::function<std::unique_ptr<llvm::lto::NativeObjectStream, std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)> (unsigned int, llvm::StringRef)>) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x1a60614)
#15 0x00000000009be182 lld::elf::BitcodeCompiler::compile() (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x9be182)
#16 0x0000000000944176 void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::support::endianness)1, true> >() (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x944176)
#17 0x00000000009333b7 void lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::support::endianness)1, true> >(llvm::opt::InputArgList&) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x9333b7)
#18 0x0000000000923c7c lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x923c7c)
#19 0x0000000000921904 lld::elf::link(llvm::ArrayRef<char const*>, bool, llvm::raw_ostream&, llvm::raw_ostream&) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x921904)
#20 0x00000000007b8fec lldMain(int, char const**, llvm::raw_ostream&, llvm::raw_ostream&, bool) lld.cpp:0:0
#21 0x00000000007b8803 main (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x7b8803)
#22 0x00007ffff65cebf7 __libc_start_main /build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:344:0
#23 0x00000000007b84fa _start (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x7b84fa)
clang: error: unable to execute command: Aborted (core dumped)
clang: error: linker command failed due to signal (use -v to see invocation)
[2/2321] Generating qemu-version.h with a meson_exe.py custom command
fatal: No tags can describe '4368df4626961432c4c933614326b7bdda8379b7'.
Try --always, or create some tags.
[3/2321] Linking target contrib/ivshmem-client/ivshmem-client
FAILED: contrib/ivshmem-client/ivshmem-client
/usr/bin/clang -o contrib/ivshmem-client/ivshmem-client contrib/ivshmem-client/ivshmem-client.p/ivshmem-client.c.o contrib/ivshmem-client/ivshmem-client.p/main.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -m64 -flto -Werror=return-type -O3 -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=incompatible-pointer-types-discards-qualifiers -Wno-address-of-packed-member -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers -fuse-ld=/home/yangxianshuai/cheri/output/sdk/bin/ld.lld -flto -pthread -Wl,--start-group -lgthread-2.0 -lglib-2.0 -Wl,--end-group
!dbg attachment points at wrong subprogram for function
!453 = distinct !DISubprogram(name: "ivshmem_client_close", scope: !1, file: !1, line: 247, type: !454, scopeLine: 248, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !456)
void (%struct.IvshmemClient*)* @ivshmem_client_close
br i1 %42, label %34, label %43, !dbg !492, !llvm.loop !497
!498 = !DILocation(line: 82, column: 5, scope: !490)
!490 = distinct !DILexicalBlock(scope: !473, file: !1, line: 82, column: 5)
!473 = distinct !DISubprogram(name: "ivshmem_client_free_peer", scope: !1, file: !1, line: 77, type: !474, scopeLine: 78, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !476)
!dbg attachment points at wrong subprogram for function
!308 = distinct !DISubprogram(name: "main", scope: !56, file: !56, line: 187, type: !309, scopeLine: 188, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !55, retainedNodes: !313)
i32 (i32, i8**)* @main
switch i32 %23, label %28 [
i32 -1, label %30
i32 104, label %24
i32 118, label %21
i32 83, label %26
], !dbg !525, !llvm.loop !528
!529 = !DILocation(line: 40, column: 5, scope: !513)
!513 = distinct !DISubprogram(name: "ivshmem_client_parse_args", scope: !56, file: !56, line: 36, type: !514, scopeLine: 37, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !55, retainedNodes: !517)
!513 = distinct !DISubprogram(name: "ivshmem_client_parse_args", scope: !56, file: !56, line: 36, type: !514, scopeLine: 37, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !55, retainedNodes: !517)
LLVM ERROR: Broken module found, compilation aborted!
PLEASE submit a bug report to https://github.com/CTSRD-CHERI/llvm-project/issues and include the crash backtrace.
Stack dump:
0. Program arguments: /home/yangxianshuai/cheri/output/sdk/bin/ld.lld -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o contrib/ivshmem-client/ivshmem-client /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crt1.o /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/bin/../lib/gcc/x86_64-linux-gnu/9/crtbegin.o -L/usr/bin/../lib/gcc/x86_64-linux-gnu/9 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../lib64 -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib64 -L/usr/lib/x86_64-linux-gnu/../../lib64 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../.. -L/usr/lib/llvm-6.0/bin/../lib -L/lib -L/usr/lib -plugin /usr/lib/llvm-6.0/bin/../lib/LLVMgold.so -plugin-opt=mcpu=x86-64 -plugin-opt=O3 contrib/ivshmem-client/ivshmem-client.p/ivshmem-client.c.o contrib/ivshmem-client/ivshmem-client.p/main.c.o --as-needed --no-undefined -z relro -z now --start-group -lgthread-2.0 -lglib-2.0 --end-group -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/bin/../lib/gcc/x86_64-linux-gnu/9/crtend.o /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o
#0 0x000000000081dc53 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x81dc53)
#1 0x000000000081b7fe llvm::sys::RunSignalHandlers() (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x81b7fe)
#2 0x000000000081e256 SignalHandler(int) Signals.cpp:0:0
#3 0x00007ffff7bc6980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
#4 0x00007ffff65ebfb7 raise /build/glibc-S9d2JN/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#5 0x00007ffff65ed921 abort /build/glibc-S9d2JN/glibc-2.27/stdlib/abort.c:81:0
#6 0x00000000007d1f9f (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x7d1f9f)
#7 0x00000000007d1dc8 (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x7d1dc8)
#8 0x0000000002fb0ded (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x2fb0ded)
#9 0x0000000002f2f7a5 llvm::FPPassManager::doFinalization(llvm::Module&) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x2f2f7a5)
#10 0x0000000002f29155 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x2f29155)
#11 0x0000000001a6d4fa llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::vector<unsigned char, std::allocator<unsigned char> > const&) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x1a6d4fa)
#12 0x0000000001a6d8fd llvm::lto::backend(llvm::lto::Config const&, std::function<std::unique_ptr<llvm::lto::NativeObjectStream, std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x1a6d8fd)
#13 0x0000000001a60f39 llvm::lto::LTO::runRegularLTO(std::function<std::unique_ptr<llvm::lto::NativeObjectStream, std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x1a60f39)
#14 0x0000000001a60614 llvm::lto::LTO::run(std::function<std::unique_ptr<llvm::lto::NativeObjectStream, std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>, std::function<std::function<std::unique_ptr<llvm::lto::NativeObjectStream, std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)> (unsigned int, llvm::StringRef)>) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x1a60614)
#15 0x00000000009be182 lld::elf::BitcodeCompiler::compile() (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x9be182)
#16 0x0000000000944176 void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::support::endianness)1, true> >() (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x944176)
#17 0x00000000009333b7 void lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::support::endianness)1, true> >(llvm::opt::InputArgList&) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x9333b7)
#18 0x0000000000923c7c lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x923c7c)
#19 0x0000000000921904 lld::elf::link(llvm::ArrayRef<char const*>, bool, llvm::raw_ostream&, llvm::raw_ostream&) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x921904)
#20 0x00000000007b8fec lldMain(int, char const**, llvm::raw_ostream&, llvm::raw_ostream&, bool) lld.cpp:0:0
#21 0x00000000007b8803 main (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x7b8803)
#22 0x00007ffff65cebf7 __libc_start_main /build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:344:0
#23 0x00000000007b84fa _start (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x7b84fa)
clang: error: unable to execute command: Aborted (core dumped)
clang: error: linker command failed due to signal (use -v to see invocation)
[4/2321] Linking target contrib/elf2dmp/elf2dmp
FAILED: contrib/elf2dmp/elf2dmp
/usr/bin/clang -o contrib/elf2dmp/elf2dmp contrib/elf2dmp/elf2dmp.p/main.c.o contrib/elf2dmp/elf2dmp.p/addrspace.c.o contrib/elf2dmp/elf2dmp.p/download.c.o contrib/elf2dmp/elf2dmp.p/pdb.c.o contrib/elf2dmp/elf2dmp.p/qemu_elf.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -m64 -flto -Werror=return-type -O3 -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=incompatible-pointer-types-discards-qualifiers -Wno-address-of-packed-member -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers -fuse-ld=/home/yangxianshuai/cheri/output/sdk/bin/ld.lld -flto -pthread -Wl,--start-group -lgthread-2.0 -lglib-2.0 -lcurl -Wl,--end-group
!dbg attachment points at wrong subprogram for function
!958 = distinct !DISubprogram(name: "main", scope: !3, file: !3, line: 457, type: !959, scopeLine: 458, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !38, retainedNodes: !962)
i32 (i32, i8**)* @main
br i1 %81, label %65, label %82, !dbg !1221, !llvm.loop !1234
!1235 = !DILocation(line: 202, column: 5, scope: !1205)
!1205 = distinct !DILexicalBlock(scope: !1195, file: !3, line: 202, column: 5)
!1195 = distinct !DISubprogram(name: "fix_dtb", scope: !3, file: !3, line: 189, type: !1196, scopeLine: 190, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !38, retainedNodes: !1199)
!dbg attachment points at wrong subprogram for function
!958 = distinct !DISubprogram(name: "main", scope: !3, file: !3, line: 457, type: !959, scopeLine: 458, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !38, retainedNodes: !962)
i32 (i32, i8**)* @main
br i1 %267, label %271, label %268, !dbg !1673, !llvm.loop !1696
!1697 = !DILocation(line: 202, column: 5, scope: !1658)
!1658 = distinct !DILexicalBlock(scope: !1648, file: !3, line: 202, column: 5)
!1648 = distinct !DISubprogram(name: "fix_dtb", scope: !3, file: !3, line: 189, type: !1649, scopeLine: 190, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !38, retainedNodes: !1652)
LLVM ERROR: Broken module found, compilation aborted!
PLEASE submit a bug report to https://github.com/CTSRD-CHERI/llvm-project/issues and include the crash backtrace.
Stack dump:
0. Program arguments: /home/yangxianshuai/cheri/output/sdk/bin/ld.lld -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o contrib/elf2dmp/elf2dmp /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crt1.o /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/bin/../lib/gcc/x86_64-linux-gnu/9/crtbegin.o -L/usr/bin/../lib/gcc/x86_64-linux-gnu/9 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../lib64 -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib64 -L/usr/lib/x86_64-linux-gnu/../../lib64 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../.. -L/usr/lib/llvm-6.0/bin/../lib -L/lib -L/usr/lib -plugin /usr/lib/llvm-6.0/bin/../lib/LLVMgold.so -plugin-opt=mcpu=x86-64 -plugin-opt=O3 contrib/elf2dmp/elf2dmp.p/main.c.o contrib/elf2dmp/elf2dmp.p/addrspace.c.o contrib/elf2dmp/elf2dmp.p/download.c.o contrib/elf2dmp/elf2dmp.p/pdb.c.o contrib/elf2dmp/elf2dmp.p/qemu_elf.c.o --as-needed --no-undefined -z relro -z now --start-group -lgthread-2.0 -lglib-2.0 -lcurl --end-group -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/bin/../lib/gcc/x86_64-linux-gnu/9/crtend.o /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o
#0 0x000000000081dc53 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x81dc53)
#1 0x000000000081b7fe llvm::sys::RunSignalHandlers() (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x81b7fe)
#2 0x000000000081e256 SignalHandler(int) Signals.cpp:0:0
#3 0x00007ffff7bc6980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
#4 0x00007ffff65ebfb7 raise /build/glibc-S9d2JN/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#5 0x00007ffff65ed921 abort /build/glibc-S9d2JN/glibc-2.27/stdlib/abort.c:81:0
#6 0x00000000007d1f9f (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x7d1f9f)
#7 0x00000000007d1dc8 (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x7d1dc8)
#8 0x0000000002fb0ded (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x2fb0ded)
#9 0x0000000002f2f7a5 llvm::FPPassManager::doFinalization(llvm::Module&) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x2f2f7a5)
#10 0x0000000002f29155 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x2f29155)
#11 0x0000000001a6d4fa llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::vector<unsigned char, std::allocator<unsigned char> > const&) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x1a6d4fa)
#12 0x0000000001a6d8fd llvm::lto::backend(llvm::lto::Config const&, std::function<std::unique_ptr<llvm::lto::NativeObjectStream, std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x1a6d8fd)
#13 0x0000000001a60f39 llvm::lto::LTO::runRegularLTO(std::function<std::unique_ptr<llvm::lto::NativeObjectStream, std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x1a60f39)
#14 0x0000000001a60614 llvm::lto::LTO::run(std::function<std::unique_ptr<llvm::lto::NativeObjectStream, std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>, std::function<std::function<std::unique_ptr<llvm::lto::NativeObjectStream, std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)> (unsigned int, llvm::StringRef)>) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x1a60614)
#15 0x00000000009be182 lld::elf::BitcodeCompiler::compile() (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x9be182)
#16 0x0000000000944176 void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::support::endianness)1, true> >() (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x944176)
#17 0x00000000009333b7 void lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::support::endianness)1, true> >(llvm::opt::InputArgList&) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x9333b7)
#18 0x0000000000923c7c lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x923c7c)
#19 0x0000000000921904 lld::elf::link(llvm::ArrayRef<char const*>, bool, llvm::raw_ostream&, llvm::raw_ostream&) (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x921904)
#20 0x00000000007b8fec lldMain(int, char const**, llvm::raw_ostream&, llvm::raw_ostream&, bool) lld.cpp:0:0
#21 0x00000000007b8803 main (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x7b8803)
#22 0x00007ffff65cebf7 __libc_start_main /build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:344:0
#23 0x00000000007b84fa _start (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld+0x7b84fa)
clang: error: unable to execute command: Aborted (core dumped)
clang: error: linker command failed due to signal (use -v to see invocation)
ninja: build stopped: subcommand failed.
Makefile:171: recipe for target 'run-ninja' failed
You're mixing CHERI LLD (/home/yangxianshuai/cheri/output/sdk/bin/ld.lld) with your system LLVM 6 (/usr/lib/llvm-6.0/bin/clang, pointed to by /usr/bin/clang from the looks of it) with LTO enabled (default for our QEMU build, can be disabled with --qemu/no-use-lto
on the command line or { "qemu": { "use-lto": false } }
in cheribuild.json). In theory I believe that's meant to work, in that bitcode should be forwards-compatible since 3.0, but in practice it's unlikely to be widely tested. It looks like your system LLVM 6 produced broken debug info in its bitcode and that gets caught by CHERI LLD, which has assertions enabled, though it's possible the input bitcode is fine and CHERI LLVM (likely, the version of upstream LLVM we're currently based on) mishandles something about it.
You can see this is what's happening due to the warning (which appeared in your original report, but you've since edited out; the initial output from cheribuild before the build is extremely useful):
Could not find version-suffixed ld.lld in expected path /usr/lib/llvm-6.0/bin/ld.lld
I suggest you install the LLD package corresponding to the Clang/LLVM package you've installed; I assume you're on Ubuntu 18.04 given the directory name and LLVM version, which means installing lld-6. Though I also suggest you use a newer LLVM and LLD version than 6.0; it should work, but at this point it's 4.5 years old so support for building with it is likely to bit-rot in upstream code bases, as I doubt it sees much testing these days. Ubuntu 18.04's bionic-updates suite has versions 7 through 10 all present, and cheribuild should automatically pick up the highest installed version.
If you can't do either of those for whatever reason, then disable building QEMU with LTO as I documented above should work around the issue, but will result in a slightly slower QEMU than otherwise.