From f6b3f2bee5c1e445664fcec64c1d42a66ead2bce Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Mon, 25 Nov 2024 12:45:08 +0100 Subject: [PATCH] ci/android: fix problem with deqp version file when building for Android In commit ad42be50c91 (ci/deqp: fully isolate deqp builds, 2024-03-17) the deqp module version file was changed from something like `/deqp/version-$deqp_api` to something like `/deqp-$deqp_api/version` and this seems to cause some issues when building for Android: ----------------------------------------------------------------------- [439/1301] Building CXX object external/amber/src/src/vulkan/CMakeFiles/libamberenginevulkan.dir/blas.cc.o FAILED: external/amber/src/src/vulkan/CMakeFiles/libamberenginevulkan.dir/blas.cc.o /tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=x86_64-none-linux-android28 --sysroot=/tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DAMBER_CTS_VULKAN_HEADER=1 -DAMBER_ENABLE_CLSPV=0 -DAMBER_ENABLE_DXC=0 -DAMBER_ENABLE_LODEPNG=1 -DAMBER_ENABLE_RTTI=1 -DAMBER_ENABLE_SHADERC=0 -DAMBER_ENABLE_SPIRV_TOOLS=0 -DAMBER_ENGINE_DAWN=0 -DAMBER_ENGINE_VULKAN=1 -DDE_ANDROID_API=28 -DDE_ASSERT_FAILURE_CALLBACK -DDE_COMPILER=DE_COMPILER_CLANG -DDE_CPU=DE_CPU_X86_64 -DDE_FENV_ACCESS_ON="_Pragma(\"STDC FENV_ACCESS ON\")" -DDE_MINGW=0 -DDE_OS=DE_OS_ANDROID -DDE_PTR_SIZE=8 -I/tmp/VK-GL-CTS/external/amber/../vulkancts/framework/vulkan/generated/vulkan -I/tmp/VK-GL-CTS/framework/delibs/debase -I/tmp/VK-GL-CTS/framework/delibs/decpp -I/tmp/VK-GL-CTS/framework/delibs/depool -I/tmp/VK-GL-CTS/framework/delibs/dethread -I/tmp/VK-GL-CTS/framework/delibs/deutil -I/tmp/VK-GL-CTS/framework/delibs/destream -I/tmp/VK-GL-CTS/execserver -I/tmp/VK-GL-CTS/external/spirv-headers/src/include -I/tmp/VK-GL-CTS/external/amber/src/include -I/tmp/VK-GL-CTS/external/amber/src -I/tmp/deqp-vk -I/tmp/deqp-vk/external/vulkancts/framework/vulkan/generated/vulkan -Wall -Wextra -Wno-long-long -Wshadow -Wundef -Wconversion -Wno-sign-conversion -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -frtti -fexceptions -fwrapv -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -std=gnu++17 -fPIC -w -fno-exceptions -fvisibility=hidden -Wall -Wextra -Wno-cast-function-type-strict -Wno-padded -Wno-switch-enum -Wno-unknown-pragmas -Wno-unsafe-buffer-usage -pedantic-errors -Werror -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-format-pedantic -Wno-unknown-warning-option -Weverything -Wno-zero-as-null-pointer-constant -MD -MT external/amber/src/src/vulkan/CMakeFiles/libamberenginevulkan.dir/blas.cc.o -MF external/amber/src/src/vulkan/CMakeFiles/libamberenginevulkan.dir/blas.cc.o.d -o external/amber/src/src/vulkan/CMakeFiles/libamberenginevulkan.dir/blas.cc.o -c /tmp/VK-GL-CTS/external/amber/src/src/vulkan/blas.cc In file included from /tmp/VK-GL-CTS/external/amber/src/src/vulkan/blas.cc:16: In file included from /tmp/VK-GL-CTS/external/amber/src/src/vulkan/blas.h:19: In file included from /tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/vector:274: In file included from /tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/__bit_reference:14: In file included from /tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/bit:57: In file included from /tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/limits:105: In file included from /tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/type_traits:417: In file included from /tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/cstddef:37: /tmp/deqp-vk/version:1:1: error: unknown type name 'dEQP' dEQP base version vulkan-cts-1.3.10.0 ^ ----------------------------------------------------------------------- This seems to be caused by `cstddef` from the Android NDK which includes a file named `version`, i.e.: ----------------------------------------------------------------------- #include ----------------------------------------------------------------------- To avoid the problem also add the deqp module name to the file name, like: `/deqp-$deqp_api/deqp-$deqp_api-version`. Reviewed-by: Eric Engestrom Part-of: --- .gitlab-ci/container/build-deqp.sh | 2 +- .gitlab-ci/deqp-runner.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci/container/build-deqp.sh b/.gitlab-ci/container/build-deqp.sh index 4f3e2606033..1ff4fedabfc 100755 --- a/.gitlab-ci/container/build-deqp.sh +++ b/.gitlab-ci/container/build-deqp.sh @@ -167,7 +167,7 @@ done echo "The following local patches are applied on top:" git log --reverse --oneline "$DEQP_COMMIT".. --format='- %s' fi -} > /deqp-$deqp_api/version +} > /deqp-$deqp_api/deqp-$deqp_api-version # --insecure is due to SSL cert failures hitting sourceforge for zlib and # libpng (sigh). The archives get their checksums checked anyway, and git diff --git a/.gitlab-ci/deqp-runner.sh b/.gitlab-ci/deqp-runner.sh index 1196866e0fd..5f4dc53fd1e 100755 --- a/.gitlab-ci/deqp-runner.sh +++ b/.gitlab-ci/deqp-runner.sh @@ -110,7 +110,7 @@ uncollapsed_section_switch deqp "deqp: deqp-runner" # Print the detailed version with the list of backports and local patches { set +x; } 2>/dev/null for api in vk-main vk gl gles; do - deqp_version_log=/deqp-$api/version + deqp_version_log=/deqp-$api/deqp-$api-version if [ -r "$deqp_version_log" ]; then cat "$deqp_version_log" fi