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

llvmorg-16.0.0-rc1 Stage 2 build failure (default linker is LLD, shared libraries) #60568

Closed
amy-kwan opened this issue Feb 6, 2023 · 4 comments · Fixed by llvm/llvm-project-release-prs#279
Assignees
Labels
LTO Link time optimization (regular/full LTO or ThinLTO) release:backport release:merged

Comments

@amy-kwan
Copy link
Contributor

amy-kwan commented Feb 6, 2023

When performing a multistage shared library build of LLVM 16.0.0 rc1 on Power with LLD as the default linker, the following build failure is encountered on the second stage:

FAILED: lib/libLTO.so.16git
: && /home/amyk/llvm/lld-shared-lib2/stage1/bin/clang++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete -fuse-ld=lld -Wl,--color-diagnostics   -Wl,--gc-sections  -Wl,--version-script,"/home/amyk/llvm/lld-shared-lib2/stage2/tools/lto/LTO.exports" -shared -Wl,-soname,libLTO.so.16git -o lib/libLTO.so.16git tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o tools/lto/CMakeFiles/LTO.dir/lto.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib"  lib/libLLVMAArch64AsmParser.so.16git  lib/libLLVMAMDGPUAsmParser.so.16git  lib/libLLVMARMAsmParser.so.16git  lib/libLLVMAVRAsmParser.so.16git  lib/libLLVMBPFAsmParser.so.16git  lib/libLLVMMipsAsmParser.so.16git  lib/libLLVMMSP430AsmParser.so.16git  lib/libLLVMPowerPCAsmParser.so.16git  lib/libLLVMRISCVAsmParser.so.16git  lib/libLLVMSparcAsmParser.so.16git  lib/libLLVMSystemZAsmParser.so.16git  lib/libLLVMVEAsmParser.so.16git  lib/libLLVMWebAssemblyAsmParser.so.16git  lib/libLLVMX86AsmParser.so.16git  lib/libLLVMAArch64CodeGen.so.16git  lib/libLLVMAMDGPUCodeGen.so.16git  lib/libLLVMARMCodeGen.so.16git  lib/libLLVMAVRCodeGen.so.16git  lib/libLLVMBPFCodeGen.so.16git  lib/libLLVMHexagonCodeGen.so.16git  lib/libLLVMLanaiCodeGen.so.16git  lib/libLLVMMipsCodeGen.so.16git  lib/libLLVMMSP430CodeGen.so.16git  lib/libLLVMNVPTXCodeGen.so.16git  lib/libLLVMPowerPCCodeGen.so.16git  lib/libLLVMRISCVCodeGen.so.16git  lib/libLLVMSparcCodeGen.so.16git  lib/libLLVMSystemZCodeGen.so.16git  lib/libLLVMVECodeGen.so.16git  lib/libLLVMWebAssemblyCodeGen.so.16git  lib/libLLVMX86CodeGen.so.16git  lib/libLLVMXCoreCodeGen.so.16git  lib/libLLVMAVRDesc.so.16git  lib/libLLVMBPFDesc.so.16git  lib/libLLVMMipsDesc.so.16git  lib/libLLVMMSP430Desc.so.16git  lib/libLLVMNVPTXDesc.so.16git  lib/libLLVMPowerPCDesc.so.16git  lib/libLLVMSparcDesc.so.16git  lib/libLLVMVEDesc.so.16git  lib/libLLVMX86Desc.so.16git  lib/libLLVMXCoreDesc.so.16git  lib/libLLVMAArch64Disassembler.so.16git  lib/libLLVMAMDGPUDisassembler.so.16git  lib/libLLVMARMDisassembler.so.16git  lib/libLLVMAVRDisassembler.so.16git  lib/libLLVMBPFDisassembler.so.16git  lib/libLLVMHexagonDisassembler.so.16git  lib/libLLVMLanaiDisassembler.so.16git  lib/libLLVMMipsDisassembler.so.16git  lib/libLLVMMSP430Disassembler.so.16git  lib/libLLVMPowerPCDisassembler.so.16git  lib/libLLVMRISCVDisassembler.so.16git  lib/libLLVMSparcDisassembler.so.16git  lib/libLLVMSystemZDisassembler.so.16git  lib/libLLVMVEDisassembler.so.16git  lib/libLLVMWebAssemblyDisassembler.so.16git  lib/libLLVMX86Disassembler.so.16git  lib/libLLVMXCoreDisassembler.so.16git  lib/libLLVMAVRInfo.so.16git  lib/libLLVMBPFInfo.so.16git  lib/libLLVMMipsInfo.so.16git  lib/libLLVMMSP430Info.so.16git  lib/libLLVMNVPTXInfo.so.16git  lib/libLLVMPowerPCInfo.so.16git  lib/libLLVMSparcInfo.so.16git  lib/libLLVMVEInfo.so.16git  lib/libLLVMX86Info.so.16git  lib/libLLVMXCoreInfo.so.16git  lib/libLLVMLTO.so.16git  lib/libLLVMHexagonAsmParser.so.16git  lib/libLLVMLanaiAsmParser.so.16git  lib/libLLVMAArch64Desc.so.16git  lib/libLLVMAArch64Info.so.16git  lib/libLLVMAMDGPUDesc.so.16git  lib/libLLVMAMDGPUInfo.so.16git  lib/libLLVMARMDesc.so.16git  lib/libLLVMARMInfo.so.16git  lib/libLLVMHexagonDesc.so.16git  lib/libLLVMHexagonInfo.so.16git  lib/libLLVMLanaiDesc.so.16git  lib/libLLVMLanaiInfo.so.16git  lib/libLLVMRISCVDesc.so.16git  lib/libLLVMRISCVInfo.so.16git  lib/libLLVMSystemZDesc.so.16git  lib/libLLVMSystemZInfo.so.16git  lib/libLLVMWebAssemblyDesc.so.16git  lib/libLLVMWebAssemblyInfo.so.16git  lib/libLLVMMCDisassembler.so.16git  lib/libLLVMCodeGen.so.16git  lib/libLLVMTarget.so.16git  lib/libLLVMMC.so.16git  lib/libLLVMBitReader.so.16git  lib/libLLVMCore.so.16git  lib/libLLVMSupport.so.16git  -Wl,-rpath-link,/home/amyk/llvm/lld-shared-lib2/stage2/lib && :
ld.lld: error: version script assignment of 'LLVM_16' to symbol 'LLVMCreateDisasm' failed: symbol not defined
ld.lld: error: version script assignment of 'LLVM_16' to symbol 'LLVMCreateDisasmCPU' failed: symbol not defined
ld.lld: error: version script assignment of 'LLVM_16' to symbol 'LLVMDisasmDispose' failed: symbol not defined
ld.lld: error: version script assignment of 'LLVM_16' to symbol 'LLVMDisasmInstruction' failed: symbol not defined
ld.lld: error: version script assignment of 'LLVM_16' to symbol 'LLVMSetDisasmOptions' failed: symbol not defined
ld.lld: error: version script assignment of 'LLVM_16' to symbol 'LLVMCreateDisasmCPUFeatures' failed: symbol not defined
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
[4020/5862] Building CXX object tools/clang/lib/AST...iles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o
ninja: build stopped: subcommand failed.

This is seen as a result of 241dbd3.

@amy-kwan amy-kwan added this to the LLVM 16.0.0 Release milestone Feb 6, 2023
@amy-kwan amy-kwan self-assigned this Feb 6, 2023
@amy-kwan
Copy link
Contributor Author

amy-kwan commented Feb 6, 2023

The following fixes have been committed to main and resolves this build failure:

We would like to backport these commits into release/16.x to resolve the second stage build failures seen on Power.

/cherry-pick c294bdd c294bdd

@llvmbot
Copy link
Member

llvmbot commented Feb 6, 2023

Failed to cherry-pick: c294bdd

https://github.com/llvm/llvm-project/actions/runs/4107490472

Please manually backport the fix and push it to your github fork. Once this is done, please add a comment like this:

/branch <user>/<repo>/<branch>

@EugeneZelenko EugeneZelenko added LTO Link time optimization (regular/full LTO or ThinLTO) and removed lld labels Feb 6, 2023
@github-project-automation github-project-automation bot moved this to Needs Triage in LLVM Release Status Feb 7, 2023
@tru tru moved this from Needs Triage to Needs Pull Request in LLVM Release Status Feb 7, 2023
@amy-kwan
Copy link
Contributor Author

amy-kwan commented Feb 7, 2023

/branch amy-kwan/llvm-project/amykIssue60568

@llvmbot
Copy link
Member

llvmbot commented Feb 7, 2023

/pull-request llvm/llvm-project-release-prs#279

@tru tru moved this from Needs Pull Request to Needs Review in LLVM Release Status Feb 8, 2023
@tru tru moved this from Needs Review to Needs Merge in LLVM Release Status Feb 9, 2023
@tru tru moved this from Needs Merge to Done in LLVM Release Status Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTO Link time optimization (regular/full LTO or ThinLTO) release:backport release:merged
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants