From 65c30f31994860cf5263853b865c8d12f2a50695 Mon Sep 17 00:00:00 2001 From: Powei Feng Date: Mon, 13 Jan 2025 15:34:42 -0800 Subject: [PATCH] renderdiff: fix llvm-18 dep problem (#8347) The public dep for mesa has moved on to beyond llvm-18, but the version we're compiling against is not supported by this change. We workaround by ensuring that the llvm dep is less than 18 but consistent with the clang version. --- test/utils/get_mesa.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/utils/get_mesa.sh b/test/utils/get_mesa.sh index 575182846d0..678753dadef 100755 --- a/test/utils/get_mesa.sh +++ b/test/utils/get_mesa.sh @@ -17,8 +17,21 @@ set -e set -x +CLANG_VERSION=`clang --version | head -n 1 | awk '{ print $4 }' | python3 -c "import sys; print(sys.stdin.read().split('.')[0])"` + sudo apt-get -y build-dep mesa +# Uninstall llvm-18 (and above) as they conflict with the mesa version we are compiling. +sudo apt -y remove llvm-18 llvm-18-* + +sudo apt -y install clang-${CLANG_VERSION} \ + libc++-${CLANG_VERSION}-dev \ + libc++abi-${CLANG_VERSION}-dev \ + llvm-${CLANG_VERSION} \ + llvm-${CLANG_VERSION}-{dev,tools,runtime} + +export CXX=`which clang++` && export CC=`which clang` + git clone https://gitlab.freedesktop.org/mesa/mesa.git pushd .