From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uKpLOIcc1WO+wgAAbAwnHQ (envelope-from ) for ; Sat, 28 Jan 2023 14:00:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 4L0kOIcc1WOntgAAauVa8A (envelope-from ) for ; Sat, 28 Jan 2023 14:00:55 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B89033A75B for ; Sat, 28 Jan 2023 14:00:55 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pLkoP-0004XZ-Ig; Sat, 28 Jan 2023 08:00:05 -0500 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 1pLkoN-0004Wj-DV for guix-patches@gnu.org; Sat, 28 Jan 2023 08:00:03 -0500 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 1pLkoM-0005At-VH for guix-patches@gnu.org; Sat, 28 Jan 2023 08:00:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pLkoM-0004H3-Pn for guix-patches@gnu.org; Sat, 28 Jan 2023 08:00:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61119] [PATCH core-updates 1/1] gnu: p7zip: Fix build with GCC 11. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 28 Jan 2023 13:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61119 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61119@debbugs.gnu.org Received: via spool by 61119-submit@debbugs.gnu.org id=B61119.167491078716303 (code B ref 61119); Sat, 28 Jan 2023 13:00:02 +0000 Received: (at 61119) by debbugs.gnu.org; 28 Jan 2023 12:59:47 +0000 Received: from localhost ([127.0.0.1]:39843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLko7-0004Et-9U for submit@debbugs.gnu.org; Sat, 28 Jan 2023 07:59:47 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:35622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLko5-0004Ed-5q for 61119@debbugs.gnu.org; Sat, 28 Jan 2023 07:59:46 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 0246C6813E for <61119@debbugs.gnu.org>; Sat, 28 Jan 2023 12:59:40 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo07-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo07-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OAMMm2lyW9L7 for <61119@debbugs.gnu.org>; Sat, 28 Jan 2023 12:59:39 +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 98EF3680FB for <61119@debbugs.gnu.org>; Sat, 28 Jan 2023 12:59:39 +0000 (UTC) From: Simon South Date: Sat, 28 Jan 2023 07:59:37 -0500 Message-Id: <02f866785355e32d9f69f81407b1531cc3d69321.1674909616.git.simon@simonsouth.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674910855; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=JIE8lSUY7C+l91GdOwNON1dPF0nx1Fvs/eOwl87Y03Y=; b=TisqWvq8x4o1pKYyeNIJ7hjZ+pzwMJpmNUjDBgnGey4m/EFiozIzekOpAZgZh4jotpCV7W YfKtuOVIqpEGFNvy6RT3sBnH+1103Hk/LTD40g36SKn6oR1Ku3dzY8dMO8LxG/Vw0HsVB/ EV0FrA00eJwYpii+ziFs07gn6uMBpCnBLqzH2hgiJSzyEIuLgxrAmjWedE0mK9s+Er8ucx 2xk2lIHgECLO9rfN5XasxbgJT/v01BZixdhuydsD+SYRgCagLtgapuEpqTMzcOulnVnqFy Hq/AYeBtmfJo4qZAa1ayIITxz5KPHKhFo4FWg3V6suIE9fewz0BRJmHPWj8FNg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674910855; a=rsa-sha256; cv=none; b=hrnZq5uwPZipEqah1uEj+bJMuPTW6JsevjKGF8pPD8CegPChzxTmJ+1Nb0guHFdKXgwegK t3T4nKD9EacaLQr5EpybHBzCUt/3y3OVcyOgAg16ddFSEYlap3nc2af4CN3ccXyfsltuyK Xmr+niN1HgAnn1ArBDjxhReRjPLlJhRvt/uvZNOFgrmGBAc07Dy2i1e/sIBs5XZGpf43WA qDgYxDT+i2mYGkuM2VAZZ0luk5Ms+VS2oxjVSRUsA/nSLuU9xWZwzPr08tSMn/wmiLxjPf JbfUBOjGTkziIunldbUPaQ+s/LIidsxmNOqA6iiWUK/x9OYS0BKqG+tECiNFJQ== Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -1.37 X-Spam-Score: -1.37 X-Migadu-Queue-Id: B89033A75B X-TUID: iquJxEI01b6m * gnu/packages/patches/p7zip-fix-build-with-gcc-11.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/compression.scm (p7zip)[source]: Apply it. --- gnu/local.mk | 1 + gnu/packages/compression.scm | 1 + .../patches/p7zip-fix-build-with-gcc-11.patch | 49 +++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 gnu/packages/patches/p7zip-fix-build-with-gcc-11.patch diff --git a/gnu/local.mk b/gnu/local.mk index 8821c3fd8b..3dbad5b439 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1596,6 +1596,7 @@ dist_patch_DATA = \ %D%/packages/patches/owncloud-disable-updatecheck.patch \ %D%/packages/patches/p7zip-CVE-2016-9296.patch \ %D%/packages/patches/p7zip-CVE-2017-17969.patch \ + %D%/packages/patches/p7zip-fix-build-with-gcc-11.patch \ %D%/packages/patches/p7zip-remove-unused-code.patch \ %D%/packages/patches/pam-krb5-CVE-2020-10595.patch \ %D%/packages/patches/pango-skip-libthai-test.patch \ diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index e1f47d1e3e..a555d2d319 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -1312,6 +1312,7 @@ (define-public p7zip "switch(static_cast(errorCode)) {")))) (patches (search-patches "p7zip-CVE-2016-9296.patch" "p7zip-CVE-2017-17969.patch" + "p7zip-fix-build-with-gcc-11.patch" "p7zip-remove-unused-code.patch")))) (build-system gnu-build-system) (arguments diff --git a/gnu/packages/patches/p7zip-fix-build-with-gcc-11.patch b/gnu/packages/patches/p7zip-fix-build-with-gcc-11.patch new file mode 100644 index 0000000000..20a40488d8 --- /dev/null +++ b/gnu/packages/patches/p7zip-fix-build-with-gcc-11.patch @@ -0,0 +1,49 @@ +Building p7zip with GCC 11 or newer normally fails with error messages like + + ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp:308:11: error: use of an + operand of type ‘bool’ in ‘operator++’ is forbidden in C++17 + 308 | numMethods++; + | ^~~~~~~~~~ + +This patch causes GCC to interpret the code using the GNU dialect of the C++14 +standard, as GCC 10 did by default, and reduces these errors to warnings. + +diff --git a/makefile.linux_amd64_asm b/makefile.linux_amd64_asm +index 075c6a8..b7d73ee 100644 +--- a/makefile.linux_amd64_asm ++++ b/makefile.linux_amd64_asm +@@ -11,6 +11,8 @@ ALLFLAGS=-m64 ${OPTFLAGS} -pipe \ + -D_7ZIP_ASM \ + $(LOCAL_FLAGS) + ++ALLFLAGS_CPP=-std=gnu++14 ++ + CXX=g++ + CC=gcc + CC_SHARED=-fPIC +diff --git a/makefile.linux_any_cpu_gcc_4.X b/makefile.linux_any_cpu_gcc_4.X +index be093b5..c0f3120 100644 +--- a/makefile.linux_any_cpu_gcc_4.X ++++ b/makefile.linux_any_cpu_gcc_4.X +@@ -10,7 +10,7 @@ ALLFLAGS=${OPTFLAGS} -pipe \ + -D_7ZIP_LARGE_PAGES \ + $(LOCAL_FLAGS) + +-ALLFLAGS_CPP=-DENV_HAVE_GCCVISIBILITYPATCH -fvisibility=hidden -fvisibility-inlines-hidden ++ALLFLAGS_CPP=-DENV_HAVE_GCCVISIBILITYPATCH -std=gnu++14 -fvisibility=hidden -fvisibility-inlines-hidden + + CXX=g++ + CC=gcc +diff --git a/makefile.linux_x86_asm_gcc_4.X b/makefile.linux_x86_asm_gcc_4.X +index 1ac339b..6e736d9 100644 +--- a/makefile.linux_x86_asm_gcc_4.X ++++ b/makefile.linux_x86_asm_gcc_4.X +@@ -12,7 +12,7 @@ ALLFLAGS=${OPTFLAGS} -pipe -m32 \ + -D_7ZIP_ASM \ + $(LOCAL_FLAGS) + +-ALLFLAGS_CPP=-DENV_HAVE_GCCVISIBILITYPATCH -fvisibility=hidden -fvisibility-inlines-hidden ++ALLFLAGS_CPP=-DENV_HAVE_GCCVISIBILITYPATCH -std=gnu++14 -fvisibility=hidden -fvisibility-inlines-hidden + + CXX=g++ + CC=gcc -- 2.39.1