Summary: | sys-devel/clang-12.0.0-r1 failed due to "Broken function found" | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jiahao_XU |
Component: | Current packages | Assignee: | LLVM support project <llvm> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | bugs, ionen, mscardovi, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 618550 | ||
Attachments: |
Build log of clang
Build log after lto is disabled while lld is still used The build.log of clang-12 using gcc with no LTO after llvm-12 is rebuilt with no LTO |
Description
Jiahao_XU
2021-06-18 08:11:49 UTC
Disable -flto=thin from cflags, see https://forums.gentoo.org/viewtopic-p-8625903.html#8625903 Created attachment 717261 [details]
Build log after lto is disabled while lld is still used
(In reply to Marco Genasci from comment #1) > Disable -flto=thin from cflags, see > https://forums.gentoo.org/viewtopic-p-8625903.html#8625903 After I disable lto while still using lld (since llvm and lld is compiled with LTO), it gives me a even longer stack bactrace. Maybe I should recompile the whole llvm toolchain without lto, but I think I'd better first upload the output to here. The same kind of traceback also appeared when I was compiling `net-libs/nodejs-14.16.1`. It seems that my `clang-11` uses the `llvm-12` present on the system instead of using `llvm-11`. ``` Wrong types for attribute: inalloca nest noalias nocapture noundef nonnull readnone readonly signext zeroext byref(void) byval(void) preallocated(void) sret(void) align 1 dereferenceable(1) dereferenceable_or_null(1) call fastcc align 8 void @_ZNSt10unique_ptrIN2v88internal6torque12_GLOBAL__N_116InstanceTypeTreeESt14default_deleteIS4_EEaSEOS7_(%"class.std::unique_ptr.96"* nonnull %20, %"class.std::unique_ptr.96"* nonnull align 8 dereferenceable(8) %338) #17 Wrong types for attribute: inalloca nest noalias nocapture noundef nonnull readnone readonly signext zeroext byref(void) byval(void) preallocated(void) sret(void) align 1 dereferenceable(1) dereferenceable_or_null(1) call fastcc align 8 void @_ZNSt10unique_ptrIN2v88internal6torque12_GLOBAL__N_116InstanceTypeTreeESt14default_deleteIS4_EEaSEOS7_(%"class.std::unique_ptr.96"* nonnull %20, %"class.std::unique_ptr.96"* nonnull align 8 dereferenceable(8) %13) #17 in function _ZN2v88internal6torque21ImplementationVisitor21GenerateInstanceTypesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE LLVM ERROR: Broken function found, compilation aborted! PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. Stack dump: 0. Running pass 'Function Pass Manager' on module '/var/tmp/portage/net-libs/nodejs-14.16.1/work/node-v14.16.1/out/Release/obj.target/tools/v8_gypfiles/libtorque_base.a(instance-type-generator.o at 269526)'. 1. Running pass 'Module Verifier' on function '@_ZN2v88internal6torque21ImplementationVisitor21GenerateInstanceTypesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE' #0 0x00007f390288ec43 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/llvm/12/lib64/libLLVM-12.so+0x19cdc43) #1 0x00007f390288c020 llvm::sys::RunSignalHandlers() (/usr/lib/llvm/12/lib64/libLLVM-12.so+0x19cb020) #2 0x00007f390288f45a (/usr/lib/llvm/12/lib64/libLLVM-12.so+0x19ce45a) #3 0x00007f39056a7180 __restore_rt (/lib64/libpthread.so.0+0x12180) #4 0x00007f39009da29e raise (/lib64/libc.so.6+0x3829e) #5 0x00007f39009c4536 abort (/lib64/libc.so.6+0x22536) #6 0x00007f39027ba839 llvm::report_fatal_error(llvm::Twine const&, bool) (/usr/lib/llvm/12/lib64/libLLVM-12.so+0x18f9839) #7 0x00007f39027ba688 (/usr/lib/llvm/12/lib64/libLLVM-12.so+0x18f9688) #8 0x00007f3902a87b7f (/usr/lib/llvm/12/lib64/libLLVM-12.so+0x1bc6b7f) #9 0x00007f3902a06ed8 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/lib/llvm/12/lib64/libLLVM-12.so+0x1b45ed8) #10 0x00007f3902a0e403 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/lib/llvm/12/lib64/libLLVM-12.so+0x1b4d403) #11 0x00007f3902a07870 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib/llvm/12/lib64/libLLVM-12.so+0x1b46870) #12 0x00007f3903fb4a29 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&) (/usr/lib/llvm/12/lib64/libLLVM-12.so+0x30f3a29) #13 0x00007f3903fba744 (/usr/lib/llvm/12/lib64/libLLVM-12.so+0x30f9744) #14 0x00007f3903fba1a2 llvm::lto::thinBackend(llvm::lto::Config const&, unsigned int, std::function<std::unique_ptr<llvm::lto::NativeObjectStream, std::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>, llvm::Module&, llvm::ModuleSummaryIndex const&, llvm::StringMap<std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long> >, llvm::MallocAllocator> const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*> > const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int> >, std::vector<std::pair<llvm::StringRef, llvm::BitcodeModule>, std::allocator<std::pair<llvm::StringRef, llvm::BitcodeModule> > > >&, std::vector<unsigned char, std::allocator<unsigned char> > const&) (/usr/lib/llvm/12/lib64/libLLVM-12.so+0x30f91a2) #15 0x00007f3903fb1189 (/usr/lib/llvm/12/lib64/libLLVM-12.so+0x30f0189) #16 0x00007f3903fb0a7d (/usr/lib/llvm/12/lib64/libLLVM-12.so+0x30efa7d) #17 0x00007f390282d234 (/usr/lib/llvm/12/lib64/libLLVM-12.so+0x196c234) #18 0x00007f390280cea7 (/usr/lib/llvm/12/lib64/libLLVM-12.so+0x194bea7) #19 0x00007f39056a45ea __pthread_once_slow (/lib64/libpthread.so.0+0xf5ea) #20 0x00007f390280cde0 (/usr/lib/llvm/12/lib64/libLLVM-12.so+0x194bde0) #21 0x00007f390282ce01 (/usr/lib/llvm/12/lib64/libLLVM-12.so+0x196be01) #22 0x00007f390282ca1e (/usr/lib/llvm/12/lib64/libLLVM-12.so+0x196ba1e) #23 0x00007f3900d80d35 (/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/libstdc++.so.6+0xd6d35) #24 0x00007f390569ccfe start_thread (/lib64/libpthread.so.0+0x7cfe) #25 0x00007f3900a9914f clone (/lib64/libc.so.6+0xf714f) ``` (In reply to Marco Genasci from comment #1) > Disable -flto=thin from cflags, see > https://forums.gentoo.org/viewtopic-p-8625903.html#8625903 I rebuilt sys-devel/llvm-12 with LTO disabled and when building sys-devel/clang-12 with gcc with no lto, it still failed. Created attachment 721726 [details]
The build.log of clang-12 using gcc with no LTO after llvm-12 is rebuilt with no LTO
|