Skip to content

"LLVM ERROR: Cannot select: intrinsic %llvm.x86.aesni.aesenc" #53097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vitaly-zdanevich opened this issue Jan 9, 2022 · 4 comments
Closed

Comments

@vitaly-zdanevich
Copy link

Gentoo, Firefox version 95.0.1-r1

Tail of the build log:

114:11.55 ld.lld: warning: Linking two modules of different target triples: '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build/toolkit/library/build/../../../layout/style/Unified_cpp_layout_style4.o' is 'x86_64-pc-linux-gnu' whereas '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build/x86_64-unknown-linux-gnu/release/libgkrust.a(style-f04672e24120959a.style.25050218-cgu.0.rcgu.o at 128573986)' is 'x86_64-unknown-linux-gnu'
114:11.58 ld.lld: warning: Linking two modules of different target triples: '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build/toolkit/library/build/../../../layout/xul/Unified_cpp_layout_xul1.o' is 'x86_64-pc-linux-gnu' whereas '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build/x86_64-unknown-linux-gnu/release/libgkrust.a(style-f04672e24120959a.style.25050218-cgu.0.rcgu.o at 128573986)' is 'x86_64-unknown-linux-gnu'
114:11.60 ld.lld: warning: Linking two modules of different target triples: '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build/toolkit/library/build/../../../modules/libpref/Unified_cpp_modules_libpref0.o' is 'x86_64-pc-linux-gnu' whereas '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build/x86_64-unknown-linux-gnu/release/libgkrust.a(style-f04672e24120959a.style.25050218-cgu.0.rcgu.o at 128573986)' is 'x86_64-unknown-linux-gnu'
114:11.61 ld.lld: warning: Linking two modules of different target triples: '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build/toolkit/library/build/../../../parser/htmlparser/Unified_cpp_parser_htmlparser0.o' is 'x86_64-pc-linux-gnu' whereas '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build/x86_64-unknown-linux-gnu/release/libgkrust.a(style-f04672e24120959a.style.25050218-cgu.0.rcgu.o at 128573986)' is 'x86_64-unknown-linux-gnu'
114:11.63 ld.lld: warning: Linking two modules of different target triples: '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build/toolkit/library/build/../../../tools/profiler/Unified_cpp_tools_profiler0.o' is 'x86_64-pc-linux-gnu' whereas '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build/x86_64-unknown-linux-gnu/release/libgkrust.a(style-f04672e24120959a.style.25050218-cgu.0.rcgu.o at 128573986)' is 'x86_64-unknown-linux-gnu'
114:11.64 ld.lld: warning: Linking two modules of different target triples: '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build/toolkit/library/build/../../../xpcom/ds/Unified_cpp_xpcom_ds0.o' is 'x86_64-pc-linux-gnu' whereas '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build/x86_64-unknown-linux-gnu/release/libgkrust.a(style-f04672e24120959a.style.25050218-cgu.0.rcgu.o at 128573986)' is 'x86_64-unknown-linux-gnu'
114:11.65 ld.lld: warning: Linking two modules of different target triples: '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build/toolkit/library/build/../../../xpcom/ds/Unified_cpp_xpcom_ds1.o' is 'x86_64-pc-linux-gnu' whereas '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build/x86_64-unknown-linux-gnu/release/libgkrust.a(style-f04672e24120959a.style.25050218-cgu.0.rcgu.o at 128573986)' is 'x86_64-unknown-linux-gnu'
114:11.66 ld.lld: warning: Linking two modules of different target triples: '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build/toolkit/library/build/../../../xpcom/string/Unified_cpp_xpcom_string0.o' is 'x86_64-pc-linux-gnu' whereas '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build/x86_64-unknown-linux-gnu/release/libgkrust.a(style-f04672e24120959a.style.25050218-cgu.0.rcgu.o at 128573986)' is 'x86_64-unknown-linux-gnu'
114:50.58 ld.lld: warning: Linking two modules of different target triples: '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build/x86_64-unknown-linux-gnu/release/libgkrust.a(nsstring-8011e0c0045e868f.nsstring.6b326450-cgu.0.rcgu.o at 158258314)' is 'x86_64-unknown-linux-gnu' whereas '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build/toolkit/library/build/../../../dom/media/Unified_cpp_dom_media2.o' is 'x86_64-pc-linux-gnu'
115:09.42 LLVM ERROR: Cannot select: intrinsic %llvm.x86.aesni.aesenc
115:09.42 PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
115:09.42 Stack dump:
115:09.42 0.	Running pass 'Function Pass Manager' on module '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build/x86_64-unknown-linux-gnu/release/libgkrust.a(wgpu_hal-c6e346897e5c03de.wgpu_hal.ed2f4fe8-cgu.0.rcgu.o at 22003878)'.
115:09.42 1.	Running pass 'X86 DAG->DAG Instruction Selection' on function '@"_ZN9hashbrown3raw5inner17RawTable$LT$T$GT$14reserve_rehash17ha4764dca237dc774E"'
115:09.46  #0 0x00007f388fc82472 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x8b4472)
115:09.46  #1 0x00007f388fc80024 llvm::sys::RunSignalHandlers() (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x8b2024)
115:09.46  #2 0x00007f388fc801a6 (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x8b21a6)
115:09.46  #3 0x00007f388f01a6c0 (/lib64/libc.so.6+0x386c0)
115:09.47  #4 0x00007f388f01a63e raise (/lib64/libc.so.6+0x3863e)
115:09.47  #5 0x00007f388f004536 abort (/lib64/libc.so.6+0x22536)
115:09.47  #6 0x00007f388fbc1caa llvm::report_fatal_error(llvm::Twine const&, bool) (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x7f3caa)
115:09.47  #7 0x00007f388fbc1e2e (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x7f3e2e)
115:09.47  #8 0x00007f389048963a llvm::SelectionDAGISel::CannotYetSelect(llvm::SDNode*) (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x10bb63a)
115:09.47  #9 0x00007f389048d233 llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*, unsigned int) (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x10bf233)
115:09.47 #10 0x00007f389187b96e (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x24ad96e)
115:09.47 #11 0x00007f3890488227 llvm::SelectionDAGISel::DoInstructionSelection() (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x10ba227)
115:09.47 #12 0x00007f3890490b8b llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x10c2b8b)
115:09.47 #13 0x00007f3890493963 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x10c5963)
115:09.47 #14 0x00007f389049583e llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x10c783e)
115:09.47 #15 0x00007f3891885de9 (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x24b7de9)
115:09.47 #16 0x00007f388fffd19f (/usr/lib/llvm/13/lib64/libLLVM-13.so+0xc2f19f)
115:09.47 #17 0x00007f388fdb6db3 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x9e8db3)
115:09.47 #18 0x00007f388fdb6fc3 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x9e8fc3)
115:09.47 #19 0x00007f388fdb7754 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x9e9754)
115:09.47 #20 0x00007f3891212710 (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x1e44710)
115:09.47 #21 0x00007f389121330f (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x1e4530f)
115:09.47 #22 0x00007f3891213f33 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/13/lib64/libLLVM-13.so+0x1e45f33)
115:09.47 #23 0x00007f38911fb5c8 (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x1e2d5c8)
115:09.47 #24 0x00007f38911ff5bb (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x1e315bb)
115:09.47 #25 0x00007f388fc1a921 (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x84c921)
115:09.47 #26 0x00007f388fbfa219 (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x82c219)
115:09.47 #27 0x00007f388eef6628 __pthread_once_slow pthread_once.c:0:0
115:09.47 #28 0x00007f388fc1bf7d (/usr/lib/llvm/13/lib64/libLLVM-13.so+0x84df7d)
115:09.47 #29 0x00007f388eeeed4e start_thread pthread_create.c:0:0
115:09.47 #30 0x00007f388f0d9faf __clone (/lib64/libc.so.6+0xf7faf)
115:09.57 clang-13: error: unable to execute command: Aborted
115:09.57 clang-13: error: linker command failed due to signal (use -v to see invocation)
115:09.57 gmake[4]: *** [/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox-95.0.1/config/rules.mk:531: libxul.so] Error 254
115:09.57 gmake[4]: Leaving directory '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build/toolkit/library/build'
115:09.57 gmake[3]: *** [/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox-95.0.1/config/recurse.mk:72: toolkit/library/build/target] Error 2
115:09.57 gmake[3]: Leaving directory '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build'
115:09.57 gmake[2]: *** [/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox-95.0.1/config/recurse.mk:34: compile] Error 2
115:09.57 gmake[2]: Leaving directory '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build'
115:09.57 gmake[1]: *** [/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox-95.0.1/config/rules.mk:352: default] Error 2
115:09.57 gmake[1]: Leaving directory '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox_build'
115:09.57 gmake: *** [client.mk:63: build] Error 2
115:09.57 146 compiler warnings present.
 * ERROR: www-client/firefox-95.0.1-r1::gentoo failed (compile phase):
 *   Failed to run './mach build --verbose'
 * 
 * Call stack:
 *     ebuild.sh, line  127:  Called src_compile
 *   environment, line 5216:  Called virtx './mach' 'build' '--verbose'
 *   environment, line 6519:  Called die
 * The specific snippet of code:
 *       [[ ${retval} -ne 0 ]] && die "Failed to run '$@'";
 * 
 * If you need support, post the output of `emerge --info '=www-client/firefox-95.0.1-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=www-client/firefox-95.0.1-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/www-client/firefox-95.0.1-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/www-client/firefox-95.0.1-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox-95.0.1'
 * S: '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox-95.0.1'

>>> Failed to emerge www-client/firefox-95.0.1-r1, Log file:

>>>  '/var/tmp/portage/www-client/firefox-95.0.1-r1/temp/build.log'

 * Messages for package www-client/firefox-95.0.1-r1:

 * ERROR: www-client/firefox-95.0.1-r1::gentoo failed (compile phase):
 *   Failed to run './mach build --verbose'
 * 
 * Call stack:
 *     ebuild.sh, line  127:  Called src_compile
 *   environment, line 5216:  Called virtx './mach' 'build' '--verbose'
 *   environment, line 6519:  Called die
 * The specific snippet of code:
 *       [[ ${retval} -ne 0 ]] && die "Failed to run '$@'";
 * 
 * If you need support, post the output of `emerge --info '=www-client/firefox-95.0.1-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=www-client/firefox-95.0.1-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/www-client/firefox-95.0.1-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/www-client/firefox-95.0.1-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox-95.0.1'
 * S: '/var/tmp/portage/www-client/firefox-95.0.1-r1/work/firefox-95.0.1'
@llvmbot
Copy link
Member

llvmbot commented Jan 9, 2022

@llvm/issue-subscribers-backend-X86

@phoebewang
Copy link
Contributor

Is there a small reproducer? From the error message, I'd guess it's missing the required maes feature, or march that doesn't meet the requirment. Currently, only some latest Intel CPU support AES instructions, for Core they're skylake and above, for Atom they are goldmont and above. AMD supports it since btver1.

@vitaly-zdanevich
Copy link
Author

Is there a small reproducer?

Firefox in Gentoo

only some latest Intel CPU support AES instructions

My CPU is old.

Do you think that this is a defect of Gentoo ebuild?

@phoebewang
Copy link
Contributor

I saw --target="${CHOST}" in the link, I don't think it's a defect.
I don't know how the making system work in Gentoo. Usually, making system checks the environment and enable/disable knobs accordingly. These knobs decide which code will be compiled. It seems something wrong in the process. But I don't have any idea without a deep research.
I believe it is not problem of compiler. I'll close it. Feel free to reopen if you have new clues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants