Message ID | cover.1683661648.git.simon@simonsouth.net |
---|---|
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 931A527BBED; Tue, 9 May 2023 21:45:27 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9676427BBEB for <patchwork@mira.cbaines.net>; Tue, 9 May 2023 21:45:25 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1pwUCo-0001v1-9j; Tue, 09 May 2023 16:45:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1pwUCm-0001up-1u for guix-patches@gnu.org; Tue, 09 May 2023 16:45:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1pwUCl-0007VT-NZ for guix-patches@gnu.org; Tue, 09 May 2023 16:45:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1pwUCk-0007Ch-Eh for guix-patches@gnu.org; Tue, 09 May 2023 16:45:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63400] [PATCH 0/1] gnu: vulkan-loader: Skip x86-specific tests on non-x86 platforms. Resent-From: Simon South <simon@simonsouth.net> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 09 May 2023 20:45:02 +0000 Resent-Message-ID: <handler.63400.B.168366504827605@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63400 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63400@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168366504827605 (code B ref -1); Tue, 09 May 2023 20:45:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 May 2023 20:44:08 +0000 Received: from localhost ([127.0.0.1]:44591 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1pwUBs-0007BA-25 for submit@debbugs.gnu.org; Tue, 09 May 2023 16:44:08 -0400 Received: from lists.gnu.org ([209.51.188.17]:44296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <simon@simonsouth.net>) id 1pwUBp-0007B2-UV for submit@debbugs.gnu.org; Tue, 09 May 2023 16:44:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <simon@simonsouth.net>) id 1pwUBp-0001I7-Aj for guix-patches@gnu.org; Tue, 09 May 2023 16:44:05 -0400 Received: from mailout.easymail.ca ([64.68.200.34]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <simon@simonsouth.net>) id 1pwUBn-0007PI-2r for guix-patches@gnu.org; Tue, 09 May 2023 16:44:05 -0400 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 24AAFEA3A3 for <guix-patches@gnu.org>; Tue, 9 May 2023 20:44:00 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo08-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo08-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A-8gbFV8ZCNr for <guix-patches@gnu.org>; Tue, 9 May 2023 20:43:59 +0000 (UTC) Received: from localhost.localdomain (23-233-96-72.cpe.pppoe.ca [23.233.96.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id AA7ABEA056 for <guix-patches@gnu.org>; Tue, 9 May 2023 20:43:59 +0000 (UTC) From: Simon South <simon@simonsouth.net> Date: Tue, 9 May 2023 16:43:27 -0400 Message-Id: <cover.1683661648.git.simon@simonsouth.net> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=64.68.200.34; envelope-from=simon@simonsouth.net; helo=mailout.easymail.ca X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
gnu: vulkan-loader: Skip x86-specific tests on non-x86 platforms.
|
|
Message
Simon South
May 9, 2023, 8:43 p.m. UTC
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
Comments
On Tue, May 09, 2023 at 04:43:27PM -0400, Simon South wrote: > 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 have to admit that I didn't check the bug tracker before I pushed my change (which mirrored Chris's earlier patch) to just skip the tests entirely on a bunch of architectures. > 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. Another option would be to patch the tests to look for these strings instead when we're building on those architectures. > 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. This also seems to be above-and-beyond for 5 tests out of ~400. > So I expect modifying things to make these tests work on other > platforms would be more trouble than it's worth. Having looked at these myself I agree that it's non-trivial to skip the failing tests on the other architectures. Debian, for instance, runs the tests, but if they fail ignores the outcome, and prints to the build log that 23 tests are expected to fail. > --- > > 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 > > > >
Here's a v2 of this patch (now series) that's updated to match the code in master. These changes now - Patch the vulkan-loader source to disable x86-specific tests on non-x86 platforms, - Re-enable the test suite on AArch64 (as it is now safe to do so) but - Leave tests disabled on all other non-x86 platforms. I've tested this on AArch64 and x86-64 and vulkan-loader builds correctly for me on both platforms. Thoughts? -- Simon South simon@simonsouth.net --- Simon South (2): gnu: vulkan-loader: Skip x86-specific tests on non-x86 platforms. gnu: vulkan-loader: Re-enable tests on AArch64. gnu/local.mk | 1 + ...ulkan-loader-skip-incompatible-tests.patch | 62 +++++++++++++++++++ gnu/packages/vulkan.scm | 4 +- 3 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/vulkan-loader-skip-incompatible-tests.patch base-commit: d84517805080ec51bab1921ac34c28adf3d88596