Subject: [bug#63400] [PATCH 0/1] gnu: vulkan-loader: Skip x86-specific tests on non-x86 platforms.

From: Simon South <[email-masked]>
Date: Tue, 9 May 2023 16:43:27 -0400

This patch fixes the build of vulkan-loader on aarch64-linux by
causing five tests that require an x86 or x86-64 host to be skipped.

I've tested this change on x86-64 (to confirm the patch has no real
effect) and AArch64 and everything seems fine.

The tests that are skipped use pre-built, dummy libraries supplied in
the source package to check the loader's ability to detect a request
for a 32-bit library on a 64-bit system, and vice-versa.  This is done
by checking for a specific error message generated by a call to
dlopen().  The dummy libraries provided are built only for x86 and
x86-64, though, so on other platforms dlopen() produces a different
error ("No such file" instead of "wrong ELF class") and the tests
fail.

The source package supplies a makefile that could be used to
regenerate these dummy libraries, but as written the makefile assumes
that

  - gcc recognizes "-m32" and "-m64" options to select a target
    subarchitecture, which is true on x86 and PowerPC but not on
    AArch64 or RISC-V, for instance; and that

  - The system's linker is able to output libraries for multiple
    architectures, requiring (among other things) that multiple
    versions of glibc be available, and even using "cross-gcc" and
    "cross-libc" I haven't found a straightforward way to achieve this
    within a single package build.

So I expect modifying things to make these tests work on other
platforms would be more trouble than it's worth.

---

Simon South (1):
  gnu: vulkan-loader: Skip x86-specific tests on non-x86 platforms.

 gnu/local.mk                                  |  1 +
 ...ulkan-loader-skip-incompatible-tests.patch | 62 +++++++++++++++++++
 gnu/packages/vulkan.scm                       |  2 +
 3 files changed, 65 insertions(+)
 create mode 100644 gnu/packages/patches/vulkan-loader-skip-incompatible-tests.patch

base-commit: c1ffe2f21bd1b9ba6bd527bbabe130144a69af71
-- 
2.39.2