From patchwork Fri Apr 28 21:25:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Cully X-Patchwork-Id: 49663 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 9F1AA27BBE9; Fri, 28 Apr 2023 22:26:24 +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.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable 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 B652A27BBE2 for ; Fri, 28 Apr 2023 22:26:22 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1psVbP-0000jp-Tk; Fri, 28 Apr 2023 17:26:03 -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 1psVbO-0000iZ-Ew for guix-patches@gnu.org; Fri, 28 Apr 2023 17:26:02 -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 1psVbO-0004Sg-62 for guix-patches@gnu.org; Fri, 28 Apr 2023 17:26:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1psVbN-0001cA-Rv for guix-patches@gnu.org; Fri, 28 Apr 2023 17:26:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63159] [PATCH 1/2] gnu: slim: Fix build failure with GCC-11 Resent-From: Brian Cully Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 28 Apr 2023 21:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63159 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63159@debbugs.gnu.org Cc: Brian Cully X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16827171376164 (code B ref -1); Fri, 28 Apr 2023 21:26:01 +0000 Received: (at submit) by debbugs.gnu.org; 28 Apr 2023 21:25:37 +0000 Received: from localhost ([127.0.0.1]:34648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psVaz-0001bL-9v for submit@debbugs.gnu.org; Fri, 28 Apr 2023 17:25:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:52796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psVax-0001bC-LF for submit@debbugs.gnu.org; Fri, 28 Apr 2023 17:25:36 -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 1psVav-0000gG-CE for guix-patches@gnu.org; Fri, 28 Apr 2023 17:25:34 -0400 Received: from coleridge.kublai.com ([166.84.7.167] helo=mail.spork.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1psVat-0004GI-NO for guix-patches@gnu.org; Fri, 28 Apr 2023 17:25:33 -0400 Received: from psyduck.jhoto.kublai.com (ool-18b8e9e7.dyn.optonline.net [24.184.233.231]) by mail.spork.org (Postfix) with ESMTPSA id B545E923E; Fri, 28 Apr 2023 17:25:29 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=spork.org; s=dkim; t=1682717129; bh=JK2v5lzbMOFOsM77kVIx5xyomcesSxS7fJW6/Ja10go=; h=From:To:Cc:Subject:Date; b=IzksRu/HPpfzMMK9LU6i2k8ZzyzYlENWAwx+0/tJhtZfzTJQFXq5zBUmvNrITYvYn vBT2QiZkaPAU36AcMn6/KPrDYfyUdQt043JbCBTTWGhm0Jbl/VR8g3jmp8G0fKve2R Agb9qjlgGwmdTlpIqegRSU4QD3qheor5UXu9gJK0= Date: Fri, 28 Apr 2023 17:25:22 -0400 Message-Id: <70e16c55304b4235a9d72913a2c9bd8e6a3d0da0.1682717123.git.bjc@spork.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Received-SPF: pass client-ip=166.84.7.167; envelope-from=bjc@spork.org; helo=mail.spork.org 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, 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Brian Cully X-ACL-Warn: , Brian Cully via Guix-patches X-Patchwork-Original-From: Brian Cully via Guix-patches via From: Brian Cully 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 GCC-11 sniffed out a long-standing bug where a pointer was being tested for a negative value, which is impossible. Instead, check for NULL, which is how the error result is actually returned. See https://github.com/iwamatsu/slim/issues/14 for details. * gnu/packages/display-managers.scm (slim) [fix-0-pointer-comparison]: new phase --- gnu/packages/display-managers.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm index b0d388f1bc..c1a08e8553 100644 --- a/gnu/packages/display-managers.scm +++ b/gnu/packages/display-managers.scm @@ -475,7 +475,11 @@ (define-public slim ;; The build system's logic here is: if "Linux", then ;; "systemd". Strip that. "")) - #t))) + #t)) + (add-before 'configure 'fix-0-pointer-comparison + (lambda _ + (substitute* "panel.cpp" + (("WinGC < 0") "WinGC == NULL"))))) #:configure-flags '("-DUSE_PAM=yes" "-DUSE_CONSOLEKIT=no") #:tests? #f))