diff mbox series

mesa: Update clang-17 patch to upstream v2

Message ID 20230922163721.477463-1-raj.khem@gmail.com
State Accepted, archived
Commit 1172774088a81dfa0447cf7d39caf115bd6c6a7c
Headers show
Series mesa: Update clang-17 patch to upstream v2 | expand

Commit Message

Khem Raj Sept. 22, 2023, 4:37 p.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../0001-gallium-Fix-build-with-llvm-17.patch | 27 ++++++++++++-------
 1 file changed, 18 insertions(+), 9 deletions(-)

Comments

Richard Purdie Sept. 28, 2023, 3:25 p.m. UTC | #1
On Fri, 2023-09-22 at 09:37 -0700, Khem Raj wrote:
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  .../0001-gallium-Fix-build-with-llvm-17.patch | 27 ++++++++++++-------
>  1 file changed, 18 insertions(+), 9 deletions(-)
> 
> diff --git a/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch b/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
> index 3631a918b0c..0ca7a22b45b 100644
> --- a/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
> +++ b/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
> @@ -1,4 +1,4 @@
> -From 865762e0a767a121206d818bdd58301afbf30104 Mon Sep 17 00:00:00 2001
> +From c8e9776abc3dfd3f2411797a90a03e7fa16263ef Mon Sep 17 00:00:00 2001
>  From: Khem Raj <raj.khem@gmail.com>
>  Date: Fri, 23 Jun 2023 01:20:38 -0700
>  Subject: [PATCH] gallium: Fix build with llvm 17
> @@ -10,14 +10,12 @@ so add conditions to exclude them for llvm >= 17
>  Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23827]
>  Signed-off-by: Khem Raj <raj.khem@gmail.com>
>  ---
> - src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 +++-
> - 1 file changed, 3 insertions(+), 1 deletion(-)
> + src/gallium/auxiliary/gallivm/lp_bld_init.c | 6 ++++--
> + 1 file changed, 4 insertions(+), 2 deletions(-)
>  
> -diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
> -index 24d0823..3d4573e 100644
>  --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
>  +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
> -@@ -42,8 +42,10 @@
> +@@ -42,19 +42,23 @@
>   
>   #include <llvm/Config/llvm-config.h>
>   #include <llvm-c/Analysis.h>
> @@ -29,6 +27,17 @@ index 24d0823..3d4573e 100644
>   #include <llvm-c/Transforms/Utils.h>
>   #endif
>   #include <llvm-c/BitWriter.h>
> --- 
> -2.41.0
> -
> + #if GALLIVM_USE_NEW_PASS == 1
> + #include <llvm-c/Transforms/PassBuilder.h>
> +-#elif GALLIVM_HAVE_CORO == 1
> ++#elif GALLIVM_HAVE_CORO == 1 && LLVM_VERSION_MAJOR < 17
> + #if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64)
> + #include <llvm-c/Transforms/IPO.h>
> + #endif
> ++#if LLVM_VERSION_MAJOR < 17
> + #include <llvm-c/Transforms/Coroutines.h>
> + #endif
> ++#endif
> + 
> + unsigned gallivm_perf = 0;
> + 

I think this patch may have broken against with the recent llvm point
release?

DEBUG: Executing shell function do_compile

[1/33] /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/bin/python3-native/python3 ../mesa-23.1.8/bin/git_sha1_gen.py --output src/git_sha1.h
[2/13] g++  -o src/gallium/targets/dri/libgallium_dri.so src/gallium/targets/dri/libgallium_dri.so.p/target.c.o -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libgallium_dri.so -Wl,--enable-new-dtags -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/srv/build/ttorling/workspace-upgrades/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 '-Wl,-rpath,$ORIGIN/../../../mapi/shared-glapi:/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib' -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/build/src/mapi/shared-glapi -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib src/gallium/frontends/dri/libdri.a src/util/libmesa_util.a src/util/format/libmesa_format.a src/util/libmesa_util_sse41.a src/c11/impl/libmesa_util_c11.a src/mesa/libmesa.a src/compiler/glsl/libglsl.a src/compiler/glsl/glcpp/libglcpp.a src/compiler/nir/libnir.a src/compiler/libcompiler.a src/mesa/libmesa_sse41.a src/gallium/auxiliary/libgalliumvl.a src/gallium/auxiliary/libgallium.a src/mapi/shared-glapi/libglapi.so.0.0.0 src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a src/loader/libloader.a src/util/libxmlconfig.a src/gallium/winsys/sw/null/libws_null.a src/gallium/winsys/sw/wrapper/libwsw.a src/gallium/winsys/sw/dri/libswdri.a src/gallium/winsys/sw/kms-dri/libswkmsdri.a src/gallium/drivers/llvmpipe/libllvmpipe.a src/gallium/drivers/softpipe/libsoftpipe.a src/gallium/drivers/r300/libr300.a src/gallium/winsys/radeon/drm/libradeonwinsys.a src/gallium/drivers/r600/libr600.a src/gallium/drivers/radeonsi/libradeonsi_gfx6.a src/gallium/drivers/radeonsi/libradeonsi_gfx7.a src/gallium/drivers/radeonsi/libradeonsi_gfx8.a src/gallium/drivers/radeonsi/libradeonsi_gfx9.a src/gallium/drivers/radeonsi/libradeonsi_gfx10.a src/gallium/drivers/radeonsi/libradeonsi_gfx103.a src/gallium/drivers/radeonsi/libradeonsi_gfx11.a src/gallium/drivers/radeonsi/libradeonsi.a src/gallium/winsys/amdgpu/drm/libamdgpuwinsys.a src/amd/addrlib/libaddrlib.a src/amd/common/libamd_common.a src/amd/llvm/libamd_common_llvm.a src/gallium/winsys/nouveau/drm/libnouveauwinsys.a src/nouveau/codegen/libnouveau_codegen.a src/gallium/drivers/nouveau/libnouveau.a src/gallium/drivers/i915/libi915.a src/gallium/winsys/i915/drm/libi915drm.a src/intel/common/libintel_common.a src/intel/isl/libisl.a src/intel/isl/libisl_per_hw_ver40.a src/intel/dev/libintel_dev.a src/intel/isl/libisl_per_hw_ver50.a src/intel/isl/libisl_per_hw_ver60.a src/intel/isl/libisl_per_hw_ver70.a src/intel/isl/libisl_per_hw_ver75.a src/intel/isl/libisl_per_hw_ver80.a src/intel/isl/libisl_per_hw_ver90.a src/intel/isl/libisl_per_hw_ver110.a src/intel/isl/libisl_per_hw_ver120.a src/intel/isl/libisl_per_hw_ver125.a src/intel/isl/libisl_tiled_memcpy.a src/intel/isl/libisl_tiled_memcpy_sse41.a src/gallium/drivers/svga/libsvga.a src/gallium/winsys/svga/drm/libsvgadrm.a src/gallium/drivers/virgl/libvirgl.a src/gallium/winsys/virgl/drm/libvirgldrm.a src/gallium/winsys/virgl/common/libvirglcommon.a src/gallium/winsys/virgl/vtest/libvirglvtest.a src/gallium/drivers/iris/libiris.a src/gallium/drivers/iris/libiris_per_hw_ver80.a src/gallium/drivers/iris/libiris_per_hw_ver90.a src/gallium/drivers/iris/libiris_per_hw_ver110.a src/gallium/drivers/iris/libiris_per_hw_ver120.a src/gallium/drivers/iris/libiris_per_hw_ver125.a src/intel/compiler/libintel_compiler.a src/intel/blorp/libblorp.a src/intel/perf/libintel_perf.a src/intel/ds/libintel-driver-ds.a src/gallium/winsys/iris/drm/libiriswinsys.a src/gallium/drivers/crocus/libcrocus.a src/gallium/drivers/crocus/libcrocus_per_hw_ver40.a src/gallium/drivers/crocus/libcrocus_per_hw_ver45.a src/gallium/drivers/crocus/libcrocus_per_hw_ver50.a src/gallium/drivers/crocus/libcrocus_per_hw_ver60.a src/gallium/drivers/crocus/libcrocus_per_hw_ver70.a src/gallium/drivers/crocus/libcrocus_per_hw_ver75.a src/gallium/drivers/crocus/libcrocus_per_hw_ver80.a src/gallium/winsys/crocus/drm/libcrocuswinsys.a -Wl,--build-id=sha1 -Wl,--gc-sections -Wl,--version-script /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/dri.sym -Wl,--dynamic-list /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/../dri-vdpau.dyn /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm.so /usr/lib/llvm-14/lib/libLLVM-14.so.1 -pthread /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libexpat.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libz.so -lm /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libzstd.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libxcb-randr.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_radeon.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libelf.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_amdgpu.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_nouveau.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_intel.so -Wl,--end-group
FAILED: src/gallium/targets/dri/libgallium_dri.so 
g++  -o src/gallium/targets/dri/libgallium_dri.so src/gallium/targets/dri/libgallium_dri.so.p/target.c.o -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libgallium_dri.so -Wl,--enable-new-dtags -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/srv/build/ttorling/workspace-upgrades/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 '-Wl,-rpath,$ORIGIN/../../../mapi/shared-glapi:/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib' -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/build/src/mapi/shared-glapi -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib src/gallium/frontends/dri/libdri.a src/util/libmesa_util.a src/util/format/libmesa_format.a src/util/libmesa_util_sse41.a src/c11/impl/libmesa_util_c11.a src/mesa/libmesa.a src/compiler/glsl/libglsl.a src/compiler/glsl/glcpp/libglcpp.a src/compiler/nir/libnir.a src/compiler/libcompiler.a src/mesa/libmesa_sse41.a src/gallium/auxiliary/libgalliumvl.a src/gallium/auxiliary/libgallium.a src/mapi/shared-glapi/libglapi.so.0.0.0 src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a src/loader/libloader.a src/util/libxmlconfig.a src/gallium/winsys/sw/null/libws_null.a src/gallium/winsys/sw/wrapper/libwsw.a src/gallium/winsys/sw/dri/libswdri.a src/gallium/winsys/sw/kms-dri/libswkmsdri.a src/gallium/drivers/llvmpipe/libllvmpipe.a src/gallium/drivers/softpipe/libsoftpipe.a src/gallium/drivers/r300/libr300.a src/gallium/winsys/radeon/drm/libradeonwinsys.a src/gallium/drivers/r600/libr600.a src/gallium/drivers/radeonsi/libradeonsi_gfx6.a src/gallium/drivers/radeonsi/libradeonsi_gfx7.a src/gallium/drivers/radeonsi/libradeonsi_gfx8.a src/gallium/drivers/radeonsi/libradeonsi_gfx9.a src/gallium/drivers/radeonsi/libradeonsi_gfx10.a src/gallium/drivers/radeonsi/libradeonsi_gfx103.a src/gallium/drivers/radeonsi/libradeonsi_gfx11.a src/gallium/drivers/radeonsi/libradeonsi.a src/gallium/winsys/amdgpu/drm/libamdgpuwinsys.a src/amd/addrlib/libaddrlib.a src/amd/common/libamd_common.a src/amd/llvm/libamd_common_llvm.a src/gallium/winsys/nouveau/drm/libnouveauwinsys.a src/nouveau/codegen/libnouveau_codegen.a src/gallium/drivers/nouveau/libnouveau.a src/gallium/drivers/i915/libi915.a src/gallium/winsys/i915/drm/libi915drm.a src/intel/common/libintel_common.a src/intel/isl/libisl.a src/intel/isl/libisl_per_hw_ver40.a src/intel/dev/libintel_dev.a src/intel/isl/libisl_per_hw_ver50.a src/intel/isl/libisl_per_hw_ver60.a src/intel/isl/libisl_per_hw_ver70.a src/intel/isl/libisl_per_hw_ver75.a src/intel/isl/libisl_per_hw_ver80.a src/intel/isl/libisl_per_hw_ver90.a src/intel/isl/libisl_per_hw_ver110.a src/intel/isl/libisl_per_hw_ver120.a src/intel/isl/libisl_per_hw_ver125.a src/intel/isl/libisl_tiled_memcpy.a src/intel/isl/libisl_tiled_memcpy_sse41.a src/gallium/drivers/svga/libsvga.a src/gallium/winsys/svga/drm/libsvgadrm.a src/gallium/drivers/virgl/libvirgl.a src/gallium/winsys/virgl/drm/libvirgldrm.a src/gallium/winsys/virgl/common/libvirglcommon.a src/gallium/winsys/virgl/vtest/libvirglvtest.a src/gallium/drivers/iris/libiris.a src/gallium/drivers/iris/libiris_per_hw_ver80.a src/gallium/drivers/iris/libiris_per_hw_ver90.a src/gallium/drivers/iris/libiris_per_hw_ver110.a src/gallium/drivers/iris/libiris_per_hw_ver120.a src/gallium/drivers/iris/libiris_per_hw_ver125.a src/intel/compiler/libintel_compiler.a src/intel/blorp/libblorp.a src/intel/perf/libintel_perf.a src/intel/ds/libintel-driver-ds.a src/gallium/winsys/iris/drm/libiriswinsys.a src/gallium/drivers/crocus/libcrocus.a src/gallium/drivers/crocus/libcrocus_per_hw_ver40.a src/gallium/drivers/crocus/libcrocus_per_hw_ver45.a src/gallium/drivers/crocus/libcrocus_per_hw_ver50.a src/gallium/drivers/crocus/libcrocus_per_hw_ver60.a src/gallium/drivers/crocus/libcrocus_per_hw_ver70.a src/gallium/drivers/crocus/libcrocus_per_hw_ver75.a src/gallium/drivers/crocus/libcrocus_per_hw_ver80.a src/gallium/winsys/crocus/drm/libcrocuswinsys.a -Wl,--build-id=sha1 -Wl,--gc-sections -Wl,--version-script /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/dri.sym -Wl,--dynamic-list /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/../dri-vdpau.dyn /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm.so /usr/lib/llvm-14/lib/libLLVM-14.so.1 -pthread /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libexpat.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libz.so -lm /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libzstd.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libxcb-randr.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_radeon.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libelf.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_amdgpu.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_nouveau.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_intel.so -Wl,--end-group
/srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld: src/gallium/auxiliary/libgallium.a.p/gallivm_lp_bld_misc.cpp.o: in function `llvm::SmallVectorTemplateBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false>::grow(unsigned long)':
lp_bld_misc.cpp:(.text._ZN4llvm23SmallVectorTemplateBaseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0EE4growEm[_ZN4llvm23SmallVectorTemplateBaseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0EE4growEm]+0x36): undefined reference to `llvm::SmallVectorBase<unsigned int>::mallocForGrow(void*, unsigned long, unsigned long, unsigned long&)'
/srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld: src/amd/llvm/libamd_common_llvm.a.p/ac_llvm_helper.cpp.o: in function `llvm::DataLayout::getTypeSizeInBits(llvm::Type*) const':
ac_llvm_helper.cpp:(.text._ZNK4llvm10DataLayout17getTypeSizeInBitsEPNS_4TypeE[_ZNK4llvm10DataLayout17getTypeSizeInBitsEPNS_4TypeE]+0xa4): undefined reference to `llvm::TargetExtType::getLayoutType() const'
/srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld: src/amd/llvm/libamd_common_llvm.a.p/ac_llvm_helper.cpp.o: in function `ac_create_passmgr':
ac_llvm_helper.cpp:(.text.ac_create_passmgr+0x8c): undefined reference to `llvm::createPromoteMemoryToRegisterPass(bool)'
/srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld: ac_llvm_helper.cpp:(.text.ac_create_passmgr+0xa6): undefined reference to `llvm::createSROAPass(bool)'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/bin/ninja -j 24 -v
WARNING: /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760:155 exit 1 from 'meson compile -v -j 24'
WARNING: Backtrace (BB generated script): 
	#1: meson_do_compile, /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760, line 155
	#2: do_compile, /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760, line 150
	#3: main, /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760, line 159

(log borrowed from Tim but I'm seeing a similar issue)

Cheers,

Richard
Khem Raj Sept. 28, 2023, 4:55 p.m. UTC | #2
its linking with  /usr/lib/llvm-14/lib/libLLVM-14.so.1 which is not
correct. Somehow its finding llvm library on your build host.

On Thu, Sep 28, 2023 at 8:25 AM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Fri, 2023-09-22 at 09:37 -0700, Khem Raj wrote:
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> >  .../0001-gallium-Fix-build-with-llvm-17.patch | 27 ++++++++++++-------
> >  1 file changed, 18 insertions(+), 9 deletions(-)
> >
> > diff --git a/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch b/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
> > index 3631a918b0c..0ca7a22b45b 100644
> > --- a/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
> > +++ b/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
> > @@ -1,4 +1,4 @@
> > -From 865762e0a767a121206d818bdd58301afbf30104 Mon Sep 17 00:00:00 2001
> > +From c8e9776abc3dfd3f2411797a90a03e7fa16263ef Mon Sep 17 00:00:00 2001
> >  From: Khem Raj <raj.khem@gmail.com>
> >  Date: Fri, 23 Jun 2023 01:20:38 -0700
> >  Subject: [PATCH] gallium: Fix build with llvm 17
> > @@ -10,14 +10,12 @@ so add conditions to exclude them for llvm >= 17
> >  Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23827]
> >  Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >  ---
> > - src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 +++-
> > - 1 file changed, 3 insertions(+), 1 deletion(-)
> > + src/gallium/auxiliary/gallivm/lp_bld_init.c | 6 ++++--
> > + 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > -diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
> > -index 24d0823..3d4573e 100644
> >  --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
> >  +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
> > -@@ -42,8 +42,10 @@
> > +@@ -42,19 +42,23 @@
> >
> >   #include <llvm/Config/llvm-config.h>
> >   #include <llvm-c/Analysis.h>
> > @@ -29,6 +27,17 @@ index 24d0823..3d4573e 100644
> >   #include <llvm-c/Transforms/Utils.h>
> >   #endif
> >   #include <llvm-c/BitWriter.h>
> > ---
> > -2.41.0
> > -
> > + #if GALLIVM_USE_NEW_PASS == 1
> > + #include <llvm-c/Transforms/PassBuilder.h>
> > +-#elif GALLIVM_HAVE_CORO == 1
> > ++#elif GALLIVM_HAVE_CORO == 1 && LLVM_VERSION_MAJOR < 17
> > + #if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64)
> > + #include <llvm-c/Transforms/IPO.h>
> > + #endif
> > ++#if LLVM_VERSION_MAJOR < 17
> > + #include <llvm-c/Transforms/Coroutines.h>
> > + #endif
> > ++#endif
> > +
> > + unsigned gallivm_perf = 0;
> > +
>
> I think this patch may have broken against with the recent llvm point
> release?
>
> DEBUG: Executing shell function do_compile
>
> [1/33] /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/bin/python3-native/python3 ../mesa-23.1.8/bin/git_sha1_gen.py --output src/git_sha1.h
> [2/13] g++  -o src/gallium/targets/dri/libgallium_dri.so src/gallium/targets/dri/libgallium_dri.so.p/target.c.o -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libgallium_dri.so -Wl,--enable-new-dtags -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/srv/build/ttorling/workspace-upgrades/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 '-Wl,-rpath,$ORIGIN/../../../mapi/shared-glapi:/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib' -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/build/src/mapi/shared-glapi -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib src/gallium/frontends/dri/libdri.a src/util/libmesa_util.a src/util/format/libmesa_format.a src/util/libmesa_util_sse41.a src/c11/impl/libmesa_util_c11.a src/mesa/libmesa.a src/compiler/glsl/libglsl.a src/compiler/glsl/glcpp/libglcpp.a src/compiler/nir/libnir.a src/compiler/libcompiler.a src/mesa/libmesa_sse41.a src/gallium/auxiliary/libgalliumvl.a src/gallium/auxiliary/libgallium.a src/mapi/shared-glapi/libglapi.so.0.0.0 src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a src/loader/libloader.a src/util/libxmlconfig.a src/gallium/winsys/sw/null/libws_null.a src/gallium/winsys/sw/wrapper/libwsw.a src/gallium/winsys/sw/dri/libswdri.a src/gallium/winsys/sw/kms-dri/libswkmsdri.a src/gallium/drivers/llvmpipe/libllvmpipe.a src/gallium/drivers/softpipe/libsoftpipe.a src/gallium/drivers/r300/libr300.a src/gallium/winsys/radeon/drm/libradeonwinsys.a src/gallium/drivers/r600/libr600.a src/gallium/drivers/radeonsi/libradeonsi_gfx6.a src/gallium/drivers/radeonsi/libradeonsi_gfx7.a src/gallium/drivers/radeonsi/libradeonsi_gfx8.a src/gallium/drivers/radeonsi/libradeonsi_gfx9.a src/gallium/drivers/radeonsi/libradeonsi_gfx10.a src/gallium/drivers/radeonsi/libradeonsi_gfx103.a src/gallium/drivers/radeonsi/libradeonsi_gfx11.a src/gallium/drivers/radeonsi/libradeonsi.a src/gallium/winsys/amdgpu/drm/libamdgpuwinsys.a src/amd/addrlib/libaddrlib.a src/amd/common/libamd_common.a src/amd/llvm/libamd_common_llvm.a src/gallium/winsys/nouveau/drm/libnouveauwinsys.a src/nouveau/codegen/libnouveau_codegen.a src/gallium/drivers/nouveau/libnouveau.a src/gallium/drivers/i915/libi915.a src/gallium/winsys/i915/drm/libi915drm.a src/intel/common/libintel_common.a src/intel/isl/libisl.a src/intel/isl/libisl_per_hw_ver40.a src/intel/dev/libintel_dev.a src/intel/isl/libisl_per_hw_ver50.a src/intel/isl/libisl_per_hw_ver60.a src/intel/isl/libisl_per_hw_ver70.a src/intel/isl/libisl_per_hw_ver75.a src/intel/isl/libisl_per_hw_ver80.a src/intel/isl/libisl_per_hw_ver90.a src/intel/isl/libisl_per_hw_ver110.a src/intel/isl/libisl_per_hw_ver120.a src/intel/isl/libisl_per_hw_ver125.a src/intel/isl/libisl_tiled_memcpy.a src/intel/isl/libisl_tiled_memcpy_sse41.a src/gallium/drivers/svga/libsvga.a src/gallium/winsys/svga/drm/libsvgadrm.a src/gallium/drivers/virgl/libvirgl.a src/gallium/winsys/virgl/drm/libvirgldrm.a src/gallium/winsys/virgl/common/libvirglcommon.a src/gallium/winsys/virgl/vtest/libvirglvtest.a src/gallium/drivers/iris/libiris.a src/gallium/drivers/iris/libiris_per_hw_ver80.a src/gallium/drivers/iris/libiris_per_hw_ver90.a src/gallium/drivers/iris/libiris_per_hw_ver110.a src/gallium/drivers/iris/libiris_per_hw_ver120.a src/gallium/drivers/iris/libiris_per_hw_ver125.a src/intel/compiler/libintel_compiler.a src/intel/blorp/libblorp.a src/intel/perf/libintel_perf.a src/intel/ds/libintel-driver-ds.a src/gallium/winsys/iris/drm/libiriswinsys.a src/gallium/drivers/crocus/libcrocus.a src/gallium/drivers/crocus/libcrocus_per_hw_ver40.a src/gallium/drivers/crocus/libcrocus_per_hw_ver45.a src/gallium/drivers/crocus/libcrocus_per_hw_ver50.a src/gallium/drivers/crocus/libcrocus_per_hw_ver60.a src/gallium/drivers/crocus/libcrocus_per_hw_ver70.a src/gallium/drivers/crocus/libcrocus_per_hw_ver75.a src/gallium/drivers/crocus/libcrocus_per_hw_ver80.a src/gallium/winsys/crocus/drm/libcrocuswinsys.a -Wl,--build-id=sha1 -Wl,--gc-sections -Wl,--version-script /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/dri.sym -Wl,--dynamic-list /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/../dri-vdpau.dyn /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm.so /usr/lib/llvm-14/lib/libLLVM-14.so.1 -pthread /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libexpat.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libz.so -lm /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libzstd.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libxcb-randr.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_radeon.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libelf.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_amdgpu.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_nouveau.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_intel.so -Wl,--end-group
> FAILED: src/gallium/targets/dri/libgallium_dri.so
> g++  -o src/gallium/targets/dri/libgallium_dri.so src/gallium/targets/dri/libgallium_dri.so.p/target.c.o -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libgallium_dri.so -Wl,--enable-new-dtags -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/srv/build/ttorling/workspace-upgrades/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 '-Wl,-rpath,$ORIGIN/../../../mapi/shared-glapi:/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib' -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/build/src/mapi/shared-glapi -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib src/gallium/frontends/dri/libdri.a src/util/libmesa_util.a src/util/format/libmesa_format.a src/util/libmesa_util_sse41.a src/c11/impl/libmesa_util_c11.a src/mesa/libmesa.a src/compiler/glsl/libglsl.a src/compiler/glsl/glcpp/libglcpp.a src/compiler/nir/libnir.a src/compiler/libcompiler.a src/mesa/libmesa_sse41.a src/gallium/auxiliary/libgalliumvl.a src/gallium/auxiliary/libgallium.a src/mapi/shared-glapi/libglapi.so.0.0.0 src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a src/loader/libloader.a src/util/libxmlconfig.a src/gallium/winsys/sw/null/libws_null.a src/gallium/winsys/sw/wrapper/libwsw.a src/gallium/winsys/sw/dri/libswdri.a src/gallium/winsys/sw/kms-dri/libswkmsdri.a src/gallium/drivers/llvmpipe/libllvmpipe.a src/gallium/drivers/softpipe/libsoftpipe.a src/gallium/drivers/r300/libr300.a src/gallium/winsys/radeon/drm/libradeonwinsys.a src/gallium/drivers/r600/libr600.a src/gallium/drivers/radeonsi/libradeonsi_gfx6.a src/gallium/drivers/radeonsi/libradeonsi_gfx7.a src/gallium/drivers/radeonsi/libradeonsi_gfx8.a src/gallium/drivers/radeonsi/libradeonsi_gfx9.a src/gallium/drivers/radeonsi/libradeonsi_gfx10.a src/gallium/drivers/radeonsi/libradeonsi_gfx103.a src/gallium/drivers/radeonsi/libradeonsi_gfx11.a src/gallium/drivers/radeonsi/libradeonsi.a src/gallium/winsys/amdgpu/drm/libamdgpuwinsys.a src/amd/addrlib/libaddrlib.a src/amd/common/libamd_common.a src/amd/llvm/libamd_common_llvm.a src/gallium/winsys/nouveau/drm/libnouveauwinsys.a src/nouveau/codegen/libnouveau_codegen.a src/gallium/drivers/nouveau/libnouveau.a src/gallium/drivers/i915/libi915.a src/gallium/winsys/i915/drm/libi915drm.a src/intel/common/libintel_common.a src/intel/isl/libisl.a src/intel/isl/libisl_per_hw_ver40.a src/intel/dev/libintel_dev.a src/intel/isl/libisl_per_hw_ver50.a src/intel/isl/libisl_per_hw_ver60.a src/intel/isl/libisl_per_hw_ver70.a src/intel/isl/libisl_per_hw_ver75.a src/intel/isl/libisl_per_hw_ver80.a src/intel/isl/libisl_per_hw_ver90.a src/intel/isl/libisl_per_hw_ver110.a src/intel/isl/libisl_per_hw_ver120.a src/intel/isl/libisl_per_hw_ver125.a src/intel/isl/libisl_tiled_memcpy.a src/intel/isl/libisl_tiled_memcpy_sse41.a src/gallium/drivers/svga/libsvga.a src/gallium/winsys/svga/drm/libsvgadrm.a src/gallium/drivers/virgl/libvirgl.a src/gallium/winsys/virgl/drm/libvirgldrm.a src/gallium/winsys/virgl/common/libvirglcommon.a src/gallium/winsys/virgl/vtest/libvirglvtest.a src/gallium/drivers/iris/libiris.a src/gallium/drivers/iris/libiris_per_hw_ver80.a src/gallium/drivers/iris/libiris_per_hw_ver90.a src/gallium/drivers/iris/libiris_per_hw_ver110.a src/gallium/drivers/iris/libiris_per_hw_ver120.a src/gallium/drivers/iris/libiris_per_hw_ver125.a src/intel/compiler/libintel_compiler.a src/intel/blorp/libblorp.a src/intel/perf/libintel_perf.a src/intel/ds/libintel-driver-ds.a src/gallium/winsys/iris/drm/libiriswinsys.a src/gallium/drivers/crocus/libcrocus.a src/gallium/drivers/crocus/libcrocus_per_hw_ver40.a src/gallium/drivers/crocus/libcrocus_per_hw_ver45.a src/gallium/drivers/crocus/libcrocus_per_hw_ver50.a src/gallium/drivers/crocus/libcrocus_per_hw_ver60.a src/gallium/drivers/crocus/libcrocus_per_hw_ver70.a src/gallium/drivers/crocus/libcrocus_per_hw_ver75.a src/gallium/drivers/crocus/libcrocus_per_hw_ver80.a src/gallium/winsys/crocus/drm/libcrocuswinsys.a -Wl,--build-id=sha1 -Wl,--gc-sections -Wl,--version-script /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/dri.sym -Wl,--dynamic-list /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/../dri-vdpau.dyn /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm.so /usr/lib/llvm-14/lib/libLLVM-14.so.1 -pthread /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libexpat.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libz.so -lm /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libzstd.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libxcb-randr.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_radeon.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libelf.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_amdgpu.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_nouveau.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_intel.so -Wl,--end-group
> /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld: src/gallium/auxiliary/libgallium.a.p/gallivm_lp_bld_misc.cpp.o: in function `llvm::SmallVectorTemplateBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false>::grow(unsigned long)':
> lp_bld_misc.cpp:(.text._ZN4llvm23SmallVectorTemplateBaseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0EE4growEm[_ZN4llvm23SmallVectorTemplateBaseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0EE4growEm]+0x36): undefined reference to `llvm::SmallVectorBase<unsigned int>::mallocForGrow(void*, unsigned long, unsigned long, unsigned long&)'
> /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld: src/amd/llvm/libamd_common_llvm.a.p/ac_llvm_helper.cpp.o: in function `llvm::DataLayout::getTypeSizeInBits(llvm::Type*) const':
> ac_llvm_helper.cpp:(.text._ZNK4llvm10DataLayout17getTypeSizeInBitsEPNS_4TypeE[_ZNK4llvm10DataLayout17getTypeSizeInBitsEPNS_4TypeE]+0xa4): undefined reference to `llvm::TargetExtType::getLayoutType() const'
> /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld: src/amd/llvm/libamd_common_llvm.a.p/ac_llvm_helper.cpp.o: in function `ac_create_passmgr':
> ac_llvm_helper.cpp:(.text.ac_create_passmgr+0x8c): undefined reference to `llvm::createPromoteMemoryToRegisterPass(bool)'
> /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld: ac_llvm_helper.cpp:(.text.ac_create_passmgr+0xa6): undefined reference to `llvm::createSROAPass(bool)'
> collect2: error: ld returned 1 exit status
> ninja: build stopped: subcommand failed.
> INFO: autodetecting backend as ninja
> INFO: calculating backend command to run: /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/bin/ninja -j 24 -v
> WARNING: /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760:155 exit 1 from 'meson compile -v -j 24'
> WARNING: Backtrace (BB generated script):
>         #1: meson_do_compile, /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760, line 155
>         #2: do_compile, /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760, line 150
>         #3: main, /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760, line 159
>
> (log borrowed from Tim but I'm seeing a similar issue)
>
> Cheers,
>
> Richard
Khem Raj Sept. 28, 2023, 8:34 p.m. UTC | #3
Can you check if the machines where it fails has llvm-14-dev package
installed on host ?

On Thu, Sep 28, 2023 at 9:55 AM Khem Raj <raj.khem@gmail.com> wrote:
>
> its linking with  /usr/lib/llvm-14/lib/libLLVM-14.so.1 which is not
> correct. Somehow its finding llvm library on your build host.
>
> On Thu, Sep 28, 2023 at 8:25 AM Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> >
> > On Fri, 2023-09-22 at 09:37 -0700, Khem Raj wrote:
> > > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > > ---
> > >  .../0001-gallium-Fix-build-with-llvm-17.patch | 27 ++++++++++++-------
> > >  1 file changed, 18 insertions(+), 9 deletions(-)
> > >
> > > diff --git a/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch b/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
> > > index 3631a918b0c..0ca7a22b45b 100644
> > > --- a/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
> > > +++ b/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
> > > @@ -1,4 +1,4 @@
> > > -From 865762e0a767a121206d818bdd58301afbf30104 Mon Sep 17 00:00:00 2001
> > > +From c8e9776abc3dfd3f2411797a90a03e7fa16263ef Mon Sep 17 00:00:00 2001
> > >  From: Khem Raj <raj.khem@gmail.com>
> > >  Date: Fri, 23 Jun 2023 01:20:38 -0700
> > >  Subject: [PATCH] gallium: Fix build with llvm 17
> > > @@ -10,14 +10,12 @@ so add conditions to exclude them for llvm >= 17
> > >  Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23827]
> > >  Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > >  ---
> > > - src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 +++-
> > > - 1 file changed, 3 insertions(+), 1 deletion(-)
> > > + src/gallium/auxiliary/gallivm/lp_bld_init.c | 6 ++++--
> > > + 1 file changed, 4 insertions(+), 2 deletions(-)
> > >
> > > -diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
> > > -index 24d0823..3d4573e 100644
> > >  --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
> > >  +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
> > > -@@ -42,8 +42,10 @@
> > > +@@ -42,19 +42,23 @@
> > >
> > >   #include <llvm/Config/llvm-config.h>
> > >   #include <llvm-c/Analysis.h>
> > > @@ -29,6 +27,17 @@ index 24d0823..3d4573e 100644
> > >   #include <llvm-c/Transforms/Utils.h>
> > >   #endif
> > >   #include <llvm-c/BitWriter.h>
> > > ---
> > > -2.41.0
> > > -
> > > + #if GALLIVM_USE_NEW_PASS == 1
> > > + #include <llvm-c/Transforms/PassBuilder.h>
> > > +-#elif GALLIVM_HAVE_CORO == 1
> > > ++#elif GALLIVM_HAVE_CORO == 1 && LLVM_VERSION_MAJOR < 17
> > > + #if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64)
> > > + #include <llvm-c/Transforms/IPO.h>
> > > + #endif
> > > ++#if LLVM_VERSION_MAJOR < 17
> > > + #include <llvm-c/Transforms/Coroutines.h>
> > > + #endif
> > > ++#endif
> > > +
> > > + unsigned gallivm_perf = 0;
> > > +
> >
> > I think this patch may have broken against with the recent llvm point
> > release?
> >
> > DEBUG: Executing shell function do_compile
> >
> > [1/33] /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/bin/python3-native/python3 ../mesa-23.1.8/bin/git_sha1_gen.py --output src/git_sha1.h
> > [2/13] g++  -o src/gallium/targets/dri/libgallium_dri.so src/gallium/targets/dri/libgallium_dri.so.p/target.c.o -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libgallium_dri.so -Wl,--enable-new-dtags -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/srv/build/ttorling/workspace-upgrades/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 '-Wl,-rpath,$ORIGIN/../../../mapi/shared-glapi:/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib' -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/build/src/mapi/shared-glapi -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib src/gallium/frontends/dri/libdri.a src/util/libmesa_util.a src/util/format/libmesa_format.a src/util/libmesa_util_sse41.a src/c11/impl/libmesa_util_c11.a src/mesa/libmesa.a src/compiler/glsl/libglsl.a src/compiler/glsl/glcpp/libglcpp.a src/compiler/nir/libnir.a src/compiler/libcompiler.a src/mesa/libmesa_sse41.a src/gallium/auxiliary/libgalliumvl.a src/gallium/auxiliary/libgallium.a src/mapi/shared-glapi/libglapi.so.0.0.0 src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a src/loader/libloader.a src/util/libxmlconfig.a src/gallium/winsys/sw/null/libws_null.a src/gallium/winsys/sw/wrapper/libwsw.a src/gallium/winsys/sw/dri/libswdri.a src/gallium/winsys/sw/kms-dri/libswkmsdri.a src/gallium/drivers/llvmpipe/libllvmpipe.a src/gallium/drivers/softpipe/libsoftpipe.a src/gallium/drivers/r300/libr300.a src/gallium/winsys/radeon/drm/libradeonwinsys.a src/gallium/drivers/r600/libr600.a src/gallium/drivers/radeonsi/libradeonsi_gfx6.a src/gallium/drivers/radeonsi/libradeonsi_gfx7.a src/gallium/drivers/radeonsi/libradeonsi_gfx8.a src/gallium/drivers/radeonsi/libradeonsi_gfx9.a src/gallium/drivers/radeonsi/libradeonsi_gfx10.a src/gallium/drivers/radeonsi/libradeonsi_gfx103.a src/gallium/drivers/radeonsi/libradeonsi_gfx11.a src/gallium/drivers/radeonsi/libradeonsi.a src/gallium/winsys/amdgpu/drm/libamdgpuwinsys.a src/amd/addrlib/libaddrlib.a src/amd/common/libamd_common.a src/amd/llvm/libamd_common_llvm.a src/gallium/winsys/nouveau/drm/libnouveauwinsys.a src/nouveau/codegen/libnouveau_codegen.a src/gallium/drivers/nouveau/libnouveau.a src/gallium/drivers/i915/libi915.a src/gallium/winsys/i915/drm/libi915drm.a src/intel/common/libintel_common.a src/intel/isl/libisl.a src/intel/isl/libisl_per_hw_ver40.a src/intel/dev/libintel_dev.a src/intel/isl/libisl_per_hw_ver50.a src/intel/isl/libisl_per_hw_ver60.a src/intel/isl/libisl_per_hw_ver70.a src/intel/isl/libisl_per_hw_ver75.a src/intel/isl/libisl_per_hw_ver80.a src/intel/isl/libisl_per_hw_ver90.a src/intel/isl/libisl_per_hw_ver110.a src/intel/isl/libisl_per_hw_ver120.a src/intel/isl/libisl_per_hw_ver125.a src/intel/isl/libisl_tiled_memcpy.a src/intel/isl/libisl_tiled_memcpy_sse41.a src/gallium/drivers/svga/libsvga.a src/gallium/winsys/svga/drm/libsvgadrm.a src/gallium/drivers/virgl/libvirgl.a src/gallium/winsys/virgl/drm/libvirgldrm.a src/gallium/winsys/virgl/common/libvirglcommon.a src/gallium/winsys/virgl/vtest/libvirglvtest.a src/gallium/drivers/iris/libiris.a src/gallium/drivers/iris/libiris_per_hw_ver80.a src/gallium/drivers/iris/libiris_per_hw_ver90.a src/gallium/drivers/iris/libiris_per_hw_ver110.a src/gallium/drivers/iris/libiris_per_hw_ver120.a src/gallium/drivers/iris/libiris_per_hw_ver125.a src/intel/compiler/libintel_compiler.a src/intel/blorp/libblorp.a src/intel/perf/libintel_perf.a src/intel/ds/libintel-driver-ds.a src/gallium/winsys/iris/drm/libiriswinsys.a src/gallium/drivers/crocus/libcrocus.a src/gallium/drivers/crocus/libcrocus_per_hw_ver40.a src/gallium/drivers/crocus/libcrocus_per_hw_ver45.a src/gallium/drivers/crocus/libcrocus_per_hw_ver50.a src/gallium/drivers/crocus/libcrocus_per_hw_ver60.a src/gallium/drivers/crocus/libcrocus_per_hw_ver70.a src/gallium/drivers/crocus/libcrocus_per_hw_ver75.a src/gallium/drivers/crocus/libcrocus_per_hw_ver80.a src/gallium/winsys/crocus/drm/libcrocuswinsys.a -Wl,--build-id=sha1 -Wl,--gc-sections -Wl,--version-script /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/dri.sym -Wl,--dynamic-list /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/../dri-vdpau.dyn /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm.so /usr/lib/llvm-14/lib/libLLVM-14.so.1 -pthread /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libexpat.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libz.so -lm /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libzstd.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libxcb-randr.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_radeon.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libelf.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_amdgpu.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_nouveau.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_intel.so -Wl,--end-group
> > FAILED: src/gallium/targets/dri/libgallium_dri.so
> > g++  -o src/gallium/targets/dri/libgallium_dri.so src/gallium/targets/dri/libgallium_dri.so.p/target.c.o -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libgallium_dri.so -Wl,--enable-new-dtags -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/srv/build/ttorling/workspace-upgrades/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 '-Wl,-rpath,$ORIGIN/../../../mapi/shared-glapi:/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib' -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/build/src/mapi/shared-glapi -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib src/gallium/frontends/dri/libdri.a src/util/libmesa_util.a src/util/format/libmesa_format.a src/util/libmesa_util_sse41.a src/c11/impl/libmesa_util_c11.a src/mesa/libmesa.a src/compiler/glsl/libglsl.a src/compiler/glsl/glcpp/libglcpp.a src/compiler/nir/libnir.a src/compiler/libcompiler.a src/mesa/libmesa_sse41.a src/gallium/auxiliary/libgalliumvl.a src/gallium/auxiliary/libgallium.a src/mapi/shared-glapi/libglapi.so.0.0.0 src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a src/loader/libloader.a src/util/libxmlconfig.a src/gallium/winsys/sw/null/libws_null.a src/gallium/winsys/sw/wrapper/libwsw.a src/gallium/winsys/sw/dri/libswdri.a src/gallium/winsys/sw/kms-dri/libswkmsdri.a src/gallium/drivers/llvmpipe/libllvmpipe.a src/gallium/drivers/softpipe/libsoftpipe.a src/gallium/drivers/r300/libr300.a src/gallium/winsys/radeon/drm/libradeonwinsys.a src/gallium/drivers/r600/libr600.a src/gallium/drivers/radeonsi/libradeonsi_gfx6.a src/gallium/drivers/radeonsi/libradeonsi_gfx7.a src/gallium/drivers/radeonsi/libradeonsi_gfx8.a src/gallium/drivers/radeonsi/libradeonsi_gfx9.a src/gallium/drivers/radeonsi/libradeonsi_gfx10.a src/gallium/drivers/radeonsi/libradeonsi_gfx103.a src/gallium/drivers/radeonsi/libradeonsi_gfx11.a src/gallium/drivers/radeonsi/libradeonsi.a src/gallium/winsys/amdgpu/drm/libamdgpuwinsys.a src/amd/addrlib/libaddrlib.a src/amd/common/libamd_common.a src/amd/llvm/libamd_common_llvm.a src/gallium/winsys/nouveau/drm/libnouveauwinsys.a src/nouveau/codegen/libnouveau_codegen.a src/gallium/drivers/nouveau/libnouveau.a src/gallium/drivers/i915/libi915.a src/gallium/winsys/i915/drm/libi915drm.a src/intel/common/libintel_common.a src/intel/isl/libisl.a src/intel/isl/libisl_per_hw_ver40.a src/intel/dev/libintel_dev.a src/intel/isl/libisl_per_hw_ver50.a src/intel/isl/libisl_per_hw_ver60.a src/intel/isl/libisl_per_hw_ver70.a src/intel/isl/libisl_per_hw_ver75.a src/intel/isl/libisl_per_hw_ver80.a src/intel/isl/libisl_per_hw_ver90.a src/intel/isl/libisl_per_hw_ver110.a src/intel/isl/libisl_per_hw_ver120.a src/intel/isl/libisl_per_hw_ver125.a src/intel/isl/libisl_tiled_memcpy.a src/intel/isl/libisl_tiled_memcpy_sse41.a src/gallium/drivers/svga/libsvga.a src/gallium/winsys/svga/drm/libsvgadrm.a src/gallium/drivers/virgl/libvirgl.a src/gallium/winsys/virgl/drm/libvirgldrm.a src/gallium/winsys/virgl/common/libvirglcommon.a src/gallium/winsys/virgl/vtest/libvirglvtest.a src/gallium/drivers/iris/libiris.a src/gallium/drivers/iris/libiris_per_hw_ver80.a src/gallium/drivers/iris/libiris_per_hw_ver90.a src/gallium/drivers/iris/libiris_per_hw_ver110.a src/gallium/drivers/iris/libiris_per_hw_ver120.a src/gallium/drivers/iris/libiris_per_hw_ver125.a src/intel/compiler/libintel_compiler.a src/intel/blorp/libblorp.a src/intel/perf/libintel_perf.a src/intel/ds/libintel-driver-ds.a src/gallium/winsys/iris/drm/libiriswinsys.a src/gallium/drivers/crocus/libcrocus.a src/gallium/drivers/crocus/libcrocus_per_hw_ver40.a src/gallium/drivers/crocus/libcrocus_per_hw_ver45.a src/gallium/drivers/crocus/libcrocus_per_hw_ver50.a src/gallium/drivers/crocus/libcrocus_per_hw_ver60.a src/gallium/drivers/crocus/libcrocus_per_hw_ver70.a src/gallium/drivers/crocus/libcrocus_per_hw_ver75.a src/gallium/drivers/crocus/libcrocus_per_hw_ver80.a src/gallium/winsys/crocus/drm/libcrocuswinsys.a -Wl,--build-id=sha1 -Wl,--gc-sections -Wl,--version-script /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/dri.sym -Wl,--dynamic-list /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/../dri-vdpau.dyn /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm.so /usr/lib/llvm-14/lib/libLLVM-14.so.1 -pthread /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libexpat.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libz.so -lm /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libzstd.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libxcb-randr.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_radeon.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libelf.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_amdgpu.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_nouveau.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_intel.so -Wl,--end-group
> > /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld: src/gallium/auxiliary/libgallium.a.p/gallivm_lp_bld_misc.cpp.o: in function `llvm::SmallVectorTemplateBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false>::grow(unsigned long)':
> > lp_bld_misc.cpp:(.text._ZN4llvm23SmallVectorTemplateBaseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0EE4growEm[_ZN4llvm23SmallVectorTemplateBaseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0EE4growEm]+0x36): undefined reference to `llvm::SmallVectorBase<unsigned int>::mallocForGrow(void*, unsigned long, unsigned long, unsigned long&)'
> > /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld: src/amd/llvm/libamd_common_llvm.a.p/ac_llvm_helper.cpp.o: in function `llvm::DataLayout::getTypeSizeInBits(llvm::Type*) const':
> > ac_llvm_helper.cpp:(.text._ZNK4llvm10DataLayout17getTypeSizeInBitsEPNS_4TypeE[_ZNK4llvm10DataLayout17getTypeSizeInBitsEPNS_4TypeE]+0xa4): undefined reference to `llvm::TargetExtType::getLayoutType() const'
> > /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld: src/amd/llvm/libamd_common_llvm.a.p/ac_llvm_helper.cpp.o: in function `ac_create_passmgr':
> > ac_llvm_helper.cpp:(.text.ac_create_passmgr+0x8c): undefined reference to `llvm::createPromoteMemoryToRegisterPass(bool)'
> > /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld: ac_llvm_helper.cpp:(.text.ac_create_passmgr+0xa6): undefined reference to `llvm::createSROAPass(bool)'
> > collect2: error: ld returned 1 exit status
> > ninja: build stopped: subcommand failed.
> > INFO: autodetecting backend as ninja
> > INFO: calculating backend command to run: /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/bin/ninja -j 24 -v
> > WARNING: /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760:155 exit 1 from 'meson compile -v -j 24'
> > WARNING: Backtrace (BB generated script):
> >         #1: meson_do_compile, /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760, line 155
> >         #2: do_compile, /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760, line 150
> >         #3: main, /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760, line 159
> >
> > (log borrowed from Tim but I'm seeing a similar issue)
> >
> > Cheers,
> >
> > Richard
Tim Orling Sept. 28, 2023, 9:46 p.m. UTC | #4
On Thu, Sep 28, 2023 at 1:34 PM Khem Raj <raj.khem@gmail.com> wrote:

> Can you check if the machines where it fails has llvm-14-dev package
> installed on host ?
>
>
In my case, yes. llvm-14-dev 1:14.0.0-1ubuntu1.1


> On Thu, Sep 28, 2023 at 9:55 AM Khem Raj <raj.khem@gmail.com> wrote:
> >
> > its linking with  /usr/lib/llvm-14/lib/libLLVM-14.so.1 which is not
> > correct. Somehow its finding llvm library on your build host.
> >
> > On Thu, Sep 28, 2023 at 8:25 AM Richard Purdie
> > <richard.purdie@linuxfoundation.org> wrote:
> > >
> > > On Fri, 2023-09-22 at 09:37 -0700, Khem Raj wrote:
> > > > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > > > ---
> > > >  .../0001-gallium-Fix-build-with-llvm-17.patch | 27
> ++++++++++++-------
> > > >  1 file changed, 18 insertions(+), 9 deletions(-)
> > > >
> > > > diff --git
> a/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
> b/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
> > > > index 3631a918b0c..0ca7a22b45b 100644
> > > > ---
> a/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
> > > > +++
> b/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
> > > > @@ -1,4 +1,4 @@
> > > > -From 865762e0a767a121206d818bdd58301afbf30104 Mon Sep 17 00:00:00
> 2001
> > > > +From c8e9776abc3dfd3f2411797a90a03e7fa16263ef Mon Sep 17 00:00:00
> 2001
> > > >  From: Khem Raj <raj.khem@gmail.com>
> > > >  Date: Fri, 23 Jun 2023 01:20:38 -0700
> > > >  Subject: [PATCH] gallium: Fix build with llvm 17
> > > > @@ -10,14 +10,12 @@ so add conditions to exclude them for llvm >= 17
> > > >  Upstream-Status: Submitted [
> https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23827]
> > > >  Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > > >  ---
> > > > - src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 +++-
> > > > - 1 file changed, 3 insertions(+), 1 deletion(-)
> > > > + src/gallium/auxiliary/gallivm/lp_bld_init.c | 6 ++++--
> > > > + 1 file changed, 4 insertions(+), 2 deletions(-)
> > > >
> > > > -diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c
> b/src/gallium/auxiliary/gallivm/lp_bld_init.c
> > > > -index 24d0823..3d4573e 100644
> > > >  --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
> > > >  +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
> > > > -@@ -42,8 +42,10 @@
> > > > +@@ -42,19 +42,23 @@
> > > >
> > > >   #include <llvm/Config/llvm-config.h>
> > > >   #include <llvm-c/Analysis.h>
> > > > @@ -29,6 +27,17 @@ index 24d0823..3d4573e 100644
> > > >   #include <llvm-c/Transforms/Utils.h>
> > > >   #endif
> > > >   #include <llvm-c/BitWriter.h>
> > > > ---
> > > > -2.41.0
> > > > -
> > > > + #if GALLIVM_USE_NEW_PASS == 1
> > > > + #include <llvm-c/Transforms/PassBuilder.h>
> > > > +-#elif GALLIVM_HAVE_CORO == 1
> > > > ++#elif GALLIVM_HAVE_CORO == 1 && LLVM_VERSION_MAJOR < 17
> > > > + #if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 ||
> DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64)
> > > > + #include <llvm-c/Transforms/IPO.h>
> > > > + #endif
> > > > ++#if LLVM_VERSION_MAJOR < 17
> > > > + #include <llvm-c/Transforms/Coroutines.h>
> > > > + #endif
> > > > ++#endif
> > > > +
> > > > + unsigned gallivm_perf = 0;
> > > > +
> > >
> > > I think this patch may have broken against with the recent llvm point
> > > release?
> > >
> > > DEBUG: Executing shell function do_compile
> > >
> > > [1/33]
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/bin/python3-native/python3
> ../mesa-23.1.8/bin/git_sha1_gen.py --output src/git_sha1.h
> > > [2/13] g++  -o src/gallium/targets/dri/libgallium_dri.so
> src/gallium/targets/dri/libgallium_dri.so.p/target.c.o
> -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib
> -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib
> -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group
> -Wl,-soname,libgallium_dri.so -Wl,--enable-new-dtags
> -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib
> -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib
> -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib
> -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib
> -Wl,-O1 -Wl,--allow-shlib-undefined
> -Wl,--dynamic-linker=/srv/build/ttorling/workspace-upgrades/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2
> '-Wl,-rpath,$ORIGIN/../../../mapi/shared-glapi:/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib'
> -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/build/src/mapi/shared-glapi
> -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib
> src/gallium/frontends/dri/libdri.a src/util/libmesa_util.a
> src/util/format/libmesa_format.a src/util/libmesa_util_sse41.a
> src/c11/impl/libmesa_util_c11.a src/mesa/libmesa.a
> src/compiler/glsl/libglsl.a src/compiler/glsl/glcpp/libglcpp.a
> src/compiler/nir/libnir.a src/compiler/libcompiler.a
> src/mesa/libmesa_sse41.a src/gallium/auxiliary/libgalliumvl.a
> src/gallium/auxiliary/libgallium.a src/mapi/shared-glapi/libglapi.so.0.0.0
> src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a
> src/loader/libloader.a src/util/libxmlconfig.a
> src/gallium/winsys/sw/null/libws_null.a
> src/gallium/winsys/sw/wrapper/libwsw.a src/gallium/winsys/sw/dri/libswdri.a
> src/gallium/winsys/sw/kms-dri/libswkmsdri.a
> src/gallium/drivers/llvmpipe/libllvmpipe.a
> src/gallium/drivers/softpipe/libsoftpipe.a
> src/gallium/drivers/r300/libr300.a
> src/gallium/winsys/radeon/drm/libradeonwinsys.a
> src/gallium/drivers/r600/libr600.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx6.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx7.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx8.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx9.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx10.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx103.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx11.a
> src/gallium/drivers/radeonsi/libradeonsi.a
> src/gallium/winsys/amdgpu/drm/libamdgpuwinsys.a
> src/amd/addrlib/libaddrlib.a src/amd/common/libamd_common.a
> src/amd/llvm/libamd_common_llvm.a
> src/gallium/winsys/nouveau/drm/libnouveauwinsys.a
> src/nouveau/codegen/libnouveau_codegen.a
> src/gallium/drivers/nouveau/libnouveau.a src/gallium/drivers/i915/libi915.a
> src/gallium/winsys/i915/drm/libi915drm.a src/intel/common/libintel_common.a
> src/intel/isl/libisl.a src/intel/isl/libisl_per_hw_ver40.a
> src/intel/dev/libintel_dev.a src/intel/isl/libisl_per_hw_ver50.a
> src/intel/isl/libisl_per_hw_ver60.a src/intel/isl/libisl_per_hw_ver70.a
> src/intel/isl/libisl_per_hw_ver75.a src/intel/isl/libisl_per_hw_ver80.a
> src/intel/isl/libisl_per_hw_ver90.a src/intel/isl/libisl_per_hw_ver110.a
> src/intel/isl/libisl_per_hw_ver120.a src/intel/isl/libisl_per_hw_ver125.a
> src/intel/isl/libisl_tiled_memcpy.a
> src/intel/isl/libisl_tiled_memcpy_sse41.a
> src/gallium/drivers/svga/libsvga.a src/gallium/winsys/svga/drm/libsvgadrm.a
> src/gallium/drivers/virgl/libvirgl.a
> src/gallium/winsys/virgl/drm/libvirgldrm.a
> src/gallium/winsys/virgl/common/libvirglcommon.a
> src/gallium/winsys/virgl/vtest/libvirglvtest.a
> src/gallium/drivers/iris/libiris.a
> src/gallium/drivers/iris/libiris_per_hw_ver80.a
> src/gallium/drivers/iris/libiris_per_hw_ver90.a
> src/gallium/drivers/iris/libiris_per_hw_ver110.a
> src/gallium/drivers/iris/libiris_per_hw_ver120.a
> src/gallium/drivers/iris/libiris_per_hw_ver125.a
> src/intel/compiler/libintel_compiler.a src/intel/blorp/libblorp.a
> src/intel/perf/libintel_perf.a src/intel/ds/libintel-driver-ds.a
> src/gallium/winsys/iris/drm/libiriswinsys.a
> src/gallium/drivers/crocus/libcrocus.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver40.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver45.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver50.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver60.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver70.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver75.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver80.a
> src/gallium/winsys/crocus/drm/libcrocuswinsys.a -Wl,--build-id=sha1
> -Wl,--gc-sections -Wl,--version-script
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/dri.sym
> -Wl,--dynamic-list
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/../dri-vdpau.dyn
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm.so
> /usr/lib/llvm-14/lib/libLLVM-14.so.1 -pthread
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libexpat.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libz.so
> -lm
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libzstd.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libxcb-randr.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_radeon.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libelf.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_amdgpu.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_nouveau.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_intel.so
> -Wl,--end-group
> > > FAILED: src/gallium/targets/dri/libgallium_dri.so
> > > g++  -o src/gallium/targets/dri/libgallium_dri.so
> src/gallium/targets/dri/libgallium_dri.so.p/target.c.o
> -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib
> -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib
> -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group
> -Wl,-soname,libgallium_dri.so -Wl,--enable-new-dtags
> -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib
> -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib
> -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib
> -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib
> -Wl,-O1 -Wl,--allow-shlib-undefined
> -Wl,--dynamic-linker=/srv/build/ttorling/workspace-upgrades/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2
> '-Wl,-rpath,$ORIGIN/../../../mapi/shared-glapi:/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib'
> -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/build/src/mapi/shared-glapi
> -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib
> src/gallium/frontends/dri/libdri.a src/util/libmesa_util.a
> src/util/format/libmesa_format.a src/util/libmesa_util_sse41.a
> src/c11/impl/libmesa_util_c11.a src/mesa/libmesa.a
> src/compiler/glsl/libglsl.a src/compiler/glsl/glcpp/libglcpp.a
> src/compiler/nir/libnir.a src/compiler/libcompiler.a
> src/mesa/libmesa_sse41.a src/gallium/auxiliary/libgalliumvl.a
> src/gallium/auxiliary/libgallium.a src/mapi/shared-glapi/libglapi.so.0.0.0
> src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a
> src/loader/libloader.a src/util/libxmlconfig.a
> src/gallium/winsys/sw/null/libws_null.a
> src/gallium/winsys/sw/wrapper/libwsw.a src/gallium/winsys/sw/dri/libswdri.a
> src/gallium/winsys/sw/kms-dri/libswkmsdri.a
> src/gallium/drivers/llvmpipe/libllvmpipe.a
> src/gallium/drivers/softpipe/libsoftpipe.a
> src/gallium/drivers/r300/libr300.a
> src/gallium/winsys/radeon/drm/libradeonwinsys.a
> src/gallium/drivers/r600/libr600.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx6.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx7.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx8.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx9.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx10.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx103.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx11.a
> src/gallium/drivers/radeonsi/libradeonsi.a
> src/gallium/winsys/amdgpu/drm/libamdgpuwinsys.a
> src/amd/addrlib/libaddrlib.a src/amd/common/libamd_common.a
> src/amd/llvm/libamd_common_llvm.a
> src/gallium/winsys/nouveau/drm/libnouveauwinsys.a
> src/nouveau/codegen/libnouveau_codegen.a
> src/gallium/drivers/nouveau/libnouveau.a src/gallium/drivers/i915/libi915.a
> src/gallium/winsys/i915/drm/libi915drm.a src/intel/common/libintel_common.a
> src/intel/isl/libisl.a src/intel/isl/libisl_per_hw_ver40.a
> src/intel/dev/libintel_dev.a src/intel/isl/libisl_per_hw_ver50.a
> src/intel/isl/libisl_per_hw_ver60.a src/intel/isl/libisl_per_hw_ver70.a
> src/intel/isl/libisl_per_hw_ver75.a src/intel/isl/libisl_per_hw_ver80.a
> src/intel/isl/libisl_per_hw_ver90.a src/intel/isl/libisl_per_hw_ver110.a
> src/intel/isl/libisl_per_hw_ver120.a src/intel/isl/libisl_per_hw_ver125.a
> src/intel/isl/libisl_tiled_memcpy.a
> src/intel/isl/libisl_tiled_memcpy_sse41.a
> src/gallium/drivers/svga/libsvga.a src/gallium/winsys/svga/drm/libsvgadrm.a
> src/gallium/drivers/virgl/libvirgl.a
> src/gallium/winsys/virgl/drm/libvirgldrm.a
> src/gallium/winsys/virgl/common/libvirglcommon.a
> src/gallium/winsys/virgl/vtest/libvirglvtest.a
> src/gallium/drivers/iris/libiris.a
> src/gallium/drivers/iris/libiris_per_hw_ver80.a
> src/gallium/drivers/iris/libiris_per_hw_ver90.a
> src/gallium/drivers/iris/libiris_per_hw_ver110.a
> src/gallium/drivers/iris/libiris_per_hw_ver120.a
> src/gallium/drivers/iris/libiris_per_hw_ver125.a
> src/intel/compiler/libintel_compiler.a src/intel/blorp/libblorp.a
> src/intel/perf/libintel_perf.a src/intel/ds/libintel-driver-ds.a
> src/gallium/winsys/iris/drm/libiriswinsys.a
> src/gallium/drivers/crocus/libcrocus.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver40.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver45.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver50.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver60.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver70.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver75.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver80.a
> src/gallium/winsys/crocus/drm/libcrocuswinsys.a -Wl,--build-id=sha1
> -Wl,--gc-sections -Wl,--version-script
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/dri.sym
> -Wl,--dynamic-list
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/../dri-vdpau.dyn
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm.so
> /usr/lib/llvm-14/lib/libLLVM-14.so.1 -pthread
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libexpat.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libz.so
> -lm
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libzstd.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libxcb-randr.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_radeon.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libelf.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_amdgpu.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_nouveau.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_intel.so
> -Wl,--end-group
> > > /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld:
> src/gallium/auxiliary/libgallium.a.p/gallivm_lp_bld_misc.cpp.o: in function
> `llvm::SmallVectorTemplateBase<std::__cxx11::basic_string<char,
> std::char_traits<char>, std::allocator<char> >, false>::grow(unsigned
> long)':
> > >
> lp_bld_misc.cpp:(.text._ZN4llvm23SmallVectorTemplateBaseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0EE4growEm[_ZN4llvm23SmallVectorTemplateBaseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0EE4growEm]+0x36):
> undefined reference to `llvm::SmallVectorBase<unsigned
> int>::mallocForGrow(void*, unsigned long, unsigned long, unsigned long&)'
> > > /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld:
> src/amd/llvm/libamd_common_llvm.a.p/ac_llvm_helper.cpp.o: in function
> `llvm::DataLayout::getTypeSizeInBits(llvm::Type*) const':
> > >
> ac_llvm_helper.cpp:(.text._ZNK4llvm10DataLayout17getTypeSizeInBitsEPNS_4TypeE[_ZNK4llvm10DataLayout17getTypeSizeInBitsEPNS_4TypeE]+0xa4):
> undefined reference to `llvm::TargetExtType::getLayoutType() const'
> > > /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld:
> src/amd/llvm/libamd_common_llvm.a.p/ac_llvm_helper.cpp.o: in function
> `ac_create_passmgr':
> > > ac_llvm_helper.cpp:(.text.ac_create_passmgr+0x8c): undefined reference
> to `llvm::createPromoteMemoryToRegisterPass(bool)'
> > > /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld:
> ac_llvm_helper.cpp:(.text.ac_create_passmgr+0xa6): undefined reference to
> `llvm::createSROAPass(bool)'
> > > collect2: error: ld returned 1 exit status
> > > ninja: build stopped: subcommand failed.
> > > INFO: autodetecting backend as ninja
> > > INFO: calculating backend command to run:
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/bin/ninja
> -j 24 -v
> > > WARNING:
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760:155
> exit 1 from 'meson compile -v -j 24'
> > > WARNING: Backtrace (BB generated script):
> > >         #1: meson_do_compile,
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760,
> line 155
> > >         #2: do_compile,
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760,
> line 150
> > >         #3: main,
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760,
> line 159
> > >
> > > (log borrowed from Tim but I'm seeing a similar issue)
> > >
> > > Cheers,
> > >
> > > Richard
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#188379):
> https://lists.openembedded.org/g/openembedded-core/message/188379
> Mute This Topic: https://lists.openembedded.org/mt/101524707/924729
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> ticotimo@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Khem Raj Sept. 28, 2023, 10:55 p.m. UTC | #5
On Thu, Sep 28, 2023 at 2:46 PM Tim Orling <ticotimo@gmail.com> wrote:
>
>
>
> On Thu, Sep 28, 2023 at 1:34 PM Khem Raj <raj.khem@gmail.com> wrote:
>>
>> Can you check if the machines where it fails has llvm-14-dev package
>> installed on host ?
>>
>
> In my case, yes. llvm-14-dev 1:14.0.0-1ubuntu1.1

yeah, this will expose the problem I guess that mesa/meson build files
have logic for detecting llvm dependency uses cmake and how meson
does this is by generating intermediate native file and ignoring
llvm-config setting that OE has passed via meson.native file and finds
one in
/usr/bin and thats where the slippery slope starts.

I am sure if you uninstall llvm-14-dev from your build host then it
will start to work. I am looking into a patch to contain it meanwhile.

>
>>
>> On Thu, Sep 28, 2023 at 9:55 AM Khem Raj <raj.khem@gmail.com> wrote:
>> >
>> > its linking with  /usr/lib/llvm-14/lib/libLLVM-14.so.1 which is not
>> > correct. Somehow its finding llvm library on your build host.
>> >
>> > On Thu, Sep 28, 2023 at 8:25 AM Richard Purdie
>> > <richard.purdie@linuxfoundation.org> wrote:
>> > >
>> > > On Fri, 2023-09-22 at 09:37 -0700, Khem Raj wrote:
>> > > > Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> > > > ---
>> > > >  .../0001-gallium-Fix-build-with-llvm-17.patch | 27 ++++++++++++-------
>> > > >  1 file changed, 18 insertions(+), 9 deletions(-)
>> > > >
>> > > > diff --git a/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch b/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
>> > > > index 3631a918b0c..0ca7a22b45b 100644
>> > > > --- a/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
>> > > > +++ b/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
>> > > > @@ -1,4 +1,4 @@
>> > > > -From 865762e0a767a121206d818bdd58301afbf30104 Mon Sep 17 00:00:00 2001
>> > > > +From c8e9776abc3dfd3f2411797a90a03e7fa16263ef Mon Sep 17 00:00:00 2001
>> > > >  From: Khem Raj <raj.khem@gmail.com>
>> > > >  Date: Fri, 23 Jun 2023 01:20:38 -0700
>> > > >  Subject: [PATCH] gallium: Fix build with llvm 17
>> > > > @@ -10,14 +10,12 @@ so add conditions to exclude them for llvm >= 17
>> > > >  Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23827]
>> > > >  Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> > > >  ---
>> > > > - src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 +++-
>> > > > - 1 file changed, 3 insertions(+), 1 deletion(-)
>> > > > + src/gallium/auxiliary/gallivm/lp_bld_init.c | 6 ++++--
>> > > > + 1 file changed, 4 insertions(+), 2 deletions(-)
>> > > >
>> > > > -diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
>> > > > -index 24d0823..3d4573e 100644
>> > > >  --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
>> > > >  +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
>> > > > -@@ -42,8 +42,10 @@
>> > > > +@@ -42,19 +42,23 @@
>> > > >
>> > > >   #include <llvm/Config/llvm-config.h>
>> > > >   #include <llvm-c/Analysis.h>
>> > > > @@ -29,6 +27,17 @@ index 24d0823..3d4573e 100644
>> > > >   #include <llvm-c/Transforms/Utils.h>
>> > > >   #endif
>> > > >   #include <llvm-c/BitWriter.h>
>> > > > ---
>> > > > -2.41.0
>> > > > -
>> > > > + #if GALLIVM_USE_NEW_PASS == 1
>> > > > + #include <llvm-c/Transforms/PassBuilder.h>
>> > > > +-#elif GALLIVM_HAVE_CORO == 1
>> > > > ++#elif GALLIVM_HAVE_CORO == 1 && LLVM_VERSION_MAJOR < 17
>> > > > + #if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64)
>> > > > + #include <llvm-c/Transforms/IPO.h>
>> > > > + #endif
>> > > > ++#if LLVM_VERSION_MAJOR < 17
>> > > > + #include <llvm-c/Transforms/Coroutines.h>
>> > > > + #endif
>> > > > ++#endif
>> > > > +
>> > > > + unsigned gallivm_perf = 0;
>> > > > +
>> > >
>> > > I think this patch may have broken against with the recent llvm point
>> > > release?
>> > >
>> > > DEBUG: Executing shell function do_compile
>> > >
>> > > [1/33] /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/bin/python3-native/python3 ../mesa-23.1.8/bin/git_sha1_gen.py --output src/git_sha1.h
>> > > [2/13] g++  -o src/gallium/targets/dri/libgallium_dri.so src/gallium/targets/dri/libgallium_dri.so.p/target.c.o -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libgallium_dri.so -Wl,--enable-new-dtags -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/srv/build/ttorling/workspace-upgrades/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 '-Wl,-rpath,$ORIGIN/../../../mapi/shared-glapi:/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib' -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/build/src/mapi/shared-glapi -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib src/gallium/frontends/dri/libdri.a src/util/libmesa_util.a src/util/format/libmesa_format.a src/util/libmesa_util_sse41.a src/c11/impl/libmesa_util_c11.a src/mesa/libmesa.a src/compiler/glsl/libglsl.a src/compiler/glsl/glcpp/libglcpp.a src/compiler/nir/libnir.a src/compiler/libcompiler.a src/mesa/libmesa_sse41.a src/gallium/auxiliary/libgalliumvl.a src/gallium/auxiliary/libgallium.a src/mapi/shared-glapi/libglapi.so.0.0.0 src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a src/loader/libloader.a src/util/libxmlconfig.a src/gallium/winsys/sw/null/libws_null.a src/gallium/winsys/sw/wrapper/libwsw.a src/gallium/winsys/sw/dri/libswdri.a src/gallium/winsys/sw/kms-dri/libswkmsdri.a src/gallium/drivers/llvmpipe/libllvmpipe.a src/gallium/drivers/softpipe/libsoftpipe.a src/gallium/drivers/r300/libr300.a src/gallium/winsys/radeon/drm/libradeonwinsys.a src/gallium/drivers/r600/libr600.a src/gallium/drivers/radeonsi/libradeonsi_gfx6.a src/gallium/drivers/radeonsi/libradeonsi_gfx7.a src/gallium/drivers/radeonsi/libradeonsi_gfx8.a src/gallium/drivers/radeonsi/libradeonsi_gfx9.a src/gallium/drivers/radeonsi/libradeonsi_gfx10.a src/gallium/drivers/radeonsi/libradeonsi_gfx103.a src/gallium/drivers/radeonsi/libradeonsi_gfx11.a src/gallium/drivers/radeonsi/libradeonsi.a src/gallium/winsys/amdgpu/drm/libamdgpuwinsys.a src/amd/addrlib/libaddrlib.a src/amd/common/libamd_common.a src/amd/llvm/libamd_common_llvm.a src/gallium/winsys/nouveau/drm/libnouveauwinsys.a src/nouveau/codegen/libnouveau_codegen.a src/gallium/drivers/nouveau/libnouveau.a src/gallium/drivers/i915/libi915.a src/gallium/winsys/i915/drm/libi915drm.a src/intel/common/libintel_common.a src/intel/isl/libisl.a src/intel/isl/libisl_per_hw_ver40.a src/intel/dev/libintel_dev.a src/intel/isl/libisl_per_hw_ver50.a src/intel/isl/libisl_per_hw_ver60.a src/intel/isl/libisl_per_hw_ver70.a src/intel/isl/libisl_per_hw_ver75.a src/intel/isl/libisl_per_hw_ver80.a src/intel/isl/libisl_per_hw_ver90.a src/intel/isl/libisl_per_hw_ver110.a src/intel/isl/libisl_per_hw_ver120.a src/intel/isl/libisl_per_hw_ver125.a src/intel/isl/libisl_tiled_memcpy.a src/intel/isl/libisl_tiled_memcpy_sse41.a src/gallium/drivers/svga/libsvga.a src/gallium/winsys/svga/drm/libsvgadrm.a src/gallium/drivers/virgl/libvirgl.a src/gallium/winsys/virgl/drm/libvirgldrm.a src/gallium/winsys/virgl/common/libvirglcommon.a src/gallium/winsys/virgl/vtest/libvirglvtest.a src/gallium/drivers/iris/libiris.a src/gallium/drivers/iris/libiris_per_hw_ver80.a src/gallium/drivers/iris/libiris_per_hw_ver90.a src/gallium/drivers/iris/libiris_per_hw_ver110.a src/gallium/drivers/iris/libiris_per_hw_ver120.a src/gallium/drivers/iris/libiris_per_hw_ver125.a src/intel/compiler/libintel_compiler.a src/intel/blorp/libblorp.a src/intel/perf/libintel_perf.a src/intel/ds/libintel-driver-ds.a src/gallium/winsys/iris/drm/libiriswinsys.a src/gallium/drivers/crocus/libcrocus.a src/gallium/drivers/crocus/libcrocus_per_hw_ver40.a src/gallium/drivers/crocus/libcrocus_per_hw_ver45.a src/gallium/drivers/crocus/libcrocus_per_hw_ver50.a src/gallium/drivers/crocus/libcrocus_per_hw_ver60.a src/gallium/drivers/crocus/libcrocus_per_hw_ver70.a src/gallium/drivers/crocus/libcrocus_per_hw_ver75.a src/gallium/drivers/crocus/libcrocus_per_hw_ver80.a src/gallium/winsys/crocus/drm/libcrocuswinsys.a -Wl,--build-id=sha1 -Wl,--gc-sections -Wl,--version-script /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/dri.sym -Wl,--dynamic-list /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/../dri-vdpau.dyn /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm.so /usr/lib/llvm-14/lib/libLLVM-14.so.1 -pthread /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libexpat.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libz.so -lm /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libzstd.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libxcb-randr.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_radeon.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libelf.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_amdgpu.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_nouveau.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_intel.so -Wl,--end-group
>> > > FAILED: src/gallium/targets/dri/libgallium_dri.so
>> > > g++  -o src/gallium/targets/dri/libgallium_dri.so src/gallium/targets/dri/libgallium_dri.so.p/target.c.o -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libgallium_dri.so -Wl,--enable-new-dtags -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/srv/build/ttorling/workspace-upgrades/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 '-Wl,-rpath,$ORIGIN/../../../mapi/shared-glapi:/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib' -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/build/src/mapi/shared-glapi -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib src/gallium/frontends/dri/libdri.a src/util/libmesa_util.a src/util/format/libmesa_format.a src/util/libmesa_util_sse41.a src/c11/impl/libmesa_util_c11.a src/mesa/libmesa.a src/compiler/glsl/libglsl.a src/compiler/glsl/glcpp/libglcpp.a src/compiler/nir/libnir.a src/compiler/libcompiler.a src/mesa/libmesa_sse41.a src/gallium/auxiliary/libgalliumvl.a src/gallium/auxiliary/libgallium.a src/mapi/shared-glapi/libglapi.so.0.0.0 src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a src/loader/libloader.a src/util/libxmlconfig.a src/gallium/winsys/sw/null/libws_null.a src/gallium/winsys/sw/wrapper/libwsw.a src/gallium/winsys/sw/dri/libswdri.a src/gallium/winsys/sw/kms-dri/libswkmsdri.a src/gallium/drivers/llvmpipe/libllvmpipe.a src/gallium/drivers/softpipe/libsoftpipe.a src/gallium/drivers/r300/libr300.a src/gallium/winsys/radeon/drm/libradeonwinsys.a src/gallium/drivers/r600/libr600.a src/gallium/drivers/radeonsi/libradeonsi_gfx6.a src/gallium/drivers/radeonsi/libradeonsi_gfx7.a src/gallium/drivers/radeonsi/libradeonsi_gfx8.a src/gallium/drivers/radeonsi/libradeonsi_gfx9.a src/gallium/drivers/radeonsi/libradeonsi_gfx10.a src/gallium/drivers/radeonsi/libradeonsi_gfx103.a src/gallium/drivers/radeonsi/libradeonsi_gfx11.a src/gallium/drivers/radeonsi/libradeonsi.a src/gallium/winsys/amdgpu/drm/libamdgpuwinsys.a src/amd/addrlib/libaddrlib.a src/amd/common/libamd_common.a src/amd/llvm/libamd_common_llvm.a src/gallium/winsys/nouveau/drm/libnouveauwinsys.a src/nouveau/codegen/libnouveau_codegen.a src/gallium/drivers/nouveau/libnouveau.a src/gallium/drivers/i915/libi915.a src/gallium/winsys/i915/drm/libi915drm.a src/intel/common/libintel_common.a src/intel/isl/libisl.a src/intel/isl/libisl_per_hw_ver40.a src/intel/dev/libintel_dev.a src/intel/isl/libisl_per_hw_ver50.a src/intel/isl/libisl_per_hw_ver60.a src/intel/isl/libisl_per_hw_ver70.a src/intel/isl/libisl_per_hw_ver75.a src/intel/isl/libisl_per_hw_ver80.a src/intel/isl/libisl_per_hw_ver90.a src/intel/isl/libisl_per_hw_ver110.a src/intel/isl/libisl_per_hw_ver120.a src/intel/isl/libisl_per_hw_ver125.a src/intel/isl/libisl_tiled_memcpy.a src/intel/isl/libisl_tiled_memcpy_sse41.a src/gallium/drivers/svga/libsvga.a src/gallium/winsys/svga/drm/libsvgadrm.a src/gallium/drivers/virgl/libvirgl.a src/gallium/winsys/virgl/drm/libvirgldrm.a src/gallium/winsys/virgl/common/libvirglcommon.a src/gallium/winsys/virgl/vtest/libvirglvtest.a src/gallium/drivers/iris/libiris.a src/gallium/drivers/iris/libiris_per_hw_ver80.a src/gallium/drivers/iris/libiris_per_hw_ver90.a src/gallium/drivers/iris/libiris_per_hw_ver110.a src/gallium/drivers/iris/libiris_per_hw_ver120.a src/gallium/drivers/iris/libiris_per_hw_ver125.a src/intel/compiler/libintel_compiler.a src/intel/blorp/libblorp.a src/intel/perf/libintel_perf.a src/intel/ds/libintel-driver-ds.a src/gallium/winsys/iris/drm/libiriswinsys.a src/gallium/drivers/crocus/libcrocus.a src/gallium/drivers/crocus/libcrocus_per_hw_ver40.a src/gallium/drivers/crocus/libcrocus_per_hw_ver45.a src/gallium/drivers/crocus/libcrocus_per_hw_ver50.a src/gallium/drivers/crocus/libcrocus_per_hw_ver60.a src/gallium/drivers/crocus/libcrocus_per_hw_ver70.a src/gallium/drivers/crocus/libcrocus_per_hw_ver75.a src/gallium/drivers/crocus/libcrocus_per_hw_ver80.a src/gallium/winsys/crocus/drm/libcrocuswinsys.a -Wl,--build-id=sha1 -Wl,--gc-sections -Wl,--version-script /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/dri.sym -Wl,--dynamic-list /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/../dri-vdpau.dyn /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm.so /usr/lib/llvm-14/lib/libLLVM-14.so.1 -pthread /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libexpat.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libz.so -lm /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libzstd.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libxcb-randr.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_radeon.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libelf.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_amdgpu.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_nouveau.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_intel.so -Wl,--end-group
>> > > /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld: src/gallium/auxiliary/libgallium.a.p/gallivm_lp_bld_misc.cpp.o: in function `llvm::SmallVectorTemplateBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false>::grow(unsigned long)':
>> > > lp_bld_misc.cpp:(.text._ZN4llvm23SmallVectorTemplateBaseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0EE4growEm[_ZN4llvm23SmallVectorTemplateBaseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0EE4growEm]+0x36): undefined reference to `llvm::SmallVectorBase<unsigned int>::mallocForGrow(void*, unsigned long, unsigned long, unsigned long&)'
>> > > /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld: src/amd/llvm/libamd_common_llvm.a.p/ac_llvm_helper.cpp.o: in function `llvm::DataLayout::getTypeSizeInBits(llvm::Type*) const':
>> > > ac_llvm_helper.cpp:(.text._ZNK4llvm10DataLayout17getTypeSizeInBitsEPNS_4TypeE[_ZNK4llvm10DataLayout17getTypeSizeInBitsEPNS_4TypeE]+0xa4): undefined reference to `llvm::TargetExtType::getLayoutType() const'
>> > > /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld: src/amd/llvm/libamd_common_llvm.a.p/ac_llvm_helper.cpp.o: in function `ac_create_passmgr':
>> > > ac_llvm_helper.cpp:(.text.ac_create_passmgr+0x8c): undefined reference to `llvm::createPromoteMemoryToRegisterPass(bool)'
>> > > /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld: ac_llvm_helper.cpp:(.text.ac_create_passmgr+0xa6): undefined reference to `llvm::createSROAPass(bool)'
>> > > collect2: error: ld returned 1 exit status
>> > > ninja: build stopped: subcommand failed.
>> > > INFO: autodetecting backend as ninja
>> > > INFO: calculating backend command to run: /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/bin/ninja -j 24 -v
>> > > WARNING: /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760:155 exit 1 from 'meson compile -v -j 24'
>> > > WARNING: Backtrace (BB generated script):
>> > >         #1: meson_do_compile, /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760, line 155
>> > >         #2: do_compile, /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760, line 150
>> > >         #3: main, /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760, line 159
>> > >
>> > > (log borrowed from Tim but I'm seeing a similar issue)
>> > >
>> > > Cheers,
>> > >
>> > > Richard
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#188379): https://lists.openembedded.org/g/openembedded-core/message/188379
>> Mute This Topic: https://lists.openembedded.org/mt/101524707/924729
>> Group Owner: openembedded-core+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ticotimo@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
Tim Orling Sept. 28, 2023, 11 p.m. UTC | #6
On Thu, Sep 28, 2023 at 3:55 PM Khem Raj <raj.khem@gmail.com> wrote:

> On Thu, Sep 28, 2023 at 2:46 PM Tim Orling <ticotimo@gmail.com> wrote:
> >
> >
> >
> > On Thu, Sep 28, 2023 at 1:34 PM Khem Raj <raj.khem@gmail.com> wrote:
> >>
> >> Can you check if the machines where it fails has llvm-14-dev package
> >> installed on host ?
> >>
> >
> > In my case, yes. llvm-14-dev 1:14.0.0-1ubuntu1.1
>
> yeah, this will expose the problem I guess that mesa/meson build files
> have logic for detecting llvm dependency uses cmake and how meson
> does this is by generating intermediate native file and ignoring
> llvm-config setting that OE has passed via meson.native file and finds
> one in
> /usr/bin and thats where the slippery slope starts.
>
> I am sure if you uninstall llvm-14-dev from your build host then it
> will start to work. I am looking into a patch to contain it meanwhile.
>
>
Confirmed "fix". I don't remember why I have llvm-14-dev installed to begin
with so buh-bye


> >
> >>
> >> On Thu, Sep 28, 2023 at 9:55 AM Khem Raj <raj.khem@gmail.com> wrote:
> >> >
> >> > its linking with  /usr/lib/llvm-14/lib/libLLVM-14.so.1 which is not
> >> > correct. Somehow its finding llvm library on your build host.
> >> >
> >> > On Thu, Sep 28, 2023 at 8:25 AM Richard Purdie
> >> > <richard.purdie@linuxfoundation.org> wrote:
> >> > >
> >> > > On Fri, 2023-09-22 at 09:37 -0700, Khem Raj wrote:
> >> > > > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >> > > > ---
> >> > > >  .../0001-gallium-Fix-build-with-llvm-17.patch | 27
> ++++++++++++-------
> >> > > >  1 file changed, 18 insertions(+), 9 deletions(-)
> >> > > >
> >> > > > diff --git
> a/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
> b/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
> >> > > > index 3631a918b0c..0ca7a22b45b 100644
> >> > > > ---
> a/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
> >> > > > +++
> b/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
> >> > > > @@ -1,4 +1,4 @@
> >> > > > -From 865762e0a767a121206d818bdd58301afbf30104 Mon Sep 17
> 00:00:00 2001
> >> > > > +From c8e9776abc3dfd3f2411797a90a03e7fa16263ef Mon Sep 17
> 00:00:00 2001
> >> > > >  From: Khem Raj <raj.khem@gmail.com>
> >> > > >  Date: Fri, 23 Jun 2023 01:20:38 -0700
> >> > > >  Subject: [PATCH] gallium: Fix build with llvm 17
> >> > > > @@ -10,14 +10,12 @@ so add conditions to exclude them for llvm >=
> 17
> >> > > >  Upstream-Status: Submitted [
> https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23827]
> >> > > >  Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >> > > >  ---
> >> > > > - src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 +++-
> >> > > > - 1 file changed, 3 insertions(+), 1 deletion(-)
> >> > > > + src/gallium/auxiliary/gallivm/lp_bld_init.c | 6 ++++--
> >> > > > + 1 file changed, 4 insertions(+), 2 deletions(-)
> >> > > >
> >> > > > -diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c
> b/src/gallium/auxiliary/gallivm/lp_bld_init.c
> >> > > > -index 24d0823..3d4573e 100644
> >> > > >  --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
> >> > > >  +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
> >> > > > -@@ -42,8 +42,10 @@
> >> > > > +@@ -42,19 +42,23 @@
> >> > > >
> >> > > >   #include <llvm/Config/llvm-config.h>
> >> > > >   #include <llvm-c/Analysis.h>
> >> > > > @@ -29,6 +27,17 @@ index 24d0823..3d4573e 100644
> >> > > >   #include <llvm-c/Transforms/Utils.h>
> >> > > >   #endif
> >> > > >   #include <llvm-c/BitWriter.h>
> >> > > > ---
> >> > > > -2.41.0
> >> > > > -
> >> > > > + #if GALLIVM_USE_NEW_PASS == 1
> >> > > > + #include <llvm-c/Transforms/PassBuilder.h>
> >> > > > +-#elif GALLIVM_HAVE_CORO == 1
> >> > > > ++#elif GALLIVM_HAVE_CORO == 1 && LLVM_VERSION_MAJOR < 17
> >> > > > + #if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 ||
> DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64)
> >> > > > + #include <llvm-c/Transforms/IPO.h>
> >> > > > + #endif
> >> > > > ++#if LLVM_VERSION_MAJOR < 17
> >> > > > + #include <llvm-c/Transforms/Coroutines.h>
> >> > > > + #endif
> >> > > > ++#endif
> >> > > > +
> >> > > > + unsigned gallivm_perf = 0;
> >> > > > +
> >> > >
> >> > > I think this patch may have broken against with the recent llvm
> point
> >> > > release?
> >> > >
> >> > > DEBUG: Executing shell function do_compile
> >> > >
> >> > > [1/33]
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/bin/python3-native/python3
> ../mesa-23.1.8/bin/git_sha1_gen.py --output src/git_sha1.h
> >> > > [2/13] g++  -o src/gallium/targets/dri/libgallium_dri.so
> src/gallium/targets/dri/libgallium_dri.so.p/target.c.o
> -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib
> -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib
> -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group
> -Wl,-soname,libgallium_dri.so -Wl,--enable-new-dtags
> -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib
> -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib
> -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib
> -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib
> -Wl,-O1 -Wl,--allow-shlib-undefined
> -Wl,--dynamic-linker=/srv/build/ttorling/workspace-upgrades/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2
> '-Wl,-rpath,$ORIGIN/../../../mapi/shared-glapi:/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib'
> -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/build/src/mapi/shared-glapi
> -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib
> src/gallium/frontends/dri/libdri.a src/util/libmesa_util.a
> src/util/format/libmesa_format.a src/util/libmesa_util_sse41.a
> src/c11/impl/libmesa_util_c11.a src/mesa/libmesa.a
> src/compiler/glsl/libglsl.a src/compiler/glsl/glcpp/libglcpp.a
> src/compiler/nir/libnir.a src/compiler/libcompiler.a
> src/mesa/libmesa_sse41.a src/gallium/auxiliary/libgalliumvl.a
> src/gallium/auxiliary/libgallium.a src/mapi/shared-glapi/libglapi.so.0.0.0
> src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a
> src/loader/libloader.a src/util/libxmlconfig.a
> src/gallium/winsys/sw/null/libws_null.a
> src/gallium/winsys/sw/wrapper/libwsw.a src/gallium/winsys/sw/dri/libswdri.a
> src/gallium/winsys/sw/kms-dri/libswkmsdri.a
> src/gallium/drivers/llvmpipe/libllvmpipe.a
> src/gallium/drivers/softpipe/libsoftpipe.a
> src/gallium/drivers/r300/libr300.a
> src/gallium/winsys/radeon/drm/libradeonwinsys.a
> src/gallium/drivers/r600/libr600.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx6.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx7.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx8.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx9.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx10.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx103.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx11.a
> src/gallium/drivers/radeonsi/libradeonsi.a
> src/gallium/winsys/amdgpu/drm/libamdgpuwinsys.a
> src/amd/addrlib/libaddrlib.a src/amd/common/libamd_common.a
> src/amd/llvm/libamd_common_llvm.a
> src/gallium/winsys/nouveau/drm/libnouveauwinsys.a
> src/nouveau/codegen/libnouveau_codegen.a
> src/gallium/drivers/nouveau/libnouveau.a src/gallium/drivers/i915/libi915.a
> src/gallium/winsys/i915/drm/libi915drm.a src/intel/common/libintel_common.a
> src/intel/isl/libisl.a src/intel/isl/libisl_per_hw_ver40.a
> src/intel/dev/libintel_dev.a src/intel/isl/libisl_per_hw_ver50.a
> src/intel/isl/libisl_per_hw_ver60.a src/intel/isl/libisl_per_hw_ver70.a
> src/intel/isl/libisl_per_hw_ver75.a src/intel/isl/libisl_per_hw_ver80.a
> src/intel/isl/libisl_per_hw_ver90.a src/intel/isl/libisl_per_hw_ver110.a
> src/intel/isl/libisl_per_hw_ver120.a src/intel/isl/libisl_per_hw_ver125.a
> src/intel/isl/libisl_tiled_memcpy.a
> src/intel/isl/libisl_tiled_memcpy_sse41.a
> src/gallium/drivers/svga/libsvga.a src/gallium/winsys/svga/drm/libsvgadrm.a
> src/gallium/drivers/virgl/libvirgl.a
> src/gallium/winsys/virgl/drm/libvirgldrm.a
> src/gallium/winsys/virgl/common/libvirglcommon.a
> src/gallium/winsys/virgl/vtest/libvirglvtest.a
> src/gallium/drivers/iris/libiris.a
> src/gallium/drivers/iris/libiris_per_hw_ver80.a
> src/gallium/drivers/iris/libiris_per_hw_ver90.a
> src/gallium/drivers/iris/libiris_per_hw_ver110.a
> src/gallium/drivers/iris/libiris_per_hw_ver120.a
> src/gallium/drivers/iris/libiris_per_hw_ver125.a
> src/intel/compiler/libintel_compiler.a src/intel/blorp/libblorp.a
> src/intel/perf/libintel_perf.a src/intel/ds/libintel-driver-ds.a
> src/gallium/winsys/iris/drm/libiriswinsys.a
> src/gallium/drivers/crocus/libcrocus.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver40.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver45.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver50.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver60.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver70.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver75.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver80.a
> src/gallium/winsys/crocus/drm/libcrocuswinsys.a -Wl,--build-id=sha1
> -Wl,--gc-sections -Wl,--version-script
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/dri.sym
> -Wl,--dynamic-list
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/../dri-vdpau.dyn
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm.so
> /usr/lib/llvm-14/lib/libLLVM-14.so.1 -pthread
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libexpat.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libz.so
> -lm
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libzstd.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libxcb-randr.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_radeon.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libelf.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_amdgpu.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_nouveau.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_intel.so
> -Wl,--end-group
> >> > > FAILED: src/gallium/targets/dri/libgallium_dri.so
> >> > > g++  -o src/gallium/targets/dri/libgallium_dri.so
> src/gallium/targets/dri/libgallium_dri.so.p/target.c.o
> -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib
> -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib
> -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group
> -Wl,-soname,libgallium_dri.so -Wl,--enable-new-dtags
> -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib
> -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib
> -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib
> -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib
> -Wl,-O1 -Wl,--allow-shlib-undefined
> -Wl,--dynamic-linker=/srv/build/ttorling/workspace-upgrades/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2
> '-Wl,-rpath,$ORIGIN/../../../mapi/shared-glapi:/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib'
> -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/build/src/mapi/shared-glapi
> -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib
> src/gallium/frontends/dri/libdri.a src/util/libmesa_util.a
> src/util/format/libmesa_format.a src/util/libmesa_util_sse41.a
> src/c11/impl/libmesa_util_c11.a src/mesa/libmesa.a
> src/compiler/glsl/libglsl.a src/compiler/glsl/glcpp/libglcpp.a
> src/compiler/nir/libnir.a src/compiler/libcompiler.a
> src/mesa/libmesa_sse41.a src/gallium/auxiliary/libgalliumvl.a
> src/gallium/auxiliary/libgallium.a src/mapi/shared-glapi/libglapi.so.0.0.0
> src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a
> src/loader/libloader.a src/util/libxmlconfig.a
> src/gallium/winsys/sw/null/libws_null.a
> src/gallium/winsys/sw/wrapper/libwsw.a src/gallium/winsys/sw/dri/libswdri.a
> src/gallium/winsys/sw/kms-dri/libswkmsdri.a
> src/gallium/drivers/llvmpipe/libllvmpipe.a
> src/gallium/drivers/softpipe/libsoftpipe.a
> src/gallium/drivers/r300/libr300.a
> src/gallium/winsys/radeon/drm/libradeonwinsys.a
> src/gallium/drivers/r600/libr600.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx6.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx7.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx8.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx9.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx10.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx103.a
> src/gallium/drivers/radeonsi/libradeonsi_gfx11.a
> src/gallium/drivers/radeonsi/libradeonsi.a
> src/gallium/winsys/amdgpu/drm/libamdgpuwinsys.a
> src/amd/addrlib/libaddrlib.a src/amd/common/libamd_common.a
> src/amd/llvm/libamd_common_llvm.a
> src/gallium/winsys/nouveau/drm/libnouveauwinsys.a
> src/nouveau/codegen/libnouveau_codegen.a
> src/gallium/drivers/nouveau/libnouveau.a src/gallium/drivers/i915/libi915.a
> src/gallium/winsys/i915/drm/libi915drm.a src/intel/common/libintel_common.a
> src/intel/isl/libisl.a src/intel/isl/libisl_per_hw_ver40.a
> src/intel/dev/libintel_dev.a src/intel/isl/libisl_per_hw_ver50.a
> src/intel/isl/libisl_per_hw_ver60.a src/intel/isl/libisl_per_hw_ver70.a
> src/intel/isl/libisl_per_hw_ver75.a src/intel/isl/libisl_per_hw_ver80.a
> src/intel/isl/libisl_per_hw_ver90.a src/intel/isl/libisl_per_hw_ver110.a
> src/intel/isl/libisl_per_hw_ver120.a src/intel/isl/libisl_per_hw_ver125.a
> src/intel/isl/libisl_tiled_memcpy.a
> src/intel/isl/libisl_tiled_memcpy_sse41.a
> src/gallium/drivers/svga/libsvga.a src/gallium/winsys/svga/drm/libsvgadrm.a
> src/gallium/drivers/virgl/libvirgl.a
> src/gallium/winsys/virgl/drm/libvirgldrm.a
> src/gallium/winsys/virgl/common/libvirglcommon.a
> src/gallium/winsys/virgl/vtest/libvirglvtest.a
> src/gallium/drivers/iris/libiris.a
> src/gallium/drivers/iris/libiris_per_hw_ver80.a
> src/gallium/drivers/iris/libiris_per_hw_ver90.a
> src/gallium/drivers/iris/libiris_per_hw_ver110.a
> src/gallium/drivers/iris/libiris_per_hw_ver120.a
> src/gallium/drivers/iris/libiris_per_hw_ver125.a
> src/intel/compiler/libintel_compiler.a src/intel/blorp/libblorp.a
> src/intel/perf/libintel_perf.a src/intel/ds/libintel-driver-ds.a
> src/gallium/winsys/iris/drm/libiriswinsys.a
> src/gallium/drivers/crocus/libcrocus.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver40.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver45.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver50.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver60.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver70.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver75.a
> src/gallium/drivers/crocus/libcrocus_per_hw_ver80.a
> src/gallium/winsys/crocus/drm/libcrocuswinsys.a -Wl,--build-id=sha1
> -Wl,--gc-sections -Wl,--version-script
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/dri.sym
> -Wl,--dynamic-list
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/../dri-vdpau.dyn
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm.so
> /usr/lib/llvm-14/lib/libLLVM-14.so.1 -pthread
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libexpat.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libz.so
> -lm
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libzstd.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libxcb-randr.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_radeon.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libelf.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_amdgpu.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_nouveau.so
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_intel.so
> -Wl,--end-group
> >> > > /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld:
> src/gallium/auxiliary/libgallium.a.p/gallivm_lp_bld_misc.cpp.o: in function
> `llvm::SmallVectorTemplateBase<std::__cxx11::basic_string<char,
> std::char_traits<char>, std::allocator<char> >, false>::grow(unsigned
> long)':
> >> > >
> lp_bld_misc.cpp:(.text._ZN4llvm23SmallVectorTemplateBaseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0EE4growEm[_ZN4llvm23SmallVectorTemplateBaseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0EE4growEm]+0x36):
> undefined reference to `llvm::SmallVectorBase<unsigned
> int>::mallocForGrow(void*, unsigned long, unsigned long, unsigned long&)'
> >> > > /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld:
> src/amd/llvm/libamd_common_llvm.a.p/ac_llvm_helper.cpp.o: in function
> `llvm::DataLayout::getTypeSizeInBits(llvm::Type*) const':
> >> > >
> ac_llvm_helper.cpp:(.text._ZNK4llvm10DataLayout17getTypeSizeInBitsEPNS_4TypeE[_ZNK4llvm10DataLayout17getTypeSizeInBitsEPNS_4TypeE]+0xa4):
> undefined reference to `llvm::TargetExtType::getLayoutType() const'
> >> > > /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld:
> src/amd/llvm/libamd_common_llvm.a.p/ac_llvm_helper.cpp.o: in function
> `ac_create_passmgr':
> >> > > ac_llvm_helper.cpp:(.text.ac_create_passmgr+0x8c): undefined
> reference to `llvm::createPromoteMemoryToRegisterPass(bool)'
> >> > > /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld:
> ac_llvm_helper.cpp:(.text.ac_create_passmgr+0xa6): undefined reference to
> `llvm::createSROAPass(bool)'
> >> > > collect2: error: ld returned 1 exit status
> >> > > ninja: build stopped: subcommand failed.
> >> > > INFO: autodetecting backend as ninja
> >> > > INFO: calculating backend command to run:
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/bin/ninja
> -j 24 -v
> >> > > WARNING:
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760:155
> exit 1 from 'meson compile -v -j 24'
> >> > > WARNING: Backtrace (BB generated script):
> >> > >         #1: meson_do_compile,
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760,
> line 155
> >> > >         #2: do_compile,
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760,
> line 150
> >> > >         #3: main,
> /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760,
> line 159
> >> > >
> >> > > (log borrowed from Tim but I'm seeing a similar issue)
> >> > >
> >> > > Cheers,
> >> > >
> >> > > Richard
> >>
> >> -=-=-=-=-=-=-=-=-=-=-=-
> >> Links: You receive all messages sent to this group.
> >> View/Reply Online (#188379):
> https://lists.openembedded.org/g/openembedded-core/message/188379
> >> Mute This Topic: https://lists.openembedded.org/mt/101524707/924729
> >> Group Owner: openembedded-core+owner@lists.openembedded.org
> >> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> ticotimo@gmail.com]
> >> -=-=-=-=-=-=-=-=-=-=-=-
> >>
>
Khem Raj Sept. 28, 2023, 11:04 p.m. UTC | #7
On Thu, Sep 28, 2023 at 4:00 PM Tim Orling <ticotimo@gmail.com> wrote:
>
>
>
> On Thu, Sep 28, 2023 at 3:55 PM Khem Raj <raj.khem@gmail.com> wrote:
>>
>> On Thu, Sep 28, 2023 at 2:46 PM Tim Orling <ticotimo@gmail.com> wrote:
>> >
>> >
>> >
>> > On Thu, Sep 28, 2023 at 1:34 PM Khem Raj <raj.khem@gmail.com> wrote:
>> >>
>> >> Can you check if the machines where it fails has llvm-14-dev package
>> >> installed on host ?
>> >>
>> >
>> > In my case, yes. llvm-14-dev 1:14.0.0-1ubuntu1.1
>>
>> yeah, this will expose the problem I guess that mesa/meson build files
>> have logic for detecting llvm dependency uses cmake and how meson
>> does this is by generating intermediate native file and ignoring
>> llvm-config setting that OE has passed via meson.native file and finds
>> one in
>> /usr/bin and thats where the slippery slope starts.
>>
>> I am sure if you uninstall llvm-14-dev from your build host then it
>> will start to work. I am looking into a patch to contain it meanwhile.
>>
>
> Confirmed "fix". I don't remember why I have llvm-14-dev installed to begin with so buh-bye

Well, it atleast exposed a bug in mesa build. I have sent a patch to
fix that. before you punt it
give it a shot with llvm-14-dev installed on your system and see if
this also fixes the issue.

Keep llvm around, its nice :)

>
>>
>> >
>> >>
>> >> On Thu, Sep 28, 2023 at 9:55 AM Khem Raj <raj.khem@gmail.com> wrote:
>> >> >
>> >> > its linking with  /usr/lib/llvm-14/lib/libLLVM-14.so.1 which is not
>> >> > correct. Somehow its finding llvm library on your build host.
>> >> >
>> >> > On Thu, Sep 28, 2023 at 8:25 AM Richard Purdie
>> >> > <richard.purdie@linuxfoundation.org> wrote:
>> >> > >
>> >> > > On Fri, 2023-09-22 at 09:37 -0700, Khem Raj wrote:
>> >> > > > Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> >> > > > ---
>> >> > > >  .../0001-gallium-Fix-build-with-llvm-17.patch | 27 ++++++++++++-------
>> >> > > >  1 file changed, 18 insertions(+), 9 deletions(-)
>> >> > > >
>> >> > > > diff --git a/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch b/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
>> >> > > > index 3631a918b0c..0ca7a22b45b 100644
>> >> > > > --- a/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
>> >> > > > +++ b/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
>> >> > > > @@ -1,4 +1,4 @@
>> >> > > > -From 865762e0a767a121206d818bdd58301afbf30104 Mon Sep 17 00:00:00 2001
>> >> > > > +From c8e9776abc3dfd3f2411797a90a03e7fa16263ef Mon Sep 17 00:00:00 2001
>> >> > > >  From: Khem Raj <raj.khem@gmail.com>
>> >> > > >  Date: Fri, 23 Jun 2023 01:20:38 -0700
>> >> > > >  Subject: [PATCH] gallium: Fix build with llvm 17
>> >> > > > @@ -10,14 +10,12 @@ so add conditions to exclude them for llvm >= 17
>> >> > > >  Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23827]
>> >> > > >  Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> >> > > >  ---
>> >> > > > - src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 +++-
>> >> > > > - 1 file changed, 3 insertions(+), 1 deletion(-)
>> >> > > > + src/gallium/auxiliary/gallivm/lp_bld_init.c | 6 ++++--
>> >> > > > + 1 file changed, 4 insertions(+), 2 deletions(-)
>> >> > > >
>> >> > > > -diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
>> >> > > > -index 24d0823..3d4573e 100644
>> >> > > >  --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
>> >> > > >  +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
>> >> > > > -@@ -42,8 +42,10 @@
>> >> > > > +@@ -42,19 +42,23 @@
>> >> > > >
>> >> > > >   #include <llvm/Config/llvm-config.h>
>> >> > > >   #include <llvm-c/Analysis.h>
>> >> > > > @@ -29,6 +27,17 @@ index 24d0823..3d4573e 100644
>> >> > > >   #include <llvm-c/Transforms/Utils.h>
>> >> > > >   #endif
>> >> > > >   #include <llvm-c/BitWriter.h>
>> >> > > > ---
>> >> > > > -2.41.0
>> >> > > > -
>> >> > > > + #if GALLIVM_USE_NEW_PASS == 1
>> >> > > > + #include <llvm-c/Transforms/PassBuilder.h>
>> >> > > > +-#elif GALLIVM_HAVE_CORO == 1
>> >> > > > ++#elif GALLIVM_HAVE_CORO == 1 && LLVM_VERSION_MAJOR < 17
>> >> > > > + #if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64)
>> >> > > > + #include <llvm-c/Transforms/IPO.h>
>> >> > > > + #endif
>> >> > > > ++#if LLVM_VERSION_MAJOR < 17
>> >> > > > + #include <llvm-c/Transforms/Coroutines.h>
>> >> > > > + #endif
>> >> > > > ++#endif
>> >> > > > +
>> >> > > > + unsigned gallivm_perf = 0;
>> >> > > > +
>> >> > >
>> >> > > I think this patch may have broken against with the recent llvm point
>> >> > > release?
>> >> > >
>> >> > > DEBUG: Executing shell function do_compile
>> >> > >
>> >> > > [1/33] /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/bin/python3-native/python3 ../mesa-23.1.8/bin/git_sha1_gen.py --output src/git_sha1.h
>> >> > > [2/13] g++  -o src/gallium/targets/dri/libgallium_dri.so src/gallium/targets/dri/libgallium_dri.so.p/target.c.o -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libgallium_dri.so -Wl,--enable-new-dtags -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/srv/build/ttorling/workspace-upgrades/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 '-Wl,-rpath,$ORIGIN/../../../mapi/shared-glapi:/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib' -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/build/src/mapi/shared-glapi -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib src/gallium/frontends/dri/libdri.a src/util/libmesa_util.a src/util/format/libmesa_format.a src/util/libmesa_util_sse41.a src/c11/impl/libmesa_util_c11.a src/mesa/libmesa.a src/compiler/glsl/libglsl.a src/compiler/glsl/glcpp/libglcpp.a src/compiler/nir/libnir.a src/compiler/libcompiler.a src/mesa/libmesa_sse41.a src/gallium/auxiliary/libgalliumvl.a src/gallium/auxiliary/libgallium.a src/mapi/shared-glapi/libglapi.so.0.0.0 src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a src/loader/libloader.a src/util/libxmlconfig.a src/gallium/winsys/sw/null/libws_null.a src/gallium/winsys/sw/wrapper/libwsw.a src/gallium/winsys/sw/dri/libswdri.a src/gallium/winsys/sw/kms-dri/libswkmsdri.a src/gallium/drivers/llvmpipe/libllvmpipe.a src/gallium/drivers/softpipe/libsoftpipe.a src/gallium/drivers/r300/libr300.a src/gallium/winsys/radeon/drm/libradeonwinsys.a src/gallium/drivers/r600/libr600.a src/gallium/drivers/radeonsi/libradeonsi_gfx6.a src/gallium/drivers/radeonsi/libradeonsi_gfx7.a src/gallium/drivers/radeonsi/libradeonsi_gfx8.a src/gallium/drivers/radeonsi/libradeonsi_gfx9.a src/gallium/drivers/radeonsi/libradeonsi_gfx10.a src/gallium/drivers/radeonsi/libradeonsi_gfx103.a src/gallium/drivers/radeonsi/libradeonsi_gfx11.a src/gallium/drivers/radeonsi/libradeonsi.a src/gallium/winsys/amdgpu/drm/libamdgpuwinsys.a src/amd/addrlib/libaddrlib.a src/amd/common/libamd_common.a src/amd/llvm/libamd_common_llvm.a src/gallium/winsys/nouveau/drm/libnouveauwinsys.a src/nouveau/codegen/libnouveau_codegen.a src/gallium/drivers/nouveau/libnouveau.a src/gallium/drivers/i915/libi915.a src/gallium/winsys/i915/drm/libi915drm.a src/intel/common/libintel_common.a src/intel/isl/libisl.a src/intel/isl/libisl_per_hw_ver40.a src/intel/dev/libintel_dev.a src/intel/isl/libisl_per_hw_ver50.a src/intel/isl/libisl_per_hw_ver60.a src/intel/isl/libisl_per_hw_ver70.a src/intel/isl/libisl_per_hw_ver75.a src/intel/isl/libisl_per_hw_ver80.a src/intel/isl/libisl_per_hw_ver90.a src/intel/isl/libisl_per_hw_ver110.a src/intel/isl/libisl_per_hw_ver120.a src/intel/isl/libisl_per_hw_ver125.a src/intel/isl/libisl_tiled_memcpy.a src/intel/isl/libisl_tiled_memcpy_sse41.a src/gallium/drivers/svga/libsvga.a src/gallium/winsys/svga/drm/libsvgadrm.a src/gallium/drivers/virgl/libvirgl.a src/gallium/winsys/virgl/drm/libvirgldrm.a src/gallium/winsys/virgl/common/libvirglcommon.a src/gallium/winsys/virgl/vtest/libvirglvtest.a src/gallium/drivers/iris/libiris.a src/gallium/drivers/iris/libiris_per_hw_ver80.a src/gallium/drivers/iris/libiris_per_hw_ver90.a src/gallium/drivers/iris/libiris_per_hw_ver110.a src/gallium/drivers/iris/libiris_per_hw_ver120.a src/gallium/drivers/iris/libiris_per_hw_ver125.a src/intel/compiler/libintel_compiler.a src/intel/blorp/libblorp.a src/intel/perf/libintel_perf.a src/intel/ds/libintel-driver-ds.a src/gallium/winsys/iris/drm/libiriswinsys.a src/gallium/drivers/crocus/libcrocus.a src/gallium/drivers/crocus/libcrocus_per_hw_ver40.a src/gallium/drivers/crocus/libcrocus_per_hw_ver45.a src/gallium/drivers/crocus/libcrocus_per_hw_ver50.a src/gallium/drivers/crocus/libcrocus_per_hw_ver60.a src/gallium/drivers/crocus/libcrocus_per_hw_ver70.a src/gallium/drivers/crocus/libcrocus_per_hw_ver75.a src/gallium/drivers/crocus/libcrocus_per_hw_ver80.a src/gallium/winsys/crocus/drm/libcrocuswinsys.a -Wl,--build-id=sha1 -Wl,--gc-sections -Wl,--version-script /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/dri.sym -Wl,--dynamic-list /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/../dri-vdpau.dyn /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm.so /usr/lib/llvm-14/lib/libLLVM-14.so.1 -pthread /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libexpat.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libz.so -lm /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libzstd.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libxcb-randr.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_radeon.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libelf.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_amdgpu.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_nouveau.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_intel.so -Wl,--end-group
>> >> > > FAILED: src/gallium/targets/dri/libgallium_dri.so
>> >> > > g++  -o src/gallium/targets/dri/libgallium_dri.so src/gallium/targets/dri/libgallium_dri.so.p/target.c.o -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -L/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libgallium_dri.so -Wl,--enable-new-dtags -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib -Wl,-rpath,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/srv/build/ttorling/workspace-upgrades/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 '-Wl,-rpath,$ORIGIN/../../../mapi/shared-glapi:/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib' -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/build/src/mapi/shared-glapi -Wl,-rpath-link,/srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib src/gallium/frontends/dri/libdri.a src/util/libmesa_util.a src/util/format/libmesa_format.a src/util/libmesa_util_sse41.a src/c11/impl/libmesa_util_c11.a src/mesa/libmesa.a src/compiler/glsl/libglsl.a src/compiler/glsl/glcpp/libglcpp.a src/compiler/nir/libnir.a src/compiler/libcompiler.a src/mesa/libmesa_sse41.a src/gallium/auxiliary/libgalliumvl.a src/gallium/auxiliary/libgallium.a src/mapi/shared-glapi/libglapi.so.0.0.0 src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a src/loader/libloader.a src/util/libxmlconfig.a src/gallium/winsys/sw/null/libws_null.a src/gallium/winsys/sw/wrapper/libwsw.a src/gallium/winsys/sw/dri/libswdri.a src/gallium/winsys/sw/kms-dri/libswkmsdri.a src/gallium/drivers/llvmpipe/libllvmpipe.a src/gallium/drivers/softpipe/libsoftpipe.a src/gallium/drivers/r300/libr300.a src/gallium/winsys/radeon/drm/libradeonwinsys.a src/gallium/drivers/r600/libr600.a src/gallium/drivers/radeonsi/libradeonsi_gfx6.a src/gallium/drivers/radeonsi/libradeonsi_gfx7.a src/gallium/drivers/radeonsi/libradeonsi_gfx8.a src/gallium/drivers/radeonsi/libradeonsi_gfx9.a src/gallium/drivers/radeonsi/libradeonsi_gfx10.a src/gallium/drivers/radeonsi/libradeonsi_gfx103.a src/gallium/drivers/radeonsi/libradeonsi_gfx11.a src/gallium/drivers/radeonsi/libradeonsi.a src/gallium/winsys/amdgpu/drm/libamdgpuwinsys.a src/amd/addrlib/libaddrlib.a src/amd/common/libamd_common.a src/amd/llvm/libamd_common_llvm.a src/gallium/winsys/nouveau/drm/libnouveauwinsys.a src/nouveau/codegen/libnouveau_codegen.a src/gallium/drivers/nouveau/libnouveau.a src/gallium/drivers/i915/libi915.a src/gallium/winsys/i915/drm/libi915drm.a src/intel/common/libintel_common.a src/intel/isl/libisl.a src/intel/isl/libisl_per_hw_ver40.a src/intel/dev/libintel_dev.a src/intel/isl/libisl_per_hw_ver50.a src/intel/isl/libisl_per_hw_ver60.a src/intel/isl/libisl_per_hw_ver70.a src/intel/isl/libisl_per_hw_ver75.a src/intel/isl/libisl_per_hw_ver80.a src/intel/isl/libisl_per_hw_ver90.a src/intel/isl/libisl_per_hw_ver110.a src/intel/isl/libisl_per_hw_ver120.a src/intel/isl/libisl_per_hw_ver125.a src/intel/isl/libisl_tiled_memcpy.a src/intel/isl/libisl_tiled_memcpy_sse41.a src/gallium/drivers/svga/libsvga.a src/gallium/winsys/svga/drm/libsvgadrm.a src/gallium/drivers/virgl/libvirgl.a src/gallium/winsys/virgl/drm/libvirgldrm.a src/gallium/winsys/virgl/common/libvirglcommon.a src/gallium/winsys/virgl/vtest/libvirglvtest.a src/gallium/drivers/iris/libiris.a src/gallium/drivers/iris/libiris_per_hw_ver80.a src/gallium/drivers/iris/libiris_per_hw_ver90.a src/gallium/drivers/iris/libiris_per_hw_ver110.a src/gallium/drivers/iris/libiris_per_hw_ver120.a src/gallium/drivers/iris/libiris_per_hw_ver125.a src/intel/compiler/libintel_compiler.a src/intel/blorp/libblorp.a src/intel/perf/libintel_perf.a src/intel/ds/libintel-driver-ds.a src/gallium/winsys/iris/drm/libiriswinsys.a src/gallium/drivers/crocus/libcrocus.a src/gallium/drivers/crocus/libcrocus_per_hw_ver40.a src/gallium/drivers/crocus/libcrocus_per_hw_ver45.a src/gallium/drivers/crocus/libcrocus_per_hw_ver50.a src/gallium/drivers/crocus/libcrocus_per_hw_ver60.a src/gallium/drivers/crocus/libcrocus_per_hw_ver70.a src/gallium/drivers/crocus/libcrocus_per_hw_ver75.a src/gallium/drivers/crocus/libcrocus_per_hw_ver80.a src/gallium/winsys/crocus/drm/libcrocuswinsys.a -Wl,--build-id=sha1 -Wl,--gc-sections -Wl,--version-script /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/dri.sym -Wl,--dynamic-list /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/mesa-23.1.8/src/gallium/targets/dri/../dri-vdpau.dyn /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm.so /usr/lib/llvm-14/lib/libLLVM-14.so.1 -pthread /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libexpat.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libz.so -lm /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libzstd.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libxcb-randr.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_radeon.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libelf.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_amdgpu.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_nouveau.so /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libdrm_intel.so -Wl,--end-group
>> >> > > /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld: src/gallium/auxiliary/libgallium.a.p/gallivm_lp_bld_misc.cpp.o: in function `llvm::SmallVectorTemplateBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false>::grow(unsigned long)':
>> >> > > lp_bld_misc.cpp:(.text._ZN4llvm23SmallVectorTemplateBaseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0EE4growEm[_ZN4llvm23SmallVectorTemplateBaseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0EE4growEm]+0x36): undefined reference to `llvm::SmallVectorBase<unsigned int>::mallocForGrow(void*, unsigned long, unsigned long, unsigned long&)'
>> >> > > /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld: src/amd/llvm/libamd_common_llvm.a.p/ac_llvm_helper.cpp.o: in function `llvm::DataLayout::getTypeSizeInBits(llvm::Type*) const':
>> >> > > ac_llvm_helper.cpp:(.text._ZNK4llvm10DataLayout17getTypeSizeInBitsEPNS_4TypeE[_ZNK4llvm10DataLayout17getTypeSizeInBitsEPNS_4TypeE]+0xa4): undefined reference to `llvm::TargetExtType::getLayoutType() const'
>> >> > > /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld: src/amd/llvm/libamd_common_llvm.a.p/ac_llvm_helper.cpp.o: in function `ac_create_passmgr':
>> >> > > ac_llvm_helper.cpp:(.text.ac_create_passmgr+0x8c): undefined reference to `llvm::createPromoteMemoryToRegisterPass(bool)'
>> >> > > /srv/build/ttorling/workspace-upgrades/build/tmp/hosttools/ld: ac_llvm_helper.cpp:(.text.ac_create_passmgr+0xa6): undefined reference to `llvm::createSROAPass(bool)'
>> >> > > collect2: error: ld returned 1 exit status
>> >> > > ninja: build stopped: subcommand failed.
>> >> > > INFO: autodetecting backend as ninja
>> >> > > INFO: calculating backend command to run: /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/recipe-sysroot-native/usr/bin/ninja -j 24 -v
>> >> > > WARNING: /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760:155 exit 1 from 'meson compile -v -j 24'
>> >> > > WARNING: Backtrace (BB generated script):
>> >> > >         #1: meson_do_compile, /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760, line 155
>> >> > >         #2: do_compile, /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760, line 150
>> >> > >         #3: main, /srv/build/ttorling/workspace-upgrades/build/tmp/work/x86_64-linux/mesa-native/23.1.8/temp/run.do_compile.3996760, line 159
>> >> > >
>> >> > > (log borrowed from Tim but I'm seeing a similar issue)
>> >> > >
>> >> > > Cheers,
>> >> > >
>> >> > > Richard
>> >>
>> >> -=-=-=-=-=-=-=-=-=-=-=-
>> >> Links: You receive all messages sent to this group.
>> >> View/Reply Online (#188379): https://lists.openembedded.org/g/openembedded-core/message/188379
>> >> Mute This Topic: https://lists.openembedded.org/mt/101524707/924729
>> >> Group Owner: openembedded-core+owner@lists.openembedded.org
>> >> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ticotimo@gmail.com]
>> >> -=-=-=-=-=-=-=-=-=-=-=-
>> >>
diff mbox series

Patch

diff --git a/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch b/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
index 3631a918b0c..0ca7a22b45b 100644
--- a/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
+++ b/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
@@ -1,4 +1,4 @@ 
-From 865762e0a767a121206d818bdd58301afbf30104 Mon Sep 17 00:00:00 2001
+From c8e9776abc3dfd3f2411797a90a03e7fa16263ef Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 23 Jun 2023 01:20:38 -0700
 Subject: [PATCH] gallium: Fix build with llvm 17
@@ -10,14 +10,12 @@  so add conditions to exclude them for llvm >= 17
 Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23827]
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
- src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
+ src/gallium/auxiliary/gallivm/lp_bld_init.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
 
-diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
-index 24d0823..3d4573e 100644
 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
 +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
-@@ -42,8 +42,10 @@
+@@ -42,19 +42,23 @@
  
  #include <llvm/Config/llvm-config.h>
  #include <llvm-c/Analysis.h>
@@ -29,6 +27,17 @@  index 24d0823..3d4573e 100644
  #include <llvm-c/Transforms/Utils.h>
  #endif
  #include <llvm-c/BitWriter.h>
--- 
-2.41.0
-
+ #if GALLIVM_USE_NEW_PASS == 1
+ #include <llvm-c/Transforms/PassBuilder.h>
+-#elif GALLIVM_HAVE_CORO == 1
++#elif GALLIVM_HAVE_CORO == 1 && LLVM_VERSION_MAJOR < 17
+ #if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64)
+ #include <llvm-c/Transforms/IPO.h>
+ #endif
++#if LLVM_VERSION_MAJOR < 17
+ #include <llvm-c/Transforms/Coroutines.h>
+ #endif
++#endif
+ 
+ unsigned gallivm_perf = 0;
+