all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#53964] [PATCH 0/4] Build nhc98 and ghc@4 with regular dependencies
@ 2022-02-12 21:43 Ludovic Courtès
  2022-02-12 21:45 ` [bug#53964] [PATCH 1/4] gnu: nhc98: Build with the current tool chain Ludovic Courtès
  2022-02-12 22:14 ` [bug#53964] [PATCH 0/4] Build nhc98 and ghc@4 with regular dependencies Ricardo Wurmus
  0 siblings, 2 replies; 22+ messages in thread
From: Ludovic Courtès @ 2022-02-12 21:43 UTC (permalink / raw)
  To: 53964; +Cc: Ludovic Courtès, rekado

Hello Ricardo and all,

This series tweaks the recently-added nhc98 and ghc@4 so they
only depend on “regular” packages rather than intermediate
packages from commencement.scm.

It also fixes ‘tests/graph.scm’.  \o/

Thoughts?

Ludo’.

Ludovic Courtès (4):
  gnu: nhc98: Build with the current tool chain.
  gnu: gcc: Add 2.95.
  gnu: ghc@4: Build without referring to packages in commencement.scm.
  gnu: Remove glibc@2.2.5 and gcc-2.95-wrapper.

 gnu/local.mk                              |   1 +
 gnu/packages/base.scm                     |  99 ------------------
 gnu/packages/commencement.scm             |  63 +-----------
 gnu/packages/gcc.scm                      |  71 ++++++++++++-
 gnu/packages/haskell.scm                  | 116 +++++++---------------
 gnu/packages/patches/nhc98-c-update.patch |  42 ++++++++
 6 files changed, 153 insertions(+), 239 deletions(-)
 create mode 100644 gnu/packages/patches/nhc98-c-update.patch


base-commit: 0f1cb023628d738bb21425c1921d17672db4f890
-- 
2.34.0





^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#53964] [PATCH 1/4] gnu: nhc98: Build with the current tool chain.
  2022-02-12 21:43 [bug#53964] [PATCH 0/4] Build nhc98 and ghc@4 with regular dependencies Ludovic Courtès
@ 2022-02-12 21:45 ` Ludovic Courtès
  2022-02-12 21:45   ` [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95 Ludovic Courtès
                     ` (2 more replies)
  2022-02-12 22:14 ` [bug#53964] [PATCH 0/4] Build nhc98 and ghc@4 with regular dependencies Ricardo Wurmus
  1 sibling, 3 replies; 22+ messages in thread
From: Ludovic Courtès @ 2022-02-12 21:45 UTC (permalink / raw)
  To: 53964; +Cc: Ludovic Courtès

* gnu/packages/patches/nhc98-c-update.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/haskell.scm (nhc98)[source]: Use it.
[arguments]: Remove #:implicit-inputs?.
[native-inputs]: Remove.
---
 gnu/local.mk                              |  1 +
 gnu/packages/haskell.scm                  | 34 ++----------------
 gnu/packages/patches/nhc98-c-update.patch | 42 +++++++++++++++++++++++
 3 files changed, 45 insertions(+), 32 deletions(-)
 create mode 100644 gnu/packages/patches/nhc98-c-update.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index a706409516..950b040c64 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1546,6 +1546,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/nettle-3.5-check-_pkcs1_sec_decrypt-msg-len.patch \
   %D%/packages/patches/nettle-3.5-CVE-2021-3580-pt1.patch	\
   %D%/packages/patches/nettle-3.5-CVE-2021-3580-pt2.patch	\
+  %D%/packages/patches/nhc98-c-update.patch			\
   %D%/packages/patches/nix-dont-build-html-doc.diff		\
   %D%/packages/patches/nfs4-acl-tools-0.3.7-fixpaths.patch	\
   %D%/packages/patches/ngircd-handle-zombies.patch		\
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 647b078dfd..c3706fca6c 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -123,14 +123,14 @@ (define-public nhc98
                            version ".tar.gz"))
        (sha256
         (base32
-         "0fkgxgsd2iqxvwcgnad1702kradwlbcal6rxdrgb22vd6dnc3i8l"))))
+         "0fkgxgsd2iqxvwcgnad1702kradwlbcal6rxdrgb22vd6dnc3i8l"))
+       (patches (search-patches "nhc98-c-update.patch"))))
     (build-system gnu-build-system)
     (supported-systems '("i686-linux" "x86_64-linux"))
     (arguments
      (list
       #:tests? #false                   ;there is no test target
       #:system "i686-linux"
-      #:implicit-inputs? #false
       #:parallel-build? #false          ;not supported
       #:strip-binaries? #false          ;doesn't work
       #:make-flags '(list "all-gcc")
@@ -170,36 +170,6 @@ (define-public nhc98
                       "--ccoption="
                       "--ldoption="
                       "--install"))))))
-    (native-inputs
-     `(("findutils" ,findutils)
-       ("tar" ,tar)
-       ("bzip2" ,bzip2)
-       ("gzip" ,gzip)
-       ("xz" ,xz)
-       ("diffutils" ,diffutils)
-       ("file" ,file)
-       ("gawk" ,gawk)
-
-       ("make" ,gnu-make)
-       ("sed" ,sed)
-       ("grep" ,grep)
-       ("coreutils" ,coreutils)
-       ("bash" ,bash-minimal)
-
-       ("libc" ,glibc-2.2.5)
-       ("gcc-wrapper"
-        ,(module-ref (resolve-interface
-                      '(gnu packages commencement))
-                     'gcc-2.95-wrapper))
-       ("gcc"
-        ,(module-ref (resolve-interface
-                      '(gnu packages commencement))
-                     'gcc-mesboot0))
-       ("binutils"
-        ,(module-ref (resolve-interface
-                      '(gnu packages commencement))
-                     'binutils-mesboot))
-       ("kernel-headers" ,linux-libre-headers)))
     (home-page "https://www.haskell.org/nhc98")
     (synopsis "Nearly a Haskell Compiler")
     (description
diff --git a/gnu/packages/patches/nhc98-c-update.patch b/gnu/packages/patches/nhc98-c-update.patch
new file mode 100644
index 0000000000..06e6928d14
--- /dev/null
+++ b/gnu/packages/patches/nhc98-c-update.patch
@@ -0,0 +1,42 @@
+This patch provides an update so that nhc98 can be built and works with
+a modern C compiler (GCC 11) and libc (glibc 2.33).
+
+diff --git a/Makefile.inc b/Makefile.inc
+index 4fbd47a..5bce5c9 100644
+--- a/Makefile.inc
++++ b/Makefile.inc
+@@ -1,6 +1,10 @@
+ ### Configurable variables:
+ 
+-OPT = -O3
++# We want C89 semantics plus C++-style comments and things like the
++# 'setjmp_buf' and 'u_short' types.  More importantly, build with '-O1'
++# only to avoid modern optimizations that break the code.
++OPT = -O1 -std=gnu89 -D_GNU_SOURCE=1
++
+ #ARCH = -m32
+ ARCH = 
+ 
+diff --git a/script/nhc98heap.c b/script/nhc98heap.c
+index 534010e..a30d5cd 100644
+--- a/script/nhc98heap.c
++++ b/script/nhc98heap.c
+@@ -1,5 +1,6 @@
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <ctype.h>
+ main(int argc, char **argv)
+ {
+   int prefix = 1;
+diff --git a/src/runtime/Kernel/collector.c b/src/runtime/Kernel/collector.c
+index b95a273..1f879c5 100644
+--- a/src/runtime/Kernel/collector.c
++++ b/src/runtime/Kernel/collector.c
+@@ -2,6 +2,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <unistd.h>
+ #include "node.h"
+ /*#include "newmacros.h"  -- already included in node.h */
+ /*#include "runtime.h"    -- already included in node.h */
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95.
  2022-02-12 21:45 ` [bug#53964] [PATCH 1/4] gnu: nhc98: Build with the current tool chain Ludovic Courtès
@ 2022-02-12 21:45   ` Ludovic Courtès
  2022-02-12 22:35     ` Maxime Devos
                       ` (5 more replies)
  2022-02-12 21:45   ` [bug#53964] [PATCH 3/4] gnu: ghc@4: Build without referring to packages in commencement.scm Ludovic Courtès
  2022-02-12 21:45   ` [bug#53964] [PATCH 4/4] gnu: Remove glibc@2.2.5 and gcc-2.95-wrapper Ludovic Courtès
  2 siblings, 6 replies; 22+ messages in thread
From: Ludovic Courtès @ 2022-02-12 21:45 UTC (permalink / raw)
  To: 53964; +Cc: Ludovic Courtès

* gnu/packages/gcc.scm (gcc-2.95): New variable.
---
 gnu/packages/gcc.scm | 71 +++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 70 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index efa0baeaa1..2f947e4322 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2022 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014, 2015, 2016, 2017, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
@@ -641,6 +641,75 @@ (define-public gcc-11
 ;;       the gcc-toolchain-* definitions.
 (define-public gcc gcc-10)
 
+\f
+;;;
+;;; Historical version.
+;;;
+
+(define-public gcc-2.95
+  ;; Note: 'gcc-core-mesboot0' in commencement.scm provides 2.95 as well, but
+  ;; with additional tricks to support compilation with TinyCC and Mes-libc.
+  (package
+    (inherit gcc)
+    (version "2.95.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/gcc/gcc-2.95.3/gcc-core-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1xvfy4pqhrd5v2cv8lzf63iqg92k09g6z9n2ah6ndd4h17k1x0an"))))
+    (supported-systems '("i686-linux" "x86_64-linux"))
+    (native-inputs (list texinfo))
+    (inputs '())
+    (propagated-inputs '())
+    (outputs '("out"))
+    (arguments
+     (list #:system "i686-linux"                ;x86_64 didn't exist back then
+           #:tests? #f
+           #:parallel-build? #f
+           #:configure-flags #~'("--disable-werror")
+
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'configure 'set-dynamic-linker-file-name
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   ;; Tell GCC what the real loader file name is.
+                   (substitute* "gcc/config/i386/linux.h"
+                     (("/lib/ld-linux\\.so\\.[12]")
+                      (search-input-file inputs "/lib/ld-linux.so.2")))))
+               (replace 'configure
+                 (lambda* (#:key outputs build configure-flags
+                           #:allow-other-keys)
+                   ;; It's an old 'configure' script so it needs some help.
+                   (let ((out (assoc-ref outputs "out")))
+                     (setenv "CONFIG_SHELL" (which "sh"))
+                     (apply invoke "./configure"
+                            (string-append "--prefix=" out)
+                            (string-append "--build=" build)
+                            (string-append "--host=" build)
+                            configure-flags))))
+               (add-before 'configure 'remove-bundled-texinfo
+                 (lambda _
+                   ;; Do not build the bundled Texinfo.
+                   (delete-file-recursively "texinfo")
+                   (substitute* "configure"
+                     (("host_tools=(.*)texinfo" _ before)
+                      (string-append "host_tools=" before)))
+
+                   ;; Go ahead despite the many warnings.
+                   (substitute* '("Makefile.in" "gcc/Makefile.in")
+                     (("^MAKEINFOFLAGS =.*")
+                      "MAKEINFOFLAGS = --force\n")))))))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "C_INCLUDE_PATH")
+            (files '("include")))
+           (search-path-specification
+            (variable "LIBRARY_PATH")
+            (files '("lib")))))))
+
+\f
 (define-public (make-libstdc++ gcc)
   "Return a libstdc++ package based on GCC.  The primary use case is when
 using compilers other than GCC."
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [bug#53964] [PATCH 3/4] gnu: ghc@4: Build without referring to packages in commencement.scm.
  2022-02-12 21:45 ` [bug#53964] [PATCH 1/4] gnu: nhc98: Build with the current tool chain Ludovic Courtès
  2022-02-12 21:45   ` [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95 Ludovic Courtès
@ 2022-02-12 21:45   ` Ludovic Courtès
  2022-02-12 22:49     ` Maxime Devos
  2022-02-12 22:52     ` Maxime Devos
  2022-02-12 21:45   ` [bug#53964] [PATCH 4/4] gnu: Remove glibc@2.2.5 and gcc-2.95-wrapper Ludovic Courtès
  2 siblings, 2 replies; 22+ messages in thread
From: Ludovic Courtès @ 2022-02-12 21:45 UTC (permalink / raw)
  To: 53964; +Cc: Ludovic Courtès

* gnu/packages/haskell.scm (ghc-4)[arguments]: Remove #:implicit-inputs?.
In 'bootstrap' phase, pass '-optc-D_GNU_SOURCE=1'.  Use
'search-input-file' to locate lib{bfd,iberty}.a, and 'which' for cpp.
Patch 'mk/config.mk.in'.  In 'configure' phase, emit "config.cache".
In 'make-boot' phase, replace "CLK_TCK" in 'nHandle.c'.
[native-inputs]: Remove now-implicit inputs; remove GLIBC-2.2.5,
GCC-MESBOOT0, and BINUTILS-MESBOOT.  Add GCC-2.95 and BINUTILS-2.33.
Remove input labels.
---
 gnu/packages/haskell.scm | 82 +++++++++++++++++-----------------------
 1 file changed, 35 insertions(+), 47 deletions(-)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index c3706fca6c..6a1ca7c7e8 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -193,12 +193,11 @@ (define-public ghc-4
        (sha256
         (base32
          "0ar4nxy4cr5vwvfj71gmc174vx0n3lg9ka05sa1k60c8z0g3xp1q"))
-       (patches (list (search-patch "ghc-4.patch")))))
+       (patches (search-patches "ghc-4.patch"))))
     (build-system gnu-build-system)
     (supported-systems '("i686-linux" "x86_64-linux"))
     (arguments
      `(#:system "i686-linux"
-       #:implicit-inputs? #f
        #:strip-binaries? #f
        #:phases
        (modify-phases %standard-phases
@@ -223,8 +222,8 @@ (define-public ghc-4
 #HsLibsFor=hugs
 # Setting this leads to building the interpreter.
 GhcHcOpts=-DDEBUG
-GhcRtsHcOpts=-optc-DDEBUG -optc-D__HUGS__ -unreg -optc-g
-GhcRtsCcOpts=-optc-DDEBUG -optc-g -optc-D__HUGS__
+GhcRtsHcOpts=-optc-DDEBUG -optc-D__HUGS__ -unreg -optc-g -optc-D_GNU_SOURCE=1
+GhcRtsCcOpts=-optc-DDEBUG -optc-g -optc-D__HUGS__ -optc-D_GNU_SOURCE=1
 SplitObjs=NO
 ")))
 
@@ -247,8 +246,8 @@ (define-public ghc-4
              ;; this old linker understands.
              (substitute* "ghc/interpreter/Makefile"
                (("-lbfd -liberty")
-                (string-append (assoc-ref inputs "binutils") "/lib/libbfd.a "
-                               (assoc-ref inputs "binutils") "/lib/libiberty.a")))
+                (string-append (search-input-file inputs "/lib/libbfd.a") " "
+                               (search-input-file inputs "/lib/libiberty.a"))))
 
              (let ((bash (which "bash")))
                (substitute* '("configure.in"
@@ -271,7 +270,13 @@ (define-public ghc-4
                (setenv "CONFIG_SHELL" bash)
                (setenv "SHELL" bash))
 
-             (setenv "CPP" (string-append (assoc-ref inputs "gcc") "/bin/cpp"))
+             ;; The 'hscpp' script invokes GCC 2.95's 'cpp' (RAWCPP), which
+             ;; segfaults unless passed '-x c'.
+             (substitute* "mk/config.mk.in"
+               (("-traditional")
+                "-traditional -x c"))
+
+             (setenv "CPP" (which "cpp"))
              (invoke "autoreconf" "--verbose" "--force")))
          (add-before 'configure 'configure-gmp
            (lambda* (#:key build inputs outputs #:allow-other-keys)
@@ -283,6 +288,12 @@ (define-public ghc-4
            (lambda* (#:key build inputs outputs #:allow-other-keys)
              (let ((bash (which "bash"))
                    (out  (assoc-ref outputs "out")))
+               (call-with-output-file "config.cache"
+                 (lambda (port)
+                   ;; GCC 2.95 fails to deal with anonymous unions in glibc's
+                   ;; 'struct_rusage.h', so skip that.
+                   (display "ac_cv_func_getrusage=no\n" port)))
+
                (invoke bash "./configure"
                        "--enable-hc-boot"
                        (string-append "--prefix=" out)
@@ -290,14 +301,15 @@ (define-public ghc-4
                        (string-append "--host=" build)))))
          (add-before 'build 'make-boot
            (lambda _
+             ;; CLK_TCK has been removed from recent libc.
+             (substitute* "ghc/interpreter/nHandle.c"
+               (("CLK_TCK") "sysconf (_SC_CLK_TCK)"))
+
              ;; Only when building with more recent GCC
              (when #false
                ;; GCC 2.95 is fine with these comments, but GCC 4.6 is not.
                (substitute* "ghc/rts/universal_call_c.S"
-                 (("^# .*") ""))
-               ;; CLK_TCK has been removed
-               (substitute* "ghc/interpreter/nHandle.c"
-                 (("CLK_TCK") "sysconf(_SC_CLK_TCK)")))
+                 (("^# .*") "")))
 
              ;; Only when using more recent Perl
              (when #false
@@ -334,45 +346,21 @@ (define-public ghc-4
                (copy-recursively "ghc/interpreter/lib" lib)
                (install-file "ghc/interpreter/nHandle.so" lib)))))))
     (native-inputs
-     `(("findutils" ,findutils)
-       ("tar" ,tar)
-       ("bzip2" ,bzip2)
-       ("xz" ,xz)
-       ("diffutils" ,diffutils)
-       ("file" ,file)
-       ("gawk" ,gawk)
-       ("autoconf" ,autoconf-2.13)
-       ("automake" ,automake)
-       ("bison" ,bison) ;for parser.y
+     (list autoconf-2.13
+           automake
+           bison                                  ;for parser.y
 
-       ("make" ,gnu-make)
-       ("sed" ,sed)
-       ("grep" ,grep)
-       ("coreutils" ,coreutils)
-       ("bash" ,bash-minimal)
+           ;; Needed to support lvalue casts.
+           gcc-2.95
 
-       ("libc" ,glibc-2.2.5)
-       ;; Lazily resolve binutils-mesboot in (gnu packages commencement) to
-       ;; avoid a cycle.
-       ("gcc-wrapper"
-        ,(module-ref (resolve-interface
-                      '(gnu packages commencement))
-                     'gcc-2.95-wrapper))
-       ("gcc"
-        ,(module-ref (resolve-interface
-                      '(gnu packages commencement))
-                     'gcc-mesboot0))
-       ("binutils"
-        ,(module-ref (resolve-interface
-                      '(gnu packages commencement))
-                     'binutils-mesboot))
-       ("kernel-headers" ,linux-libre-headers)
+           ;; Use an older assembler to work around this error in GMP:
+           ;;   Error: `%edx' not allowed with `testb'
+           binutils-2.33
 
-       ;; TODO: Perl used to allow setting $* to enable multi-line
-       ;; matching.  If we want to use a more recent Perl we need to
-       ;; patch all expressions that require multi-line matching.  Hard
-       ;; to tell.
-       ("perl" ,perl-5.14)))
+           ;; TODO: Perl used to allow setting $* to enable multi-line
+           ;; matching.  If we want to use a more recent Perl we need to patch
+           ;; all expressions that require multi-line matching.  Hard to tell.
+           perl-5.14))
     (home-page "https://www.haskell.org/ghc")
     (synopsis "The Glasgow Haskell Compiler")
     (description
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [bug#53964] [PATCH 4/4] gnu: Remove glibc@2.2.5 and gcc-2.95-wrapper.
  2022-02-12 21:45 ` [bug#53964] [PATCH 1/4] gnu: nhc98: Build with the current tool chain Ludovic Courtès
  2022-02-12 21:45   ` [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95 Ludovic Courtès
  2022-02-12 21:45   ` [bug#53964] [PATCH 3/4] gnu: ghc@4: Build without referring to packages in commencement.scm Ludovic Courtès
@ 2022-02-12 21:45   ` Ludovic Courtès
  2 siblings, 0 replies; 22+ messages in thread
From: Ludovic Courtès @ 2022-02-12 21:45 UTC (permalink / raw)
  To: 53964; +Cc: Ludovic Courtès

This reverts commits a95924c9ac3f238cde243c96d552ff59ad77ca16 and
defa85b26537a3cc20624fb9dbcae906226361d5, which were used to build
nhc98@1.22 but are no longer needed.

* gnu/packages/base.scm (glibc-2.2.5): Remove.
* gnu/packages/commencement.scm (gcc-2.95-wrapper): Remove.
(glibc-mesboot0, gcc-mesboot0, binutils-mesboot): Keep private.
---
 gnu/packages/base.scm         | 99 -----------------------------------
 gnu/packages/commencement.scm | 63 ++--------------------
 2 files changed, 3 insertions(+), 159 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 32a462b545..76a65f25b3 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1015,105 +1015,6 @@ (define-public glibc-2.29
                                        "glibc-reinstate-prlimit64-fallback.patch"
                                        "glibc-2.29-supported-locales.patch"))))))
 
-
-(define-public glibc-2.2.5
-  (package
-    (inherit glibc)
-    (version "2.2.5")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.gz"))
-              (patches (search-patches "glibc-boot-2.2.5.patch"
-                                       "glibc-bootstrap-system-2.2.5.patch"))
-              (sha256
-               (base32
-                "1vl48i16gx6h68whjyhgnn1s57vqq32f9ygfa2fls7pdkbsqvp2q"))))
-    (arguments
-     (list #:system "i686-linux"
-           #:implicit-inputs? #f
-           #:tests? #f
-           #:strip-binaries? #f
-           #:validate-runpath? #f
-           #:parallel-build? #f ; gcc-2.95.3 ICEs on massively parallel builds
-           #:make-flags
-           #~(list (string-append
-                    "SHELL=" #$(this-package-native-input "bash") "/bin/sh"))
-           #:configure-flags
-           #~(list "--enable-shared"
-                   "--enable-static"
-                   "--disable-sanity-checks"
-                   "--build=i686-unknown-linux-gnu"
-                   "--host=i686-unknown-linux-gnu"
-                   (string-append "--with-headers="
-                                  #$(this-package-native-input "kernel-headers")
-                                  "/include")
-                   "--enable-static-nss"
-                   "--without-__thread"
-                   "--without-cvs"
-                   "--without-gd"
-                   "--without-tls"
-                   (string-append "--prefix=" #$output))
-           #:phases
-           #~(modify-phases %standard-phases
-               (add-before 'configure 'setenv
-                 (lambda* (#:key inputs outputs #:allow-other-keys)
-                   (let* ((out (assoc-ref outputs "out"))
-                          (bash (assoc-ref inputs "bash"))
-                          (shell (string-append bash "/bin/bash"))
-                          (gcc (assoc-ref inputs "gcc"))
-                          (cppflags (string-append
-                                     " -D MES_BOOTSTRAP=1"
-                                     " -D BOOTSTRAP_GLIBC=1"))
-                          (cflags (string-append " -L " (getcwd))))
-                     (setenv "CONFIG_SHELL" shell)
-                     (setenv "SHELL" shell)
-                     (setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags))
-                     (setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags)))))
-               (replace 'configure   ; needs classic invocation of configure
-                 (lambda* (#:key configure-flags #:allow-other-keys)
-                   (format (current-error-port)
-                           "running ./configure ~a\n" (string-join configure-flags))
-                   (apply invoke "./configure" configure-flags)))
-               (add-after 'configure 'fixup-configure
-                 (lambda* (#:key inputs outputs #:allow-other-keys)
-                   (let* ((out (assoc-ref outputs "out"))
-                          (bash (assoc-ref inputs "bash"))
-                          (shell (string-append bash "/bin/bash")))
-                     (substitute* "config.make"
-                       (("INSTALL = scripts/") "INSTALL = $(..)./scripts/"))
-                     (substitute* "config.make"
-                       (("INSTALL = scripts/") "INSTALL = $(..)./scripts/")
-                       (("BASH = ") (string-append
-                                     "SHELL = " shell "
-         BASH = ")))))))))
-    (supported-systems '("i686-linux" "x86_64-linux"))
-    (outputs '("out"))
-    (inputs '())
-    (propagated-inputs '())
-    (native-inputs
-     ;; Lazily resolve NAME in (gnu packages commencement) to avoid a cycle.
-     (let ((c (lambda (name)
-                (module-ref (resolve-interface
-                             '(gnu packages commencement))
-                            name))))
-       `(("bash" ,bash-minimal)
-         ("coreutils" ,coreutils)
-         ("gawk" ,gawk)
-         ("grep" ,grep)
-         ("make" ,gnu-make)
-         ("sed" ,sed)
-         ("tar" ,tar)
-         ("bzip2" ,bzip2)
-         ("gzip" ,gzip)
-         ("patch" ,patch)
-         ("xz" ,xz)
-         ("kernel-headers" ,linux-libre-headers)
-
-         ;; Old toolchain
-         ("gcc" ,(c 'gcc-mesboot0))
-         ("binutils" ,(c 'binutils-mesboot))
-         ("libc" ,(c 'glibc-mesboot0)))))))
-
 (define-public (make-gcc-libc base-gcc libc)
   "Return a GCC that targets LIBC."
   (package (inherit base-gcc)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 76e879b47b..cdc9c1d621 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1265,7 +1265,7 @@ (define gawk-mesboot0
                (install-file "gawk" bin)
                (symlink "gawk" (string-append bin "/awk"))))))))))
 
-(define-public glibc-mesboot0
+(define glibc-mesboot0
   ;; GNU C Library 2.2.5 is the most recent glibc that we managed to build
   ;; using gcc-2.95.3.  Newer versions (2.3.x, 2.6, 2.1x) seem to need a newer
   ;; gcc.
@@ -1359,7 +1359,7 @@ (define-public glibc-mesboot0
                                      "SHELL = " shell "
          BASH = ")))))))))))
 
-(define-public gcc-mesboot0
+(define gcc-mesboot0
   (package
     (inherit gcc-core-mesboot0)
     (name "gcc-mesboot0")
@@ -1403,63 +1403,6 @@ (define-public gcc-mesboot0
               ,(string-append "LIBGCC2_INCLUDES=-I " gcc "/include")
               "LANGUAGES=c")))))))
 
-(define-public gcc-2.95-wrapper
-  ;; We need this so gcc-mesboot0 can be used to create shared binaries that
-  ;; have the correct interpreter, otherwise configuring gcc-mesboot using
-  ;; --enable-shared will fail.
-  (package
-    (inherit gcc-mesboot0)
-    (name "gcc-wrapper")
-    (source #f)
-    (inputs '())
-    (native-inputs
-     `(("bash" ,bash-minimal)
-       ("coreutils" ,coreutils)
-       ("libc" ,glibc-2.2.5)
-       ("gcc" ,gcc-mesboot0)))
-    (arguments
-     `(#:implicit-inputs? #f
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'unpack)
-         (delete 'configure)
-         (delete 'install)
-         (replace 'build
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (bash (assoc-ref inputs "bash"))
-                    (libc (assoc-ref inputs "libc"))
-                    (gcc (assoc-ref inputs "gcc"))
-                    (bin (string-append out "/bin")))
-               (mkdir-p bin)
-               (for-each
-                (lambda (program)
-                  (let ((wrapper (string-append bin "/" program)))
-                    (with-output-to-file wrapper
-                      (lambda _
-                        (display (string-append "#! " bash "/bin/bash
-exec " gcc "/bin/" program
-" -Wl,--dynamic-linker"
-;; also for x86_64-linux, we are still on i686-linux
-" -Wl," libc ,(glibc-dynamic-linker "i686-linux")
-" -Wl,--rpath"
-" -Wl," libc "/lib"
-" \"$@\"
-"))
-                        (chmod wrapper #o555)))))
-                '("cpp"
-                  "gcc"
-                  "g++"
-                  "i686-unknown-linux-gnu-cpp"
-                  "i686-unknown-linux-gnu-gcc"
-                  "i686-unknown-linux-gnu-g++")))))
-         (replace 'check
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (bin (string-append out "/bin"))
-                    (program (string-append bin "/gcc")))
-               (invoke program "--help")))))))))
-
 (define (%boot-mesboot0-inputs)
   `(("gcc" ,gcc-mesboot0)
     ("kernel-headers" ,%bootstrap-linux-libre-headers)
@@ -2050,7 +1993,7 @@ (define hello-mesboot
            (lambda _
              (invoke "./hello"))))))))
 
-(define-public binutils-mesboot
+(define binutils-mesboot
   (package
     (inherit binutils)
     (name "binutils-mesboot")
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [bug#53964] [PATCH 0/4] Build nhc98 and ghc@4 with regular dependencies
  2022-02-12 21:43 [bug#53964] [PATCH 0/4] Build nhc98 and ghc@4 with regular dependencies Ludovic Courtès
  2022-02-12 21:45 ` [bug#53964] [PATCH 1/4] gnu: nhc98: Build with the current tool chain Ludovic Courtès
@ 2022-02-12 22:14 ` Ricardo Wurmus
  2022-02-14 14:58   ` bug#53964: " Ludovic Courtès
  1 sibling, 1 reply; 22+ messages in thread
From: Ricardo Wurmus @ 2022-02-12 22:14 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 53964


Hi Ludo,

> This series tweaks the recently-added nhc98 and ghc@4 so they
> only depend on “regular” packages rather than intermediate
> packages from commencement.scm.

Wow, excellent!

The patches look good to me.  I built ghc@4, fired up STGHugs, and
successfully loaded a module.

--8<---------------cut here---------------start------------->8---
cd $(guix build ghc@4)/lib/
export STGHUGSDIR=$PWD
$ ./hugs
__   __ __  __  ____   ___      _________________________________________
||   || ||  || ||  || ||__      STGHugs: Based on the Haskell 98 standard
||___|| ||__|| ||__||  __||     Copyright (c) 1994-2000
||---||         ___||           World Wide Web: http://haskell.org/hugs
||   ||                         Report bugs to: hugs-bugs@haskell.org
||   || Version: STGHugs-000425 _________________________________________

Haskell 98 mode: Restart with command line option -98 to enable extensions
Standalone mode: Restart with command line +c for combined mode

Reading source file "./Prelude.hs"
Reading source file "./PrelPrim.hs"
Hugs session for:
  PrelPrim
  Prelude
Type :? for help
Prelude> :load System
Reading source file "./System.lhs"
Hugs session for:
  PrelPrim
  Prelude
  System
System> 
--8<---------------cut here---------------end--------------->8---

Looks very good to me, thank you!

-- 
Ricardo




^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95.
  2022-02-12 21:45   ` [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95 Ludovic Courtès
@ 2022-02-12 22:35     ` Maxime Devos
  2022-02-12 22:37     ` Maxime Devos
                       ` (4 subsequent siblings)
  5 siblings, 0 replies; 22+ messages in thread
From: Maxime Devos @ 2022-02-12 22:35 UTC (permalink / raw)
  To: Ludovic Courtès, 53964

[-- Attachment #1: Type: text/plain, Size: 676 bytes --]

Ludovic Courtès schreef op za 12-02-2022 om 22:45 [+0100]:
> +               (replace 'configure
> +                 (lambda* (#:key outputs build configure-flags
> +                           #:allow-other-keys)
> +                   ;; It's an old 'configure' script so it needs some help.
> +                   (let ((out (assoc-ref outputs "out")))

Input labels (well, ‘output labels’) can be removed here to a degree:

(lambda* (#:key build configure-flags #:allow-other-keys)
  ;; [...]
  (define out #$output)
  (setenv "CONFIG_SHELL" [...])
  [...])

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95.
  2022-02-12 21:45   ` [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95 Ludovic Courtès
  2022-02-12 22:35     ` Maxime Devos
@ 2022-02-12 22:37     ` Maxime Devos
  2022-02-14  9:23       ` Ludovic Courtès
  2022-02-12 22:40     ` Maxime Devos
                       ` (3 subsequent siblings)
  5 siblings, 1 reply; 22+ messages in thread
From: Maxime Devos @ 2022-02-12 22:37 UTC (permalink / raw)
  To: Ludovic Courtès, 53964

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

Ludovic Courtès schreef op za 12-02-2022 om 22:45 [+0100]:
> +                     (apply invoke "./configure"
> +                            (string-append "--prefix=" out)
> +                            (string-append "--build=" build)
> +                            (string-append "--host=" build)
> +                            configure-flags))))

Seems incorrect when gcc is being cross-compiled, "--build" or "--host"
(I always forget which) should be set to 'target' (in the Guix sense,
not the autools sense).

Or perhaps it doesn't matter since #:system is always "i686-linux" ...

Greetings,
Maxime.


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95.
  2022-02-12 21:45   ` [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95 Ludovic Courtès
  2022-02-12 22:35     ` Maxime Devos
  2022-02-12 22:37     ` Maxime Devos
@ 2022-02-12 22:40     ` Maxime Devos
  2022-02-14  9:25       ` Ludovic Courtès
  2022-02-12 22:43     ` Maxime Devos
                       ` (2 subsequent siblings)
  5 siblings, 1 reply; 22+ messages in thread
From: Maxime Devos @ 2022-02-12 22:40 UTC (permalink / raw)
  To: Ludovic Courtès, 53964

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

Ludovic Courtès schreef op za 12-02-2022 om 22:45 [+0100]:
> +               (add-before 'configure 'remove-bundled-texinfo
> +                 (lambda _
> +                   ;; Do not build the bundled Texinfo.
> +                   (delete-file-recursively "texinfo")

Unbundling seems more something for a source snippet to me,
since it's ‘cleaning up’ the source code.  ‘(guix)Snipppets versus
Phases’ also says:

The boundary between using an origin snippet versus a build phase to
modify the sources of a package can be elusive.  Origin snippets are
typically used to remove unwanted files such as bundled libraries,
[...]

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95.
  2022-02-12 21:45   ` [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95 Ludovic Courtès
                       ` (2 preceding siblings ...)
  2022-02-12 22:40     ` Maxime Devos
@ 2022-02-12 22:43     ` Maxime Devos
  2022-02-12 22:45     ` Maxime Devos
  2022-02-12 22:47     ` Maxime Devos
  5 siblings, 0 replies; 22+ messages in thread
From: Maxime Devos @ 2022-02-12 22:43 UTC (permalink / raw)
  To: Ludovic Courtès, 53964

[-- Attachment #1: Type: text/plain, Size: 717 bytes --]

Ludovic Courtès schreef op za 12-02-2022 om 22:45 [+0100]:
> +    (native-inputs (list texinfo))
> [...]
> +                   ;; Go ahead despite the many warnings.
> +                   (substitute* '("Makefile.in" "gcc/Makefile.in")
> +                     (("^MAKEINFOFLAGS =.*")
> +                      "MAKEINFOFLAGS = --force\n")))))))

FWIW, since gcc@2.95 is an ancient version of gcc only used for
bootstrapping, personally I would not bother with building the
documentation.

OTOH, there have been quite some changes in gcc, and the documentation
isn't getting in the way of anyone not interested in it ...

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95.
  2022-02-12 21:45   ` [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95 Ludovic Courtès
                       ` (3 preceding siblings ...)
  2022-02-12 22:43     ` Maxime Devos
@ 2022-02-12 22:45     ` Maxime Devos
  2022-02-14  9:26       ` Ludovic Courtès
  2022-02-12 22:47     ` Maxime Devos
  5 siblings, 1 reply; 22+ messages in thread
From: Maxime Devos @ 2022-02-12 22:45 UTC (permalink / raw)
  To: Ludovic Courtès, 53964

[-- Attachment #1: Type: text/plain, Size: 576 bytes --]

Ludovic Courtès schreef op za 12-02-2022 om 22:45 [+0100]:
> +    (native-search-paths
> +     (list (search-path-specification
> +            (variable "C_INCLUDE_PATH")
> +            (files '("include")))
> +           (search-path-specification
> +            (variable "LIBRARY_PATH")
> +            (files '("lib")))))))

Perhaps a comment

  ;; version 2.95 of gcc@ only supports C, so no CPLUS_INCLUDE_PATH

would be useful to answer the question of why the search paths are
overridden?

Greetings,
Maxime

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95.
  2022-02-12 21:45   ` [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95 Ludovic Courtès
                       ` (4 preceding siblings ...)
  2022-02-12 22:45     ` Maxime Devos
@ 2022-02-12 22:47     ` Maxime Devos
  2022-02-14  9:33       ` Ludovic Courtès
  5 siblings, 1 reply; 22+ messages in thread
From: Maxime Devos @ 2022-02-12 22:47 UTC (permalink / raw)
  To: Ludovic Courtès, 53964

[-- Attachment #1: Type: text/plain, Size: 153 bytes --]

Ludovic Courtès schreef op za 12-02-2022 om 22:45 [+0100]:
> +           #:tests? #f

Why are tests disabled here?

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#53964] [PATCH 3/4] gnu: ghc@4: Build without referring to packages in commencement.scm.
  2022-02-12 21:45   ` [bug#53964] [PATCH 3/4] gnu: ghc@4: Build without referring to packages in commencement.scm Ludovic Courtès
@ 2022-02-12 22:49     ` Maxime Devos
  2022-02-14  9:35       ` Ludovic Courtès
  2022-02-12 22:52     ` Maxime Devos
  1 sibling, 1 reply; 22+ messages in thread
From: Maxime Devos @ 2022-02-12 22:49 UTC (permalink / raw)
  To: Ludovic Courtès, 53964

[-- Attachment #1: Type: text/plain, Size: 689 bytes --]

Ludovic Courtès schreef op za 12-02-2022 om 22:45 [+0100]:
> -       (patches (list (search-patch "ghc-4.patch")))))
> +       (patches (search-patches "ghc-4.patch"))))

Looks like an unrelated change to me.  From (guix)Submitting Patches:

  13. Verify that your patch contains only one set of related changes.
     Bundling unrelated changes together makes reviewing harder and
     slower.

     Examples of unrelated changes include the addition of several
     packages, or a package update along with fixes to that package.

Perhaps this is acceptable though for the same reasons removing
trailing #t from phases is acceptable ...

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#53964] [PATCH 3/4] gnu: ghc@4: Build without referring to packages in commencement.scm.
  2022-02-12 21:45   ` [bug#53964] [PATCH 3/4] gnu: ghc@4: Build without referring to packages in commencement.scm Ludovic Courtès
  2022-02-12 22:49     ` Maxime Devos
@ 2022-02-12 22:52     ` Maxime Devos
  2022-02-14  9:36       ` Ludovic Courtès
  1 sibling, 1 reply; 22+ messages in thread
From: Maxime Devos @ 2022-02-12 22:52 UTC (permalink / raw)
  To: Ludovic Courtès, 53964

[-- Attachment #1: Type: text/plain, Size: 434 bytes --]

Ludovic Courtès schreef op za 12-02-2022 om 22:45 [+0100]:
> +GhcRtsHcOpts=-optc-DDEBUG -optc-D__HUGS__ -unreg -optc-g -optc-D_GNU_SOURCE=1
> +GhcRtsCcOpts=-optc-DDEBUG -optc-g -optc-D__HUGS__ -optc-D_GNU_SOURCE=1

What's this for? AFAICT this seems rather unrelated to ‘Build without
referring to packages in [...]’, but then I don't know what these two
lines mean so maybe it is actually related.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95.
  2022-02-12 22:37     ` Maxime Devos
@ 2022-02-14  9:23       ` Ludovic Courtès
  0 siblings, 0 replies; 22+ messages in thread
From: Ludovic Courtès @ 2022-02-14  9:23 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 53964

Maxime Devos <maximedevos@telenet.be> skribis:

> Ludovic Courtès schreef op za 12-02-2022 om 22:45 [+0100]:
>> +                     (apply invoke "./configure"
>> +                            (string-append "--prefix=" out)
>> +                            (string-append "--build=" build)
>> +                            (string-append "--host=" build)
>> +                            configure-flags))))
>
> Seems incorrect when gcc is being cross-compiled, "--build" or "--host"
> (I always forget which) should be set to 'target' (in the Guix sense,
> not the autools sense).
>
> Or perhaps it doesn't matter since #:system is always "i686-linux" ...

Right, it probably cannot be cross-compiled and that’s fine.

(For some reason this old ‘configure’ script needed both ‘--build’ and
‘--host’.)

Ludo’.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95.
  2022-02-12 22:40     ` Maxime Devos
@ 2022-02-14  9:25       ` Ludovic Courtès
  0 siblings, 0 replies; 22+ messages in thread
From: Ludovic Courtès @ 2022-02-14  9:25 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 53964

Maxime Devos <maximedevos@telenet.be> skribis:

> Ludovic Courtès schreef op za 12-02-2022 om 22:45 [+0100]:
>> +               (add-before 'configure 'remove-bundled-texinfo
>> +                 (lambda _
>> +                   ;; Do not build the bundled Texinfo.
>> +                   (delete-file-recursively "texinfo")
>
> Unbundling seems more something for a source snippet to me,
> since it's ‘cleaning up’ the source code.

Right I’ll move it there.

(The bundled texinfo was a surprise to me; it actually builds but seems
to be broken in some way.)

Ludo’.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95.
  2022-02-12 22:45     ` Maxime Devos
@ 2022-02-14  9:26       ` Ludovic Courtès
  0 siblings, 0 replies; 22+ messages in thread
From: Ludovic Courtès @ 2022-02-14  9:26 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 53964

Maxime Devos <maximedevos@telenet.be> skribis:

> Ludovic Courtès schreef op za 12-02-2022 om 22:45 [+0100]:
>> +    (native-search-paths
>> +     (list (search-path-specification
>> +            (variable "C_INCLUDE_PATH")
>> +            (files '("include")))
>> +           (search-path-specification
>> +            (variable "LIBRARY_PATH")
>> +            (files '("lib")))))))
>
> Perhaps a comment
>
>   ;; version 2.95 of gcc@ only supports C, so no CPLUS_INCLUDE_PATH
>
> would be useful to answer the question of why the search paths are
> overridden?

Good idea, will do!

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95.
  2022-02-12 22:47     ` Maxime Devos
@ 2022-02-14  9:33       ` Ludovic Courtès
  2022-02-14 11:22         ` [bug#53964] [PATCH 0/4] Build nhc98 and ghc@4 with regular dependencies Ludovic Courtès
  0 siblings, 1 reply; 22+ messages in thread
From: Ludovic Courtès @ 2022-02-14  9:33 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 53964

Maxime Devos <maximedevos@telenet.be> skribis:

> Ludovic Courtès schreef op za 12-02-2022 om 22:45 [+0100]:
>> +           #:tests? #f
>
> Why are tests disabled here?

That’s the same for all the GCC variants, including ‘gcc-core-mesboot0’,
which was the inspiration for this one.  I think the main reason is that
“it’s difficult” (there’s a dependency on DejaGNU, the fact that you
cannot expect all tests to pass, and the fact that many tests would
probably need to be adjusted.)

In this case I didn’t even try, but since it’s an ancient package, it’s
even more likely to be problematic, and since it’s only used for
bootstrapping, I would not bother as long as it’s good enough to build
ghc@4.

Thoughts?

Ludo’.




^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#53964] [PATCH 3/4] gnu: ghc@4: Build without referring to packages in commencement.scm.
  2022-02-12 22:49     ` Maxime Devos
@ 2022-02-14  9:35       ` Ludovic Courtès
  0 siblings, 0 replies; 22+ messages in thread
From: Ludovic Courtès @ 2022-02-14  9:35 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 53964

Maxime Devos <maximedevos@telenet.be> skribis:

> Ludovic Courtès schreef op za 12-02-2022 om 22:45 [+0100]:
>> -       (patches (list (search-patch "ghc-4.patch")))))
>> +       (patches (search-patches "ghc-4.patch"))))
>
> Looks like an unrelated change to me.  From (guix)Submitting Patches:
>
>   13. Verify that your patch contains only one set of related changes.
>      Bundling unrelated changes together makes reviewing harder and
>      slower.
>
>      Examples of unrelated changes include the addition of several
>      packages, or a package update along with fixes to that package.
>
> Perhaps this is acceptable though for the same reasons removing
> trailing #t from phases is acceptable ...

You’re right, I can make it a different patch.

Ludo’.




^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#53964] [PATCH 3/4] gnu: ghc@4: Build without referring to packages in commencement.scm.
  2022-02-12 22:52     ` Maxime Devos
@ 2022-02-14  9:36       ` Ludovic Courtès
  0 siblings, 0 replies; 22+ messages in thread
From: Ludovic Courtès @ 2022-02-14  9:36 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 53964

Maxime Devos <maximedevos@telenet.be> skribis:

> Ludovic Courtès schreef op za 12-02-2022 om 22:45 [+0100]:
>> +GhcRtsHcOpts=-optc-DDEBUG -optc-D__HUGS__ -unreg -optc-g -optc-D_GNU_SOURCE=1
>> +GhcRtsCcOpts=-optc-DDEBUG -optc-g -optc-D__HUGS__ -optc-D_GNU_SOURCE=1
>
> What's this for? AFAICT this seems rather unrelated to ‘Build without
> referring to packages in [...]’, but then I don't know what these two
> lines mean so maybe it is actually related.

These lines were already there.  I add ‘-D_GNU_SOURCE=1’ to allow builds
with current libc.

Overall a large part of the things in this patch series were already
there, only in a different form.  :-)

Ludo’.




^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#53964] [PATCH 0/4] Build nhc98 and ghc@4 with regular dependencies
  2022-02-14  9:33       ` Ludovic Courtès
@ 2022-02-14 11:22         ` Ludovic Courtès
  0 siblings, 0 replies; 22+ messages in thread
From: Ludovic Courtès @ 2022-02-14 11:22 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 53964

Ludovic Courtès <ludo@gnu.org> skribis:

> Maxime Devos <maximedevos@telenet.be> skribis:
>
>> Ludovic Courtès schreef op za 12-02-2022 om 22:45 [+0100]:
>>> +           #:tests? #f
>>
>> Why are tests disabled here?
>
> That’s the same for all the GCC variants, including ‘gcc-core-mesboot0’,
> which was the inspiration for this one.  I think the main reason is that
> “it’s difficult” (there’s a dependency on DejaGNU, the fact that you
> cannot expect all tests to pass, and the fact that many tests would
> probably need to be adjusted.)

So I tried out of curiosity and was surprised to see that ‘make check’
succeeds!  It’s not entirely clear how many tests were run though since
DejaGNU isn’t very talkative:

--8<---------------cut here---------------start------------->8---
Test run by nixbld on Mon Feb 14 11:21:04 2022
Native configuration is i686-unknown-linux-gnu
Test run by nixbld on Mon Feb 14 11:21:04 2022

		=== gcc tests ===

Native configuration is i686-unknown-linux-gnu

		=== g77 tests ===

Schedule of variations:
WARNING: Couldn't find tool init file
    unix


[...]


		=== g++ Summary ===

make[1]: Leaving directory '/tmp/guix-build-gcc-2.95.3.drv-0/gcc-2.95.3/gcc'
/gnu/store/7s2zlc4r9wqvlh9x2gqmzm4lnmbsdzmn-bash-minimal-5.1.8/bin/sh ./regress-demangle ./demangle-expected
All 616 tests passed
make[2]: Leaving directory '/tmp/guix-build-gcc-2.95.3.drv-0/gcc-2.95.3/libiberty/testsuite'
make[1]: Leaving directory '/tmp/guix-build-gcc-2.95.3.drv-0/gcc-2.95.3/libiberty'
--8<---------------cut here---------------end--------------->8---

Anyway, it can’t hurt.

I also found that building in parallel is reliable enough.

Ludo’.




^ permalink raw reply	[flat|nested] 22+ messages in thread

* bug#53964: [PATCH 0/4] Build nhc98 and ghc@4 with regular dependencies
  2022-02-12 22:14 ` [bug#53964] [PATCH 0/4] Build nhc98 and ghc@4 with regular dependencies Ricardo Wurmus
@ 2022-02-14 14:58   ` Ludovic Courtès
  0 siblings, 0 replies; 22+ messages in thread
From: Ludovic Courtès @ 2022-02-14 14:58 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 53964-done, Maxime Devos

Hello!

Ricardo Wurmus <rekado@elephly.net> skribis:

> The patches look good to me.  I built ghc@4, fired up STGHugs, and
> successfully loaded a module.

Thanks for testing!

I adjusted as suggested by Maxime and pushed this series:

  ee230f15c6 gnu: Remove glibc@2.2.5 and gcc-2.95-wrapper.
  d9df65514c gnu: ghc@4: Build without referring to packages in commencement.scm.
  6ef0cd9ade gnu: ghc@4: Use 'search-patches'.
  66f12401d4 gnu: gcc: Add 2.95.
  4fa516474b gnu: nhc98: Build with the current tool chain.

Ludo’.




^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2022-02-14 15:43 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-12 21:43 [bug#53964] [PATCH 0/4] Build nhc98 and ghc@4 with regular dependencies Ludovic Courtès
2022-02-12 21:45 ` [bug#53964] [PATCH 1/4] gnu: nhc98: Build with the current tool chain Ludovic Courtès
2022-02-12 21:45   ` [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95 Ludovic Courtès
2022-02-12 22:35     ` Maxime Devos
2022-02-12 22:37     ` Maxime Devos
2022-02-14  9:23       ` Ludovic Courtès
2022-02-12 22:40     ` Maxime Devos
2022-02-14  9:25       ` Ludovic Courtès
2022-02-12 22:43     ` Maxime Devos
2022-02-12 22:45     ` Maxime Devos
2022-02-14  9:26       ` Ludovic Courtès
2022-02-12 22:47     ` Maxime Devos
2022-02-14  9:33       ` Ludovic Courtès
2022-02-14 11:22         ` [bug#53964] [PATCH 0/4] Build nhc98 and ghc@4 with regular dependencies Ludovic Courtès
2022-02-12 21:45   ` [bug#53964] [PATCH 3/4] gnu: ghc@4: Build without referring to packages in commencement.scm Ludovic Courtès
2022-02-12 22:49     ` Maxime Devos
2022-02-14  9:35       ` Ludovic Courtès
2022-02-12 22:52     ` Maxime Devos
2022-02-14  9:36       ` Ludovic Courtès
2022-02-12 21:45   ` [bug#53964] [PATCH 4/4] gnu: Remove glibc@2.2.5 and gcc-2.95-wrapper Ludovic Courtès
2022-02-12 22:14 ` [bug#53964] [PATCH 0/4] Build nhc98 and ghc@4 with regular dependencies Ricardo Wurmus
2022-02-14 14:58   ` bug#53964: " Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.