Skip to content
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

LLVM libc fails to build in 13.0-rc1 #50763

Closed
berolinux opened this issue Aug 9, 2021 · 4 comments
Closed

LLVM libc fails to build in 13.0-rc1 #50763

berolinux opened this issue Aug 9, 2021 · 4 comments
Labels
bugzilla Issues migrated from bugzilla build-problem llvm:crash llvm:optimizations obsolete Issues with old (unsupported) versions of LLVM

Comments

@berolinux
Copy link

Bugzilla Link 51421
Version unspecified
OS Linux
Blocks #51489
CC @slacka,@tstellar

Extended Description

Building LLVM 13.0-rc1 with libc enabled results in

FAILED: projects/libc/src/math/x86_64/CMakeFiles/libc.src.math.x86_64.cos.dir/cos.cpp.o
/usr/bin/clang++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/bero/abf/llvm/BUILD/llvm-project-release-13.x/build/projects/libc/src/math/x86_64 -I/home/bero/abf/llvm/BUILD/llvm-project-release-13.x/libc/src/math/x86_64 -I/home/bero/abf/llvm/BUILD/llvm-project-release-13.x/build/include -I/home/bero/abf/llvm/BUILD/llvm-project-release-13.x/llvm/include -I/home/bero/abf/llvm/BUILD/llvm-project-release-13.x/build/projects/libc/include -I/home/bero/abf/llvm/BUILD/llvm-project-release-13.x/libc -I/home/bero/abf/llvm/BUILD/llvm-project-release-13.x/build/projects/libc -Os -fomit-frame-pointer -g3 -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all --param=ssp-buffer-size=4 -O3 -march=znver1 -mtune=znver1 -mmmx -msse -msse2 -mssse3 -msse4a -msse4.1 -msse4.2 -mavx -mavx2 -msha -maes -mclflushopt -mfsgsbase -mrdrnd -mfma -mrdseed -mpopcnt -madx -mbmi -mbmi2 -mfxsr -mxsave -mxsaveopt -mxsavec -mxsaves -mmwaitx -mclzero -mfpmath=sse -O3 -fpic -fno-semantic-interposition -Wl,-Bsymbolic -fvisibility-inlines-hidden -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wno-noexcept-type -Wnon-virtual-dtor -Wsuggest-override -Wno-comment -fdiagnostics-color -Os -fomit-frame-pointer -g3 -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all --param=ssp-buffer-size=4 -O3 -march=znver1 -mtune=znver1 -mmmx -msse -msse2 -mssse3 -msse4a -msse4.1 -msse4.2 -mavx -mavx2 -msha -maes -mclflushopt -mfsgsbase -mrdrnd -mfma -mrdseed -mpopcnt -madx -mbmi -mbmi2 -mfxsr -mxsave -mxsaveopt -mxsavec -mxsaves -mmwaitx -mclzero -mfpmath=sse -O3 -fpic -fno-semantic-interposition -Wl,-Bsymbolic -O2 -fpie -ffreestanding -DLLVM_LIBC_PUBLIC_PACKAGING -std=c++14 -MD -MT projects/libc/src/math/x86_64/CMakeFiles/libc.src.math.x86_64.cos.dir/cos.cpp.o -MF projects/libc/src/math/x86_64/CMakeFiles/libc.src.math.x86_64.cos.dir/cos.cpp.o.d -o projects/libc/src/math/x86_64/CMakeFiles/libc.src.math.x86_64.cos.dir/cos.cpp.o -c /home/bero/abf/llvm/BUILD/llvm-project-release-13.x/libc/src/math/x86_64/cos.cpp
clang-12: warning: -Wl,-Bsymbolic: 'linker' input unused [-Wunused-command-line-argument]
clang-12: warning: -Wl,-Bsymbolic: 'linker' input unused [-Wunused-command-line-argument]
clang++: /builddir/build/BUILD/llvm-project-release-12.x/llvm/lib/Target/X86/X86FloatingPoint.cpp:1604: void (anonymous namespace)::FPS::handleSpecialFP(MachineBasicBlock::iterator &): Assertion `(1 << getFPReg(MI.getOperand(I)) & STDefs) == 0 && "Operands with constraint "f" cannot overlap with defs"' failed.
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: /usr/bin/clang++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/bero/abf/llvm/BUILD/llvm-project-release-13.x/build/projects/libc/src/math/x86_64 -I/home/bero/abf/llvm/BUILD/llvm-project-release-13.x/libc/src/math/x86_64 -I/home/bero/abf/llvm/BUILD/llvm-project-release-13.x/build/include -I/home/bero/abf/llvm/BUILD/llvm-project-release-13.x/llvm/include -I/home/bero/abf/llvm/BUILD/llvm-project-release-13.x/build/projects/libc/include -I/home/bero/abf/llvm/BUILD/llvm-project-release-13.x/libc -I/home/bero/abf/llvm/BUILD/llvm-project-release-13.x/build/projects/libc -Os -fomit-frame-pointer -g3 -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all --param=ssp-buffer-size=4 -O3 -march=znver1 -mtune=znver1 -mmmx -msse -msse2 -mssse3 -msse4a -msse4.1 -msse4.2 -mavx -mavx2 -msha -maes -mclflushopt -mfsgsbase -mrdrnd -mfma -mrdseed -mpopcnt -madx -mbmi -mbmi2 -mfxsr -mxsave -mxsaveopt -mxsavec -mxsaves -mmwaitx -mclzero -mfpmath=sse -O3 -fpic -fno-semantic-interposition -Wl,-Bsymbolic -fvisibility-inlines-hidden -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wno-noexcept-type -Wnon-virtual-dtor -Wsuggest-override -Wno-comment -fdiagnostics-color -Os -fomit-frame-pointer -g3 -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all --param=ssp-buffer-size=4 -O3 -march=znver1 -mtune=znver1 -mmmx -msse -msse2 -mssse3 -msse4a -msse4.1 -msse4.2 -mavx -mavx2 -msha -maes -mclflushopt -mfsgsbase -mrdrnd -mfma -mrdseed -mpopcnt -madx -mbmi -mbmi2 -mfxsr -mxsave -mxsaveopt -mxsavec -mxsaves -mmwaitx -mclzero -mfpmath=sse -O3 -fpic -fno-semantic-interposition -Wl,-Bsymbolic -O2 -fpie -ffreestanding -DLLVM_LIBC_PUBLIC_PACKAGING -std=c++14 -MD -MT projects/libc/src/math/x86_64/CMakeFiles/libc.src.math.x86_64.cos.dir/cos.cpp.o -MF projects/libc/src/math/x86_64/CMakeFiles/libc.src.math.x86_64.cos.dir/cos.cpp.o.d -o projects/libc/src/math/x86_64/CMakeFiles/libc.src.math.x86_64.cos.dir/cos.cpp.o -c /home/bero/abf/llvm/BUILD/llvm-project-release-13.x/libc/src/math/x86_64/cos.cpp

  1.  <eof> parser at end of file
    
  2.  Code generation
    
  3.  Running pass 'Function Pass Manager' on module '/home/bero/abf/llvm/BUILD/llvm-project-release-13.x/libc/src/math/x86_64/cos.cpp'.
    
  4.  Running pass 'X86 FP Stackifier' on function '@cos'
    

#​0 0x00007fecca070201 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib64/libLLVMSupport.so.12.0+0x232201)
#​1 0x00007fecca0704dd (/usr/lib64/libLLVMSupport.so.12.0+0x2324dd)
#​2 0x00007fecca06de2a llvm::sys::RunSignalHandlers() (/usr/lib64/libLLVMSupport.so.12.0+0x22fe2a)
#​3 0x00007fecca06f41b llvm::sys::CleanupOnSignal(unsigned long) (/usr/lib64/libLLVMSupport.so.12.0+0x23141b)
#​4 0x00007fecc9f7e3a5 (/usr/lib64/libLLVMSupport.so.12.0+0x1403a5)
#​5 0x00007fecc9f7e5b5 (/usr/lib64/libLLVMSupport.so.12.0+0x1405b5)
#​6 0x00007fecc9a6d360 (/lib64/libc.so.6+0x40360)
#​7 0x00007fecc9a6d2dc raise (/lib64/libc.so.6+0x402dc)
#​8 0x00007fecc9a53538 abort (/lib64/libc.so.6+0x26538)
#​9 0x00007fecc9a53421 (/lib64/libc.so.6+0x26421)
#​10 0x00007fecc9a64772 (/lib64/libc.so.6+0x37772)
#​11 0x00007fecced1d125 (/usr/lib64/libLLVMX86CodeGen.so.12.0+0x2ec125)
#​12 0x00007fecced191ec (/usr/lib64/libLLVMX86CodeGen.so.12.0+0x2e81ec)
#​13 0x00007feccd03019c llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/lib64/libLLVMCodeGen.so.12.0+0x4c319c)
#​14 0x00007fecca58c278 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/lib64/libLLVMCore.so.12.0+0x3e3278)
#​15 0x00007fecca5944a3 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/lib64/libLLVMCore.so.12.0+0x3eb4a3)
#​16 0x00007fecca58ceda llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib64/libLLVMCore.so.12.0+0x3e3eda)
#​17 0x00007fecca5947c7 llvm::legacy::PassManager::run(llvm::Module&) (/usr/lib64/libLLVMCore.so.12.0+0x3eb7c7)
#​18 0x00007feccd702286 (/usr/lib64/libclangCodeGen.so.12.0+0x2a6286)
#​19 0x00007feccd6fb857 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream >) (/usr/lib64/libclangCodeGen.so.12.0+0x29f857)
#​20 0x00007feccda6855b (/usr/lib64/libclangCodeGen.so.12.0+0x60c55b)
#​21 0x00007fecc76fbe55 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib64/libclangParse.so.12.0+0x6de55)
#​22 0x00007feccbcd40af clang::ASTFrontendAction::ExecuteAction() (/usr/lib64/libclangFrontend.so.12.0+0x1d20af)
#​23 0x00007feccda61fc0 clang::CodeGenAction::ExecuteAction() (/usr/lib64/libclangCodeGen.so.12.0+0x605fc0)
#​24 0x00007feccbcd3766 clang::FrontendAction::Execute() (/usr/lib64/libclangFrontend.so.12.0+0x1d1766)
#​25 0x00007feccbc37c6a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib64/libclangFrontend.so.12.0+0x135c6a)
#​26 0x00007fecce5e7e26 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib64/libclangFrontendTool.so.12.0+0x5e26)
#​27 0x00000000002196eb cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang+++0x2196eb)
#​28 0x0000000000216e1f (/usr/bin/clang+++0x216e1f)
#​29 0x00007feccb952fe4 (/usr/lib64/libclangDriver.so.12.0+0x113fe4)
#​30 0x00007fecc9f7e28a llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/lib64/libLLVMSupport.so.12.0+0x14028a)
#​31 0x00007feccb9528df clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optionalllvm::StringRef >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool) const (/usr/lib64/libclangDriver.so.12.0+0x1138df)
#​32 0x00007feccb9132ac clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/usr/lib64/libclangDriver.so.12.0+0xd42ac)
#​33 0x00007feccb9135ba clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/usr/lib64/libclangDriver.so.12.0+0xd45ba)
#​34 0x00007feccb92e1b1 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/usr/lib64/libclangDriver.so.12.0+0xef1b1)
#​35 0x00000000002160d4 main (/usr/bin/clang+++0x2160d4)
#​36 0x00007fecc9a553ad __libc_start_main (/lib64/libc.so.6+0x283ad)
#​37 0x0000000000212baa _start (/usr/bin/clang+++0x212baa)
clang-12: error: clang frontend command failed with exit code 134 (use -v to see invocation)
OpenMandriva 12.0.1-0.20210703.1 clang version 12.0.1 (/builddir/build/BUILD/llvm-project-release-12.x/clang e4fa6dd46578aa865b61b8c567dbab6357d19443)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/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/cos-3dbde9.cpp
clang-12: note: diagnostic msg: /tmp/cos-3dbde9.sh
clang-12: note: diagnostic msg:


@slacka
Copy link
Mannequin

slacka mannequin commented Sep 25, 2021

This and libc's development status should probably be mentioned as a Known Issue in the release notes.

@tstellar
Copy link
Collaborator

mentioned in issue #51489

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
@asl asl added this to the LLVM 13.0.1 release milestone Dec 12, 2021
@tstellar
Copy link
Collaborator

The deadline for requesting fixes for the release has passed. This bug is being removed from the LLVM 13.0.1 release milestone. If you have a fix or think this bug is important enough to block the release, please explain why in a comment and add the bug back to the LLVM 13.0.1 release milestone.

@tstellar tstellar removed this from the LLVM 13.0.1 release milestone Dec 21, 2021
@Endilll
Copy link
Contributor

Endilll commented Aug 7, 2023

An old build issue. Feel free to reopen if it still reproduces with the latest release.

@Endilll Endilll closed this as not planned Won't fix, can't repro, duplicate, stale Aug 7, 2023
@EugeneZelenko EugeneZelenko added obsolete Issues with old (unsupported) versions of LLVM llvm:optimizations labels Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla build-problem llvm:crash llvm:optimizations obsolete Issues with old (unsupported) versions of LLVM
Projects
None yet
Development

No branches or pull requests

5 participants