Closed eero-t closed 3 years ago
@eero-t thank you for opening this issue. We are debugging internally and will get back to you shortly.
Hello there,
Probably you are missing those packages: https://packages.ubuntu.com/focal/liblld-10 https://packages.ubuntu.com/focal/liblld-10-dev
Could you install them and give another try?
Yes, configuration phase passes with that being present => Please add that info also to build instructions!
However, after that, there's another regression.
Build fails to linking error, I guess because pthreads is not listed in CMake linker options:
[795/796] Linking CXX shared library IGC/Release/libigc.so.1.0.1
FAILED: IGC/Release/libigc.so.1.0.1
: && /usr/bin/c++ -fPIC -fno-exceptions -fdata-sections -ffunction-sections -O2 -pipe -fmessage-length=0 -march=corei7 -mstackrealign -fms-extensions -Werror -Wno-unused-parameter -Wno-missing-field-initializers -Wwrite-strings -Wno-long-long -Wswitch -Wno-sign-compare -Wno-unused-result -Wno-enum-compare -Wno-type-limits -Wno-ignored-qualifiers -Wno-shadow -Wformat -Wformat-security -Wno-extra -Wno-write-strings -finline -fno-strict-aliasing -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 -Wno-unknown-pragmas -fPIC -D_FORTIFY_SOURCE=2 -fstack-protector -finline-functions -funswitch-loops -Wno-maybe-uninitialized -lrt -fno-rtti -fvisibility=hidden -fvisibility-inlines-hidden -DNDEBUG -g -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections -shared -Wl,-soname,libigc.so.1 -o IGC/Release/libigc.so.1.0.1 IGC/CMakeFiles/igc_dll.dir/common/CompilerStatsUtils.cpp.o IGC/CMakeFiles/igc_dll.dir/common/igc_regkeys.cpp.o IGC/CMakeFiles/igc_dll.dir/common/IGCConstantFolder.cpp.o IGC/CMakeFiles/igc_dll.dir/common/LLVMUtils.cpp.o IGC/CMakeFiles/igc_dll.dir/common/ShaderOverride.cpp.o IGC/CMakeFiles/igc_dll.dir/common/Stats.cpp.o IGC/CMakeFiles/igc_dll.dir/common/SysUtils.cpp.o IGC/CMakeFiles/igc_dll.dir/common/debug/Debug.cpp.o IGC/CMakeFiles/igc_dll.dir/common/debug/Dump.cpp.o IGC/CMakeFiles/igc_dll.dir/common/debug/TeeOutputStream.cpp.o IGC/CMakeFiles/igc_dll.dir/common/SystemThread.cpp.o IGC/CMakeFiles/igc_dll.dir/common/MDFrameWork.cpp.o IGC/CMakeFiles/igc_dll.dir/common/FunctionUpgrader.cpp.o IGC/CMakeFiles/igc_dll.dir/common/IntrinsicAnnotator.cpp.o IGC/CMakeFiles/igc_dll.dir/common/allocator.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/CLElfLib/ElfReader.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/CLElfLib/ElfWriter.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorCommon/AddImplicitArgs.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorCommon/customApi.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/dllInterfaceCompute.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorCommon/ImplicitArgs.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorCommon/ProcessFuncAttributes.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorCommon/TypesLegalizationPass.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorCommon/LegalizeFunctionSignatures.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/OCL/LoadBuffer.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/OCL/Patch/patch_parser.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/OCL/Platform/cmd_media_caps_g8.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/OCL/Platform/cmd_parser_g8.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/OCL/sp/spp_g8.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/OCL/sp/sp_g8.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/OCL/sp/sp_debug.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/OCL/util/BinaryStream.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/UnifyIROCL.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/MoveStaticAllocas.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/OCL/sp/zebin_builder.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/SPIRV/libSPIRV/SPIRVBasicBlock.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/SPIRV/libSPIRV/SPIRVDebug.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/SPIRV/libSPIRV/SPIRVDecorate.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/SPIRV/libSPIRV/SPIRVEntry.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/SPIRV/libSPIRV/SPIRVFunction.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/SPIRV/libSPIRV/SPIRVInstruction.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/SPIRV/libSPIRV/SPIRVModule.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/SPIRV/libSPIRV/SPIRVStream.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/SPIRV/libSPIRV/SPIRVType.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/SPIRV/libSPIRV/SPIRVValue.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/SPIRV/SPIRVReader.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/SPIRV/SPIRVUtil.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/ocl_igc_interface/impl/igc_features_and_workarounds_impl.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/ocl_igc_interface/impl/igc_ocl_device_ctx_impl.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/ocl_igc_interface/impl/igc_ocl_translation_ctx_impl.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/ocl_igc_interface/impl/ocl_gen_binary_impl.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/ocl_igc_interface/impl/ocl_translation_output_impl.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/ocl_igc_interface/impl/gt_system_info_impl.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/ocl_igc_interface/impl/platform_impl.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/cif/cif/builtins/memory/buffer/impl/buffer_impl.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/cif/cif/builtins/builtins_registry.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/cif/cif/export/cif_main.cpp.o IGC/CMakeFiles/igc_dll.dir/AdaptorOCL/cif/cif/export/registry.cpp.o -Wl,-rpath,/usr/lib/llvm-10/lib: IGC/Release/libzebinlib.a IGC/Release/libCompiler.a IGC/Release/libGenISAIntrinsics.a IGC/visa/igfxcmjit64.a IGC/Release/libGenXDebugInfo.a -Wl,--whole-archive IGC/Release/libBiFLibOcl.a -Wl,--no-whole-archive IGC/Release/libVCIGCDeps.a -Wl,--start-group /usr/lib/llvm-10/lib/liblldELF.a -Wl,--end-group -ldl IGC/Release/libVCDriver.a -ldl IGC/Release/libIGCOptions.a IGC/Release/libVCCodeGen.a IGC/visa/igfxcmjit64.a IGC/Release/libiga_enc64.a IGC/Release/libiga_s64.a IGC/Release/libGenXDebugInfo.a IGC/Release/libVCTransforms.a IGC/Release/libVCTargetInfo.a IGC/Release/libVCGeneralUtils.a IGC/Release/libVCGenXUtils.a IGC/Release/libLLVMGenXIntrinsics.a IGC/Release/libVCSupport.a IGC/Release/libVCEmbeddedBiF.a /usr/lib/llvm-10/lib/liblldCommon.a /usr/lib/llvm-10/lib/libLLVM-10.so.1 && :
/usr/bin/ld: /usr/lib/llvm-10/lib/liblldCommon.a(Filesystem.cpp.o): in function `lld::unlinkAsync(llvm::StringRef)':
(.text._ZN3lld11unlinkAsyncEN4llvm9StringRefE+0x14e): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Updating to "igc-1.0.7862" (released yesterday) did not solve the link issue.
Please try add pthread to this function: https://github.com/intel/intel-graphics-compiler/blob/master/IGC/CMakeLists.txt#L1700
else()
target_link_libraries("${IGC_BUILD__PROJ${_libBuildSuffix}}" PRIVATE
pthread // here add
"${_targetLinkLineCommon}"
"${CMAKE_DL_LIBS}"
)
endif()
and let me know if this helps.
Yes, after that IGC does build successfully. Thanks!
This can be closed after that fix is in, and build doc has been updated in regards to IGC now needing lld-XX.
I can verify the fix when the next release is done.
Regarding this line in the doc update:
sudo apt-get install llvm-10 llvm-10-dev clang-10 liblld-10 liblld-10-dev
'-dev' packages pull in the non-dev version of the given package automatically, so specifying those is redundant. Or is the intent to set them as manually-installed, so that they do not automatically go away when corresponding -dev packages are removed (and user runs "apt autoremove")?
they do not automatically go away when corresponding -dev packages are removed (and user runs "apt autoremove")?
yes
On Ubuntu 20.04 with vc-intrinsics master version and rest of deps from Ubuntu (which has built earlier fine e.g. in May), latest release errors after configuring to:
Here's the whole output before that error: