From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 28 07:57:50 2023 Received: (at submit) by debbugs.gnu.org; 28 Jan 2023 12:57:50 +0000 Received: from localhost ([127.0.0.1]:39836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLkmD-0004BW-MZ for submit@debbugs.gnu.org; Sat, 28 Jan 2023 07:57:50 -0500 Received: from lists.gnu.org ([209.51.188.17]:35174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLkmB-0004BH-CE for submit@debbugs.gnu.org; Sat, 28 Jan 2023 07:57:48 -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 1pLkmB-0003TH-1r for guix-patches@gnu.org; Sat, 28 Jan 2023 07:57:47 -0500 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 ) id 1pLkm9-0004pn-1i for guix-patches@gnu.org; Sat, 28 Jan 2023 07:57:46 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 37BF667B2F for ; Sat, 28 Jan 2023 12:57:40 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo09-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo09-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eB5sKCguarMj for ; Sat, 28 Jan 2023 12:57:40 +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 E6F796722C for ; Sat, 28 Jan 2023 12:57:39 +0000 (UTC) From: Simon South To: guix-patches@gnu.org Subject: [PATCH core-updates 0/1] gnu: p7zip: Fix build with GCC 11. Date: Sat, 28 Jan 2023 07:57:37 -0500 Message-Id: X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On core-updates, p7zip is failing to build 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 follows from the move to GCC 11 and its use by default of the GNU dialect of the C++17 standard for interpreting C++ code. (Note p7zip is essentially abandoned and its code is aging.) The patch to follow causes GCC to use the GNU dialect of the C++14 standard instead, as GCC 10 did by default, reducing the error messages to warnings and allowing the build to complete. I've tested this on x86-64 and AArch64 and everything seems fine. -- Simon South simon@simonsouth.net Simon South (1): gnu: p7zip: Fix build with GCC 11. 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 base-commit: 770d379d7b60590bfdcb749287cb6713dee093ce prerequisite-patch-id: 418e6f2f834e0f77d4da64e48bf654d610fbfe80 -- 2.39.1 From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 28 07:59:47 2023 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 To: 61119@debbugs.gnu.org Subject: [PATCH core-updates 1/1] gnu: p7zip: Fix build with GCC 11. 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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61119 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 04 11:30:19 2023 Received: (at 61119-done) by debbugs.gnu.org; 4 Mar 2023 16:30:19 +0000 Received: from localhost ([127.0.0.1]:37501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYUm3-0005Iy-6I for submit@debbugs.gnu.org; Sat, 04 Mar 2023 11:30:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYUm0-0005Il-Ai for 61119-done@debbugs.gnu.org; Sat, 04 Mar 2023 11:30:17 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYUlt-000184-Cj; Sat, 04 Mar 2023 11:30:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=z15jwC1zQoAGJ+68MT6/VUYgfXxzDOlGqGMkMn+5QY8=; b=atY5U7nHvaSn0vCm8aOm r6vQzhyTt5mUfKaQctJQcBymvetn3M2kHgylApMQqv4oklEgSJmW1wm1GaY/AAKl3WoAuyPy/YE9Y v1HFTW2yQBDCaknHtxmCnRP9mi2wzW4HQRdpfklTwzcSBo3iXSfamt+OBCVa3eW9FbKGh8e65qk6P 74HBLx5XjoFolcjn2rBNUaXbzhtP1WAVIQFNOMHzQ7e7Ayz57BnHwwryden8sncM2zM4EHzH5LTMf wnTKiBhytisbm7pirn+hZlWe1yUZprRtMS+RDIuRrnoAxccCyKfqhq/OEBFx8HiX4/1yqCIw8tZIM Xi6oQt8AuYcJcw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYUls-000752-Vz; Sat, 04 Mar 2023 11:30:09 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Simon South Subject: Re: bug#61119: [PATCH core-updates 0/1] gnu: p7zip: Fix build with GCC 11. References: <02f866785355e32d9f69f81407b1531cc3d69321.1674909616.git.simon@simonsouth.net> Date: Sat, 04 Mar 2023 17:30:06 +0100 In-Reply-To: <02f866785355e32d9f69f81407b1531cc3d69321.1674909616.git.simon@simonsouth.net> (Simon South's message of "Sat, 28 Jan 2023 07:59:37 -0500") Message-ID: <875ybgtr75.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61119-done Cc: 61119-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Simon South skribis: > * 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. Applied, thanks! Ludo=E2=80=99. From unknown Fri Jun 20 07:18:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 02 Apr 2023 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator