[PATCH core-updates-frozen 00/12] Fix (assoc-ref ... "out") related Ocaml build failures

  • Done
  • quality assurance status badge
Details
3 participants
  • Julien Lepiller
  • Maxime Devos
  • Mathieu Othacehe
Owner
unassigned
Submitted by
Maxime Devos
Severity
normal
M
M
Maxime Devos wrote on 20 Aug 2021 14:47
(address . guix-patches@gnu.org)
215b0088e542b2fb9bcf3be9ff74c5874770f878.camel@telenet.be
Reported by 'slyfox' on IRC.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYR+kXRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7mafAQC0aIVEt07emNUdWfhwokOv/C7B
W14MQ7JexVHip/kx+AD+I3gvFF/1h0UVxg2l2zURzQMfXh3NIxZsWoCT0wzEFAg=
=DZM9
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 20 Aug 2021 14:48
[PATCH core-updates-frozen 01/12] gnu: ocaml: Fix reference to output.
(address . 50134@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20210820124848.13293-1-maximedevos@telenet.be
* gnu/packages/ocaml.scm
(dune-boot)[arguments]<#:make-flags>: Use #$output.
---
gnu/packages/ocaml.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

Toggle diff (37 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 183f88dd01..b8d52bb283 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -22,6 +22,7 @@
;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -87,6 +88,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system ocaml)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
@@ -1620,10 +1622,10 @@ full_split, cut, rcut, etc..")
(build-system ocaml-build-system)
(arguments
`(#:tests? #f; require odoc
- #:make-flags (list "release"
- (string-append "PREFIX=" (assoc-ref %outputs "out"))
- (string-append "LIBDIR=" (assoc-ref %outputs "out")
- "/lib/ocaml/site-lib"))
+ #:make-flags ,#~(list "release"
+ (string-append "PREFIX=" #$output)
+ (string-append "LIBDIR=" #$output
+ "/lib/ocaml/site-lib"))
#:phases
(modify-phases %standard-phases
(replace 'configure
--
2.33.0
M
M
Maxime Devos wrote on 20 Aug 2021 14:48
[PATCH core-updates-frozen 02/12] gnu: ocamlbuild: Fix reference to output.
(address . 50134@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20210820124848.13293-2-maximedevos@telenet.be
* gnu/packages/ocaml.scm
(ocamlbuild)[arguments]<#:make-flags>: Use #$output.
---
gnu/packages/ocaml.scm | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)

Toggle diff (25 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index b8d52bb283..1624823394 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -456,13 +456,11 @@ depend: $(STDLIB_MLIS) $(STDLIB_DEPS)"))
(build-system ocaml-build-system)
(arguments
`(#:make-flags
- (list (string-append "OCAMLBUILD_PREFIX=" (assoc-ref %outputs "out"))
- (string-append "OCAMLBUILD_BINDIR=" (assoc-ref %outputs "out")
- "/bin")
- (string-append "OCAMLBUILD_LIBDIR=" (assoc-ref %outputs "out")
- "/lib/ocaml/site-lib")
- (string-append "OCAMLBUILD_MANDIR=" (assoc-ref %outputs "out")
- "/share/man"))
+ ,#~(list (string-append "OCAMLBUILD_PREFIX=" #$output)
+ (string-append "OCAMLBUILD_BINDIR=" #$output "/bin")
+ (string-append "OCAMLBUILD_LIBDIR=" #$output
+ "/lib/ocaml/site-lib")
+ (string-append "OCAMLBUILD_MANDIR=" #$output "/share/man"))
#:phases
(modify-phases %standard-phases
(delete 'configure))
--
2.33.0
M
M
Maxime Devos wrote on 20 Aug 2021 14:48
[PATCH core-updates-frozen 03/12] gnu: ocamlcudf: Fix reference to output.
(address . 50134@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20210820124848.13293-3-maximedevos@telenet.be
* gnu/packages/ocaml.scm
(ocamlcudf)[arguments]<#:make-flags>: Use #$output.
---
gnu/packages/ocaml.scm | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

Toggle diff (20 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 1624823394..c97f633cbe 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -583,10 +583,9 @@ for day to day programming.")
("ocaml-ounit" ,ocaml-ounit)))
(arguments
`(#:make-flags
- (list
- "all" "opt"
- (string-append "BINDIR=" (assoc-ref %outputs "out")
- "/bin"))
+ ,#~(list
+ "all" "opt"
+ (string-append "BINDIR=" #$output "/bin"))
#:phases
(modify-phases %standard-phases
(delete 'configure))))
--
2.33.0
M
M
Maxime Devos wrote on 20 Aug 2021 14:48
[PATCH core-updates-frozen 04/12] gnu: ocaml-dose3: Fix reference to inputs and output.
(address . 50134@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20210820124848.13293-4-maximedevos@telenet.be
The package 'lablgtk@2.8.10' (indirect dependency of ocaml-dose3)
fails to build so this patch could not be tested.

* gnu/packages/ocaml.scm
(ocaml-dose3)[arguments]<#:make-flags>: Use #$output.
(ocaml-dose3)[arguments]<#:configure-flags>: Don't use %build-inputs.
---
gnu/packages/ocaml.scm | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)

Toggle diff (32 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index c97f633cbe..0043e9fbee 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -44,6 +44,7 @@
#:use-module (gnu packages algebra)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages bison)
#:use-module (gnu packages boost)
#:use-module (gnu packages compression)
@@ -644,13 +645,11 @@ underlying solvers like Cplex, Gurobi, Lpsolver, Glpk, CbC, SCIP or WBO.")
(build-system ocaml-build-system)
(arguments
`(#:configure-flags
- (list (string-append "SHELL="
- (assoc-ref %build-inputs "bash")
- "/bin/sh"))
+ ,#~(list (string-append "SHELL="
+ #+(file-append (canonical-package bash-minimal)
+ "/bin/sh")))
#:make-flags
- (list (string-append "LIBDIR="
- (assoc-ref %outputs "out")
- "/lib/ocaml/site-lib"))
+ ,#~(list (string-append "LIBDIR=" #$output "/lib/ocaml/site-lib"))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-test-script
--
2.33.0
M
M
Maxime Devos wrote on 20 Aug 2021 14:48
[PATCH core-updates-frozen 05/12] gnu: ocaml-cmdliner: Fix reference to output.
(address . 50134@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20210820124848.13293-5-maximedevos@telenet.be
* gnu/packages/ocaml.scm
(ocaml-cmdliner)[arguments]<#:make-flags>: Use #$output.
---
gnu/packages/ocaml.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 0043e9fbee..48950589c5 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2141,8 +2141,8 @@ dates and times.")
`(("ocamlbuild" ,ocamlbuild)))
(arguments
`(#:tests? #f
- #:make-flags (list (string-append "LIBDIR=" (assoc-ref %outputs "out")
- "/lib/ocaml/site-lib/cmdliner"))
+ #:make-flags ,#~(list (string-append "LIBDIR=" #$output
+ "/lib/ocaml/site-lib/cmdliner"))
#:phases
(modify-phases %standard-phases
(delete 'configure)
--
2.33.0
M
M
Maxime Devos wrote on 20 Aug 2021 14:48
[PATCH core-updates-frozen 06/12] gnu: ocaml-opam-file-format: Fix reference to output.
(address . 50134@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20210820124848.13293-6-maximedevos@telenet.be
* gnu/packages/ocaml.scm
(ocaml-opam-file-format)[arguments]<#:make-flags>: Use #$output.
---
gnu/packages/ocaml.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 48950589c5..1e32ebee60 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -761,8 +761,8 @@ let () = String.split_on_char ':' (Sys.getenv \"OCAMLPATH\")
(build-system ocaml-build-system)
(arguments
`(#:tests? #f; No tests
- #:make-flags (list (string-append "LIBDIR=" (assoc-ref %outputs "out")
- "/lib/ocaml/site-lib"))
+ #:make-flags ,#~(list (string-append "LIBDIR=" #$output
+ "/lib/ocaml/site-lib"))
#:phases
(modify-phases %standard-phases
(delete 'configure))))
--
2.33.0
M
M
Maxime Devos wrote on 20 Aug 2021 14:48
[PATCH core-updates-frozen 07/12] gnu: camlzip: Fix reference to output.
(address . 50134@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20210820124848.13293-7-maximedevos@telenet.be
* gnu/packages/ocaml.scm
(camlzip)[arguments]<#:make-flags>: Use #$output.
---
gnu/packages/ocaml.scm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 1e32ebee60..66d4460446 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1392,9 +1392,8 @@ other XUnit testing frameworks.")
(format port "directory=\"../zip\"\n")))))))
#:install-target "install-findlib"
#:make-flags
- (list "all" "allopt"
- (string-append "INSTALLDIR=" (assoc-ref %outputs "out")
- "/lib/ocaml"))))
+ ,#~(list "all" "allopt"
+ (string-append "INSTALLDIR=" #$output "/lib/ocaml"))))
(home-page "https://github.com/xavierleroy/camlzip")
(synopsis "Provides easy access to compressed files")
(description "Provides easy access to compressed files in ZIP, GZIP and
--
2.33.0
M
M
Maxime Devos wrote on 20 Aug 2021 14:48
[PATCH core-updates-frozen 08/12] gnu: ocaml-down: Fix reference to output.
(address . 50134@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20210820124848.13293-8-maximedevos@telenet.be
The package 'lablgtk@2.8.10' (indirect dependency of ocaml-down)
fails to build so this patch could not be tested.

* gnu/packages/ocaml.scm
(ocaml-down)[arguments]<#:build-flags>: Use #$output.
---
gnu/packages/ocaml.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 66d4460446..81e967cd34 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -701,8 +701,8 @@ repository-wide uninstallability checks.")
(modify-phases %standard-phases
(delete 'configure))
#:build-flags
- (list "build" "--lib-dir"
- (string-append (assoc-ref %outputs "out") "/lib/ocaml/site-lib"))))
+ ,#~(list "build" "--lib-dir"
+ (string-append #$output "/lib/ocaml/site-lib"))))
(native-inputs
`(("ocaml-findlib" ,ocaml-findlib)
("ocamlbuild" ,ocamlbuild)
--
2.33.0
M
M
Maxime Devos wrote on 20 Aug 2021 14:48
[PATCH core-updates-frozen 10/12] gnu: omake: Fix reference to output.
(address . 50134@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20210820124848.13293-10-maximedevos@telenet.be
* gnu/packages/ocaml.scm
(omake)[arguments]<#:make-flags>: Use #$output.
---
gnu/packages/ocaml.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 6fe8cb46f9..7385d6e413 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -3029,7 +3029,7 @@ OCaml code.")
(build-system ocaml-build-system)
(arguments
`(#:make-flags
- (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
+ ,#~(list (string-append "PREFIX=" #$output))
#:tests? #f ; no test target
#:phases
(modify-phases %standard-phases
--
2.33.0
M
M
Maxime Devos wrote on 20 Aug 2021 14:48
[PATCH core-updates-frozen 11/12] gnu: ocaml4.07-piqi: Fix reference to inputs and output.
(address . 50134@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20210820124848.13293-11-maximedevos@telenet.be
The package 'lablgtk@2.8.10' (indirect dependency of ocaml4.07-piqi)
fails to build so this patch could not be tested.

* gnu/packages/ocaml.scm
(ocaml4.07-piqi)[arguments]<#:make-flags>: Use #$output.
---
gnu/packages/ocaml.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Toggle diff (20 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7385d6e413..e89c1adbb9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -3704,9 +3704,10 @@ and 4 (random based) according to RFC 4122.")
(build-system ocaml-build-system)
(arguments
`(#:make-flags
- (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
- (string-append "SHELL=" (assoc-ref %build-inputs "bash")
- "/bin/sh"))
+ ,#~(list (string-append "DESTDIR=" #$output)
+ (string-append "SHELL="
+ #+(file-append (canonical-package bash-minimal)
+ "/bin/sh")))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'make-files-writable
--
2.33.0
M
M
Maxime Devos wrote on 20 Aug 2021 14:48
[PATCH core-updates-frozen 09/12] gnu: ocaml-frontc: Fix reference to output.
(address . 50134@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20210820124848.13293-9-maximedevos@telenet.be
* gnu/packages/ocaml.scm
(ocaml-frontc)[arguments]<#:make-flags>: Use #$output.
---
gnu/packages/ocaml.scm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 81e967cd34..6fe8cb46f9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1498,9 +1498,8 @@ archive(byte) = \"frontc.cma\"
archive(native) = \"frontc.cmxa\""))))
(symlink (string-append out "/lib/ocaml/frontc")
(string-append out "/lib/ocaml/FrontC"))))))
- #:make-flags (list (string-append "PREFIX="
- (assoc-ref %outputs "out"))
- "OCAML_SITE=$(LIB_DIR)/ocaml/")))
+ #:make-flags ,#~(list (string-append "PREFIX=" #$output)
+ "OCAML_SITE=$(LIB_DIR)/ocaml/")))
(properties `((upstream-name . "FrontC")))
(home-page "https://www.irit.fr/FrontC")
(synopsis "C parser and lexer library")
--
2.33.0
M
M
Maxime Devos wrote on 20 Aug 2021 14:48
[PATCH core-updates-frozen 12/12] gnu: dedukti: Fix reference to output.
(address . 50134@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20210820124848.13293-12-maximedevos@telenet.be
* gnu/packages/ocaml.scm
(dedukti)[arguments]<#:phases>: Use #$output. Remove trailing #t.
---
gnu/packages/ocaml.scm | 39 +++++++++++++++++----------------------
1 file changed, 17 insertions(+), 22 deletions(-)

Toggle diff (52 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e89c1adbb9..82ee34c542 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4137,28 +4137,23 @@ cross-platform SDL C library.")
(build-system ocaml-build-system)
(arguments
`(#:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (replace 'build
- (lambda _
- (invoke "make")
- #t))
- (replace 'check
- (lambda _
- (invoke "make" "tests")
- #t))
- (add-before 'install 'set-binpath
- ;; Change binary path in the makefile
- (lambda _
- (let ((out (assoc-ref %outputs "out")))
- (substitute* "GNUmakefile"
- (("BINDIR = (.*)$")
- (string-append "BINDIR = " out "/bin"))))
- #t))
- (replace 'install
- (lambda _
- (invoke "make" "install")
- #t)))))
+ ,#~(modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda _
+ (invoke "make")))
+ (replace 'check
+ (lambda _
+ (invoke "make" "tests")))
+ (add-before 'install 'set-binpath
+ ;; Change binary path in the makefile
+ (lambda _
+ (substitute* "GNUmakefile"
+ (("BINDIR = (.*)$")
+ (string-append "BINDIR = " #$output "/bin")))))
+ (replace 'install
+ (lambda _
+ (invoke "make" "install"))))))
(synopsis "Proof-checker for the λΠ-calculus modulo theory, an extension of
the λ-calculus")
(description "Dedukti is a proof-checker for the λΠ-calculus modulo
--
2.33.0
J
J
Julien Lepiller wrote on 20 Aug 2021 15:13
Re: [bug#50134] [PATCH cor e-updates-frozen 00/12] Fi x (assoc-ref ... "out") re lated Ocaml build failures
41AC2FAA-6489-4BAE-95A5-42B8BE73E6B0@lepiller.eu
Thanks, the series looks good to me, though untested on my side.

Le 20 août 2021 08:47:24 GMT-04:00, Maxime Devos <maximedevos@telenet.be> a écrit :
Toggle quote (1 lines)
>Reported by 'slyfox' on IRC.
Attachment: file
M
M
Mathieu Othacehe wrote on 20 Aug 2021 18:34
Re: bug#50134: [PATCH core-updates-frozen 00/12] Fix (assoc-ref ... "out") related Ocaml build failures
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 50134-done@debbugs.gnu.org)
87y28wqdlk.fsf@gnu.org
Hey Maxime,

Pushed on core-updates-frozen.

Thanks,

Mathieu
Closed
?