GNU bug report logs - #57060
[PATCH] gnu: pcc: Fix build.

Previous Next

Package: guix-patches;

Reported by: "(" <paren <at> disroot.org>

Date: Mon, 8 Aug 2022 16:40:02 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#57060: closed ([PATCH] gnu: pcc: Fix build.)
Date: Thu, 11 Aug 2022 08:30:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 11 Aug 2022 10:29:08 +0200
with message-id <874jyj420b.fsf_-_ <at> gnu.org>
and subject line Re: bug#57060: [PATCH] gnu: pcc: Fix build.
has caused the debbugs.gnu.org bug report #57060,
regarding [PATCH] gnu: pcc: Fix build.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
57060: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57060
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: "(" <paren <at> disroot.org>
To: guix-patches <at> gnu.org
Cc: "\(" <paren <at> disroot.org>
Subject: [PATCH] gnu: pcc: Fix build.
Date: Mon,  8 Aug 2022 17:35:29 +0100
* gnu/packages/c.scm (pcc)[arguments]: Use gexps.
<#:phases>{fix-multiple-definitions}: New phase.
[native-inputs]: Adjust formatting.
---
 gnu/packages/c.scm | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 1630a40d17..113a331070 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2022 (unmatched parenthesis <paren <at> disroot.org>
 ;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
 ;;; Copyright © 2022 Ekaitz Zarraga <ekaitz <at> elenq.tech>
+;;; Copyright © 2022 ( <paren <at> disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -185,12 +186,20 @@ (define-public pcc
                 "1p34w496095mi0473f815w6wbi57zxil106mg7pj6sg6gzpjcgww"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (replace 'check
-           (lambda _ (invoke "make" "-C" "cc/cpp" "test") #t)))))
-    (native-inputs
-     (list bison flex))
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'fix-multiple-definitions
+                 (lambda _
+                   ;; Certain variables are defined multiple times. This
+                   ;; upsets the linker and causes a build failure.
+                   (substitute* "cc/ccom/pass1.h"
+                     (("FLT flt_zero;") "extern FLT flt_zero;"))
+                   (substitute* (list "cc/ccom/scan.l" "cc/cxxcom/scan.l")
+                     (("lineno, ") ""))))
+               (replace 'check
+                 (lambda _
+                   (invoke "make" "-C" "cc/cpp" "test"))))))
+    (native-inputs (list bison flex))
     (synopsis "Portable C compiler")
     (description
      "PCC is a portable C compiler.  The project goal is to write a C99
-- 
2.37.1



[Message part 3 (message/rfc822, inline)]
From: Mathieu Othacehe <othacehe <at> gnu.org>
To: "(" <paren <at> disroot.org>
Cc: Maxime Devos <maximedevos <at> telenet.be>, 57060-done <at> debbugs.gnu.org
Subject: Re: bug#57060: [PATCH] gnu: pcc: Fix build.
Date: Thu, 11 Aug 2022 10:29:08 +0200
> * gnu/packages/c.scm (pcc)[arguments]<#:phases>{check}: Respect the
>   `tests?` argument.

Pushed both patches, thanks Maxime for reviewing.

Mathieu


This bug report was last modified 2 years and 285 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.