From patchwork Thu Jun 22 01:06:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Kehayias X-Patchwork-Id: 51158 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 18F9A27BBEA; Thu, 22 Jun 2023 02:07:18 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,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 9347327BBE2 for ; Thu, 22 Jun 2023 02:07:16 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qC8mu-00037l-Lu; Wed, 21 Jun 2023 21:07:04 -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 ) id 1qC8mt-00037Z-5f for guix-patches@gnu.org; Wed, 21 Jun 2023 21:07:03 -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 ) id 1qC8ms-0004fh-TV for guix-patches@gnu.org; Wed, 21 Jun 2023 21:07:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qC8ms-0001Hk-7z for guix-patches@gnu.org; Wed, 21 Jun 2023 21:07:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64213] [PATCH] gnu: imgui-1.86: Fix build for mangohud. Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 22 Jun 2023 01:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64213 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64213@debbugs.gnu.org X-Debbugs-Original-To: Guix-patches Received: via spool by submit@debbugs.gnu.org id=B.16873960014905 (code B ref -1); Thu, 22 Jun 2023 01:07:01 +0000 Received: (at submit) by debbugs.gnu.org; 22 Jun 2023 01:06:41 +0000 Received: from localhost ([127.0.0.1]:34443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qC8mW-0001H3-Ot for submit@debbugs.gnu.org; Wed, 21 Jun 2023 21:06:41 -0400 Received: from lists.gnu.org ([209.51.188.17]:38610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qC8mU-0001Gu-B1 for submit@debbugs.gnu.org; Wed, 21 Jun 2023 21:06:39 -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 ) id 1qC8mP-00034v-Lc for guix-patches@gnu.org; Wed, 21 Jun 2023 21:06:33 -0400 Received: from mail-4322.protonmail.ch ([185.70.43.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qC8mL-0004Zp-5l for guix-patches@gnu.org; Wed, 21 Jun 2023 21:06:33 -0400 Date: Thu, 22 Jun 2023 01:06:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1687395979; x=1687655179; bh=0xiTgHqI6UEa2hilAjE37tQoSj38YF0/Z+gBQuAN5RU=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=q0DeOH3MdOhzL0lsVQkCnO20sBemhY/llmWF75EdchsoLdjclhVc01U+uf2wjbv/E 5HGKDwYIDaS+X4eYwOBCecavPZ++Ff8gPGAlxlzekMlxAo77cUQcY85Vuqnf5+ynID OVmQ0Sh4jCTV/b61h74Gu8WHfIMWtIfNbo8E4c+ezztcpf3P6DAkOgGL3q+GkQGzIW R6ab3wlompo105LRQSbGE0vFzvDK8fDlRLRgRBwkPwqjecpsbIVpwHcZ8v8b4WkfFw yp78WFturpFX4xdjQFN4cHMevPCrkiZu1ruX3npKDns6NGp31hgGhfNc4gmmDl4DVB PetOZzLH367mw== Message-ID: <87legcfgqm.fsf@protonmail.com> Feedback-ID: 7805494:user:proton MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.43.22; envelope-from=john.kehayias@protonmail.com; helo=mail-4322.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: John Kehayias X-ACL-Warn: , John Kehayias via Guix-patches X-Patchwork-Original-From: John Kehayias via Guix-patches via From: John Kehayias 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 Hi guix, The mangohud package was broken (corrupted display) with commit I'm not sure why that change in build option does it, but trying to run "mangohud glxgears" exits immediately with --8<---------------cut here---------------start------------->8--- ❯ guix time-machine --commit=0d5746ee7ca337dcc82553ca6dd794b04bb6563d -- shell mesa-utils mangohud -- mangohud glxgears amdgpu: unknown (family_id, chip_external_rev): (145, 1) libGL error: failed to create dri screen libGL error: failed to load driver: radeonsi amdgpu: unknown (family_id, chip_external_rev): (145, 1) libGL error: failed to create dri screen libGL error: failed to load driver: radeonsi [2023-06-21 Wed 21:01] [MANGOHUD] [info] [config.cpp:118] skipping config: '/gnu/store/25y85hj066crw9kqd4c1jlg6yifd2wiv-mesa-utils-8.4.0/bin/MangoHud.conf' [ not found ] [2023-06-21 Wed 21:01] [MANGOHUD] [info] [config.cpp:118] skipping config: '/home/john/.config/MangoHud/glxgears.conf' [ not found ] [2023-06-21 Wed 21:01] [MANGOHUD] [info] [config.cpp:118] skipping config: '/home/john/.config/MangoHud/MangoHud.conf' [ not found ] amdgpu: unknown (family_id, chip_external_rev): (145, 1) libGL error: failed to create dri screen libGL error: failed to load driver: radeonsi amdgpu: unknown (family_id, chip_external_rev): (145, 1) libGL error: failed to create dri screen libGL error: failed to load driver: radeonsi [2023-06-21 Wed 21:01] [MANGOHUD] [error] [loader_nvml.cpp:42] Failed to open 64bit libnvidia-ml.so.1: libnvidia-ml.so.1: cannot open shared object file: No such file or directory [2023-06-21 Wed 21:01] [MANGOHUD] [error] [nvml.cpp:43] Failed to load NVML [2023-06-21 Wed 21:01] [MANGOHUD] [info] [overlay.cpp:768] Uploading is disabled (permit_upload = 0) glxgears: imgui.cpp:7475: bool ImGui::DebugCheckVersionAndDataLayout(const char*, size_t, size_t, size_t, size_t, size_t, size_t): Assertion `sz_idx == sizeof(unsigned int) && "Mismatched struct layout!"' failed. --8<---------------cut here---------------end--------------->8--- The last line usually indicated a mismatch in imgui versions somewhere, but for some reason it comes from this build option. I guess mangohud somewhere assumes a different type. (All the previous lines are present when working correctly.) I've tested this builds and fixes the problem, I just didn't push it directly as I wasn't sure if there was a better way to do this change in a package inheritance. Anything clever? I would guess not since it is a custom build phase with 'invoke', but thought I'd give it a chance for any quick comments in case there's something cleaner. Thanks! John From a33c263d256dd3a1a99e41fa56ca6bc48976fa00 Mon Sep 17 00:00:00 2001 Message-Id: From: John Kehayias Date: Wed, 21 Jun 2023 20:57:10 -0400 Subject: [PATCH] gnu: imgui-1.86: Fix build for mangohud. * gnu/packages/toolkits.scm (imgui-1.86)[phases]{build}: Inherit from imgui but remove "-DImDrawIdx=unsigned int" as this breaks mangohud, the only user of this package. --- gnu/packages/toolkits.scm | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/gnu/packages/toolkits.scm b/gnu/packages/toolkits.scm index aee6c22e2d..aab9b93e52 100644 --- a/gnu/packages/toolkits.scm +++ b/gnu/packages/toolkits.scm @@ -164,4 +164,34 @@ (define-public imgui-1.86 (file-name (git-file-name name version)) (sha256 (base32 - "02a7b05zrka20jhzag2jb4jl624i1m456bsv69jb9zgys2p9dv1n")))))) + "02a7b05zrka20jhzag2jb4jl624i1m456bsv69jb9zgys2p9dv1n")))) + (arguments + (substitute-keyword-arguments (package-arguments imgui) + ((#:phases phases) + #~(modify-phases #$phases + ;; Same build phase as for imgui just without + ;; "-DImDrawIdx=unsigned int" as this breaks mangohud, + ;; the only user of this version. + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + ;; Build main library. + (apply invoke #$(cc-for-target) + "-I" (getcwd) + "-I" (search-input-directory inputs "include/freetype2") + "-g" "-O2" "-fPIC" "-shared" + "-lGL" "-lSDL2" "-lglfw" + "-o" "libimgui.so" + "imgui.cpp" + "imgui_draw.cpp" + "imgui_tables.cpp" + "imgui_widgets.cpp" + ;; Include the supported backends. + "backends/imgui_impl_glfw.cpp" + (if (file-exists? "backends/imgui_impl_sdl2.cpp") + "backends/imgui_impl_sdl2.cpp" + "backends/imgui_impl_sdl.cpp") + "backends/imgui_impl_opengl2.cpp" + "backends/imgui_impl_opengl3.cpp" + ;; Include wrappers for C++ standard library (STL) and + ;; fontconfig. + (find-files "misc" "\\.cpp$")))))))))) base-commit: dcca13ed7340f17a33a4c0907c13b64d5da66a8e -- 2.40.1