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

Compilation Fails [ld.lld version script assignment ...] #357

Open
zalaare opened this issue Dec 30, 2024 · 1 comment
Open

Compilation Fails [ld.lld version script assignment ...] #357

zalaare opened this issue Dec 30, 2024 · 1 comment

Comments

@zalaare
Copy link

zalaare commented Dec 30, 2024

When compiling igc I'm running into the following result:

FAILED: IGC/llvm-deps-15.0.0/build/src/lib/libopencl-clang.so.15 
: && /bin/clang++ -fPIC -Os -pipe -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -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 -Wno-comment -Wstring-conversion -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete -Wl,--color-diagnostics   -Wl,--gc-sections -Wl,--no-undefined -Wl,-Bsymbolic -Wl,--version-script=/zizzy/build/intel-graphics-compiler/src/build-igc/IGC/llvm-deps-15.0.0/src/llvm/projects/opencl-clang/common_clang.map  -Xlinker --dependency-file=IGC/llvm-deps-15.0.0/build/src/projects/opencl-clang/CMakeFiles/opencl-clang.dir/link.d -shared -Wl,-soname,libopencl-clang.so.15 -o IGC/llvm-deps-15.0.0/build/src/lib/libopencl-clang.so.15 IGC/llvm-deps-15.0.0/build/src/projects/opencl-clang/cl_headers/CMakeFiles/cl_headers.dir/opencl-c.h.cpp.o IGC/llvm-deps-15.0.0/build/src/projects/opencl-clang/cl_headers/CMakeFiles/cl_headers.dir/opencl-c-base.h.cpp.o IGC/llvm-deps-15.0.0/build/src/projects/opencl-clang/cl_headers/CMakeFiles/cl_headers.dir/opencl-c-12-spir.mod.cpp.o IGC/llvm-deps-15.0.0/build/src/projects/opencl-clang/cl_headers/CMakeFiles/cl_headers.dir/opencl-c-20-spir.mod.cpp.o IGC/llvm-deps-15.0.0/build/src/projects/opencl-clang/cl_headers/CMakeFiles/cl_headers.dir/opencl-c-30-spir.mod.cpp.o IGC/llvm-deps-15.0.0/build/src/projects/opencl-clang/cl_headers/CMakeFiles/cl_headers.dir/opencl-c-12-spir64.mod.cpp.o IGC/llvm-deps-15.0.0/build/src/projects/opencl-clang/cl_headers/CMakeFiles/cl_headers.dir/opencl-c-20-spir64.mod.cpp.o IGC/llvm-deps-15.0.0/build/src/projects/opencl-clang/cl_headers/CMakeFiles/cl_headers.dir/opencl-c-30-spir64.mod.cpp.o IGC/llvm-deps-15.0.0/build/src/projects/opencl-clang/cl_headers/CMakeFiles/cl_headers.dir/opencl-c-12-spir-fp64.mod.cpp.o IGC/llvm-deps-15.0.0/build/src/projects/opencl-clang/cl_headers/CMakeFiles/cl_headers.dir/opencl-c-20-spir-fp64.mod.cpp.o IGC/llvm-deps-15.0.0/build/src/projects/opencl-clang/cl_headers/CMakeFiles/cl_headers.dir/opencl-c-30-spir-fp64.mod.cpp.o IGC/llvm-deps-15.0.0/build/src/projects/opencl-clang/cl_headers/CMakeFiles/cl_headers.dir/opencl-c-12-spir64-fp64.mod.cpp.o IGC/llvm-deps-15.0.0/build/src/projects/opencl-clang/cl_headers/CMakeFiles/cl_headers.dir/opencl-c-20-spir64-fp64.mod.cpp.o IGC/llvm-deps-15.0.0/build/src/projects/opencl-clang/cl_headers/CMakeFiles/cl_headers.dir/opencl-c-30-spir64-fp64.mod.cpp.o IGC/llvm-deps-15.0.0/build/src/projects/opencl-clang/cl_headers/CMakeFiles/cl_headers.dir/module.modulemap.cpp.o IGC/llvm-deps-15.0.0/build/src/projects/opencl-clang/CMakeFiles/opencl-clang.dir/common_clang.cpp.o IGC/llvm-deps-15.0.0/build/src/projects/opencl-clang/CMakeFiles/opencl-clang.dir/options.cpp.o IGC/llvm-deps-15.0.0/build/src/projects/opencl-clang/CMakeFiles/opencl-clang.dir/pch_mgr.cpp.o IGC/llvm-deps-15.0.0/build/src/projects/opencl-clang/CMakeFiles/opencl-clang.dir/options_compile.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib"  -ldl  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMSPIRVLib.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangBasic.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangCodeGen.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangDriver.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangFrontend.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangFrontendTool.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangCodeGen.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangRewriteFrontend.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangARCMigrate.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangStaticAnalyzerFrontend.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangStaticAnalyzerCheckers.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangStaticAnalyzerCore.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangCrossTU.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangIndex.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangFrontend.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangDriver.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangParse.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangSerialization.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangSema.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangAnalysis.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangEdit.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangFormat.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangToolingInclusions.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangToolingCore.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangRewrite.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangASTMatchers.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangAST.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangLex.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangBasic.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMDemangle.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMSupport.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMTableGen.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMCore.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMFuzzerCLI.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMFuzzMutate.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMFileCheck.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMInterfaceStub.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMIRReader.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMCodeGen.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMSelectionDAG.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMAsmPrinter.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMMIRParser.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMGlobalISel.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMBinaryFormat.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMBitReader.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMBitWriter.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMBitstreamReader.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMDWARFLinker.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMExtensions.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMFrontendOpenACC.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMFrontendOpenMP.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMTransformUtils.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMInstrumentation.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMAggressiveInstCombine.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMInstCombine.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMScalarOpts.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMipo.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMVectorize.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMObjCARCOpts.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMCoroutines.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMCFGuard.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMLinker.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMAnalysis.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMLTO.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMMC.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMMCParser.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMMCDisassembler.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMMCA.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMObjCopy.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMObject.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMObjectYAML.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMOption.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMRemarks.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMDebugInfoDWARF.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMDebugInfoGSYM.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMDebugInfoMSF.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMDebugInfoCodeView.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMDebugInfoPDB.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMSymbolize.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMDWP.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMExecutionEngine.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMInterpreter.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMJITLink.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMMCJIT.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMOrcJIT.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMOrcShared.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMOrcTargetProcess.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMRuntimeDyld.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMTarget.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMAsmParser.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMLineEditor.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMProfileData.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMCoverage.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMPasses.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMTextAPI.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMDlltoolDriver.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMLibDriver.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMXRay.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMWindowsDriver.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMWindowsManifest.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMExtensions.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangExtractAPI.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangIndex.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangFrontend.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangDriver.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMWindowsDriver.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangParse.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangSerialization.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangSema.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangAnalysis.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangASTMatchers.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangEdit.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangSupport.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangFormat.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangToolingInclusions.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangToolingCore.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangRewrite.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangAST.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangLex.a  IGC/llvm-deps-15.0.0/build/src/lib/libclangBasic.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMSelectionDAG.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMAsmPrinter.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMCodeGen.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMMCDisassembler.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMExecutionEngine.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMJITLink.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMOrcTargetProcess.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMOrcShared.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMRuntimeDyld.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMObjCARCOpts.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMCoroutines.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMipo.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMIRReader.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMAsmParser.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMBitWriter.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMFrontendOpenMP.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMInstrumentation.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMScalarOpts.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMAggressiveInstCombine.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMInstCombine.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMVectorize.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMLinker.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMTransformUtils.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMTarget.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMAnalysis.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMProfileData.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMSymbolize.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMDebugInfoDWARF.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMDebugInfoPDB.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMDebugInfoMSF.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMOption.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMObject.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMBitReader.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMCore.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMRemarks.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMBitstreamReader.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMMCParser.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMMC.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMDebugInfoCodeView.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMTextAPI.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMBinaryFormat.a  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMSupport.a  -ldl  IGC/llvm-deps-15.0.0/build/src/lib/libLLVMDemangle.a  -lrt  -lm  /usr/lib/libz.so && :
ld.lld: error: version script assignment of 'global' to symbol 'CheckLinkOptions' failed: symbol not defined
ld.lld: error: version script assignment of 'global' to symbol 'Link' failed: symbol not defined
ld.lld: error: version script assignment of 'global' to symbol 'GetKernelArgInfo' failed: symbol not defined
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

I use Clang 19, LLD and LLVM libc++ for my toolchain. CMAKE invocation:
cmake -B build-igc -S igc -G Ninja -Wno-dev -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="" -DIGC_OPTION__LLVM_PREFERRED_VERSION="15.0.0" -DIGC_OPTION__ARCHITECTURE_TARGET="Linux64" -DINSTALL_SPIRVDLL=0 -DINSTALL_GENX_IR=On

I have tested tags:
[v2.2,3]
[v2.1.12]
[igc-1.0.17791.9]
[igc-1.0.17537.20]
[igc-1.0.17384.11]
[igc-1.0.17193.4]

I have tested Clang 18 and 17 with the same result.
I have tested stable LLVM-14.0.0 and 140 branches instead of 15.0.0 and 150 experimental branches as well with the same result.

@ReillyBrogan
Copy link

We have a patch to fix this build failure on Solus: https://raw.githubusercontent.com/getsolus/packages/refs/heads/main/packages/i/intel-graphics-compiler/files/0001-ftbfs-llvm-17.patch

Alternately you can add -Wl,--undefined-version to your LDFLAGS.

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

No branches or pull requests

2 participants