Fails to build LLVM 18.1.6 with mold
aka-mj opened this issue · 3 comments
aka-mj commented
Trying to build LLVM-project version 18.1.6 with mold and I get the following error:
~/workspace/llvm/llvm-project-18.1.6.src> cmake --build build
[5881/6091] Linking CXX shared library lib/libRemarks.so.18.1
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkStringGetData`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkStringGetLen`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkDebugLocGetSourceFilePath`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkDebugLocGetSourceLine`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkDebugLocGetSourceColumn`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkArgGetKey`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkArgGetValue`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkArgGetDebugLoc`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkEntryDispose`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkEntryGetType`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkEntryGetPassName`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkEntryGetRemarkName`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkEntryGetFunctionName`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkEntryGetDebugLoc`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkEntryGetHotness`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkEntryGetNumArgs`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkEntryGetFirstArg`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkEntryGetNextArg`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkParserCreateYAML`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkParserCreateBitstream`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkParserGetNext`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkParserHasError`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkParserGetErrorMessage`: symbol not found
mold: warning: /home/mjohn/workspace/llvm/llvm-project-18.1.6.src/build/tools/remarks-shlib/Remarks.exports: cannot assign version `LLVM_18.1` to symbol `LLVMRemarkParserDispose`: symbol not found
[6091/6091] Linking CXX executable bin/obj2yaml
Building commands:
cmake -S llvm -B build -G Ninja -DLLVM_ENABLE_PROJECTS='clang;lld;lldb' -DCMAKE_BUILD_TYPE='Release' -DLLVM_USE_LINKER=mold -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12
cmake --build build
This is on Ubuntu Linux 20.04.
rui314 commented
They are warnings and not errors, and the warnings seem legitimate; Remarks.exports
mentions the symbols in the warning messages while the symbols don't actually exist in the input. You may want to report it to LLVM.
aka-mj commented
My apologies. I'll report it to LLVM. Thank you.
rui314 commented
Thank you for filing it to upstream. For the record, here is the upstream bug: llvm/llvm-project#93028