* bug#28034: elixir build fails
2017-12-03 5:43 ` Pjotr Prins
@ 2017-12-03 14:48 ` nee
2017-12-04 9:25 ` Ludovic Courtès
0 siblings, 1 reply; 7+ messages in thread
From: nee @ 2017-12-03 14:48 UTC (permalink / raw)
To: Pjotr Prins; +Cc: 28034
[-- Attachment #1: Type: text/plain, Size: 685 bytes --]
Hello, thank you for the fast and detailed reply.
I made two patches that upgrade erlang and elixir and disable the
failing tests in elixir, and got it to build again.
I sometimes get this undeterministic compile error (see the attached
log). It's always the same error, but it doesn't appear every time, so I
can get a passing build running:
`until ./pre-inst-env guix build elixir; do sleep 1; done`
I don't think that it is related to the version upgrade because I also
got this with the old versions when I first tried to build it today.
While this still not good, it is at least an improvement over the
current state where the package will fail to install in 100% of cases.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-erlang-Update-to-20.1.patch --]
[-- Type: text/x-patch; name="0001-gnu-erlang-Update-to-20.1.patch", Size: 1531 bytes --]
From fda40d470fab9ceb58c0e42e59db766eaf840730 Mon Sep 17 00:00:00 2001
From: nee <nee.git@cock.li>
Date: Sun, 3 Dec 2017 15:37:28 +0100
Subject: [PATCH 1/2] gnu: erlang: Update to 20.1.
* gnu/packages/erlang.scm (erlang): Update to 20.1.
---
gnu/packages/erlang.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm
index 1a575a0fd..770ed715b 100644
--- a/gnu/packages/erlang.scm
+++ b/gnu/packages/erlang.scm
@@ -35,7 +35,7 @@
(define-public erlang
(package
(name "erlang")
- (version "20.0")
+ (version "20.1")
(source (origin
(method url-fetch)
;; The tarball from http://erlang.org/download contains many
@@ -46,7 +46,7 @@
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
- "11xp6vv1v7iay9dg1xc6xm7izfsanbn5pgwp96ba0j1fmlkhjw92"))
+ "0r4g8ag7nlpw06y4c39fgcyccykj2sbyhv5jgp4qmrjci2ydgns8"))
(patches (search-patches "erlang-man-path.patch"))))
(build-system gnu-build-system)
(native-inputs
@@ -62,7 +62,7 @@
version ".tar.gz"))
(sha256
(base32
- "1k25p37w1l1j20qd8rga4j4q7s7r0rbsi02x3xwzhw51jhm59wdp"))))))
+ "0ikvdpn4z7az6szg176l1r2yxhgs3msa3wgb3gmy45jkz0pzik05"))))))
(inputs
`(("ncurses" ,ncurses)
("openssl" ,openssl)
--
2.14.1
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-elixir-Update-to-1.5.2-and-disable-failing-tests.patch --]
[-- Type: text/x-patch; name="0002-gnu-elixir-Update-to-1.5.2-and-disable-failing-tests.patch", Size: 3467 bytes --]
From 3fe3e538a098eb1c0e8fee4d99231c720282db53 Mon Sep 17 00:00:00 2001
From: nee <nee.git@cock.li>
Date: Sun, 3 Dec 2017 15:39:40 +0100
Subject: [PATCH 2/2] gnu: elixir: Update to 1.5.2 and disable failing tests.
* gnu/packages/elixir.scm (elixir)[origin]: Update to 1.5.2.
[arguments]: Patch the shebang of mix. Disable failing tests.
---
gnu/packages/elixir.scm | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
diff --git a/gnu/packages/elixir.scm b/gnu/packages/elixir.scm
index 7425b49a4..c630b635e 100644
--- a/gnu/packages/elixir.scm
+++ b/gnu/packages/elixir.scm
@@ -30,7 +30,7 @@
(define-public elixir
(package
(name "elixir")
- (version "1.4.2")
+ (version "1.5.2")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/elixir-lang/elixir"
@@ -38,7 +38,7 @@
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
- "0gsmgx4h6rvxilcbsx2z6yirm6g2g5bsxdvr0608ng4bsv22wknb"))
+ "0v7z0avs3gir7qdfgysfw88l3z9p5f7p7pjnrnsz5gmmsflvf5vk"))
;; FIXME: 27 tests (out of 4K) had to be disabled as
;; they fail in the build environment. Common failures
;; are:
@@ -55,14 +55,18 @@
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'replace-paths
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* '("lib/elixir/lib/system.ex"
- "lib/mix/lib/mix/scm/git.ex")
- (("(cmd\\(['\"])git" _ prefix)
- (string-append prefix (which "git"))))
- (substitute* "bin/elixir"
- (("ERL_EXEC=\"erl\"")
- (string-append "ERL_EXEC=" (which "erl"))))
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* '("lib/elixir/lib/system.ex"
+ "lib/mix/lib/mix/scm/git.ex")
+ (("(cmd\\(['\"])git" _ prefix)
+ (string-append prefix (which "git"))))
+ (substitute* "bin/elixir"
+ (("ERL_EXEC=\"erl\"")
+ (string-append "ERL_EXEC=" (which "erl"))))
+ (substitute* "bin/mix"
+ (("#!/usr/bin/env elixir")
+ (string-append "#!" out "/bin/elixir"))))
#t))
(add-after 'unpack 'fix-or-disable-tests
(lambda* (#:key inputs #:allow-other-keys)
@@ -75,6 +79,15 @@
;; FIXME: Mix.Shell.cmd() always fails with error code 130.
(delete-file "lib/mix/test/mix/shell_test.exs")
+
+ ;; FIXME:
+ ;; disabled failing impure tests to make it build again.
+ ;; related discussion: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28034#14
+ (delete-file "lib/elixir/test/elixir/kernel/cli_test.exs")
+ (delete-file "lib/elixir/test/elixir/kernel/dialyzer_test.exs")
+ (delete-file "lib/iex/test/iex/helpers_test.exs")
+ (delete-file "lib/ex_unit/test/ex_unit/capture_io_test.exs")
+
#t))
(add-before 'build 'make-current
;; The Elixir compiler checks whether or not to compile files by
--
2.14.1
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: elixir-epipe-error.log --]
[-- Type: text/x-log; name="elixir-epipe-error.log", Size: 4217 bytes --]
starting phase `build'
==> elixir (compile)
Compiled src/elixir_parser.yrl
Compiled src/elixir_sup.erl
Compiled src/elixir_def.erl
Compiled src/elixir_quote.erl
Compiled src/elixir_erl_clauses.erl
Compiled src/elixir_utils.erl
Compiled src/elixir_env.erl
Compiled src/elixir_overridable.erl
Compiled src/elixir_erl_pass.erl
Compiled src/elixir_interpolation.erl
Compiled src/elixir_aliases.erl
Compiled src/elixir_erl_compiler.erl
Compiled src/elixir_code_server.erl
Compiled src/elixir_lexical.erl
Compiled src/elixir_clauses.erl
Compiled src/elixir.erl
Compiled src/elixir_rewrite.erl
Compiled src/elixir_dispatch.erl
Compiled src/elixir_compiler.erl
Compiled src/elixir_erl_for.erl
Compiled src/elixir_bitstring.erl
Compiled src/elixir_bootstrap.erl
Compiled src/elixir_expand.erl
Compiled src/elixir_erl_try.erl
Compiled src/elixir_import.erl
Compiled src/elixir_map.erl
Compiled src/elixir_tokenizer.erl
Compiled src/elixir_erl_var.erl
Compiled src/elixir_erl.erl
Compiled src/elixir_errors.erl
Compiled src/elixir_module.erl
Compiled src/elixir_fn.erl
Compiled src/elixir_config.erl
Compiled src/elixir_locals.erl
Compiled src/elixir_parser.erl
==> bootstrap (compile)
Compiled lib/elixir/lib/kernel.ex
Compiled lib/elixir/lib/macro/env.ex
Compiled lib/elixir/lib/keyword.ex
Compiled lib/elixir/lib/module.ex
Compiled lib/elixir/lib/list.ex
Compiled lib/elixir/lib/macro.ex
Compiled lib/elixir/lib/code.ex
Compiled lib/elixir/lib/module/locals_tracker.ex
Compiled lib/elixir/lib/kernel/typespec.ex
Compiled lib/elixir/lib/kernel/utils.ex
Compiled lib/elixir/lib/behaviour.ex
warning: erlang:get_stacktrace/0 used in the wrong part of 'try' expression. (Use it in the block between 'catch' and 'end'.)
/tmp/guix-build-elixir-1.5.2.drv-0/elixir-1.5.2/lib/elixir/lib/exception.ex:1150
Compiled lib/elixir/lib/exception.ex
Compiled lib/elixir/lib/protocol.ex
Compiled lib/elixir/lib/stream/reducers.ex
Compiled lib/elixir/lib/enum.ex
Compiled lib/elixir/lib/inspect/algebra.ex
Compiled lib/elixir/lib/inspect.ex
Compiled lib/elixir/lib/range.ex
Compiled lib/elixir/lib/regex.ex
Compiled lib/elixir/lib/string.ex
Compiled lib/elixir/lib/string/chars.ex
Compiled lib/elixir/lib/io.ex
Compiled lib/elixir/lib/path.ex
Compiled lib/elixir/lib/file.ex
Compiled lib/elixir/lib/system.ex
Compiled lib/elixir/lib/kernel/cli.ex
Compiled lib/elixir/lib/kernel/error_handler.ex
Compiled lib/elixir/lib/kernel/parallel_compiler.ex
Compiled lib/elixir/lib/kernel/lexical_tracker.ex
==> elixir (compile)
warning: behaviour Enumerable is undefined
lib/calendar/date_range.ex:21
warning: behaviour Inspect is undefined
lib/calendar/date_range.ex:81
warning: behaviour String.Chars is undefined
lib/calendar/date.ex:582
warning: behaviour Inspect is undefined
lib/calendar/date.ex:588
warning: behaviour String.Chars is undefined
lib/calendar/time.ex:476
warning: behaviour Inspect is undefined
lib/calendar/time.ex:482
warning: behaviour String.Chars is undefined
lib/calendar/datetime.ex:473
warning: behaviour Inspect is undefined
lib/calendar/datetime.ex:482
warning: behaviour String.Chars is undefined
lib/calendar/naive_datetime.ex:677
warning: behaviour Inspect is undefined
lib/calendar/naive_datetime.ex:684
warning: erlang:get_stacktrace/0 used in the wrong part of 'try' expression. (Use it in the block between 'catch' and 'end'.)
lib/exception.ex:1150
warning: use Dict is deprecated, use the Map module for working with maps or the Keyword module for working with keyword lists
lib/hash_dict.ex:11
== Compilation error in file lib/system.ex ==
** (exit) :epipe
make: *** [Makefile:81: lib/elixir/ebin/Elixir.Kernel.beam] Error 1
phase `build' failed after 67.5 seconds
builder for `/gnu/store/s9d2icsm6aniyhpscgfphb1z879b4wbc-elixir-1.5.2.drv' failed with exit code 1
@ build-failed /gnu/store/s9d2icsm6aniyhpscgfphb1z879b4wbc-elixir-1.5.2.drv - 1 builder for `/gnu/store/s9d2icsm6aniyhpscgfphb1z879b4wbc-elixir-1.5.2.drv' failed with exit code 1
guix build: error: build failed: build of `/gnu/store/s9d2icsm6aniyhpscgfphb1z879b4wbc-elixir-1.5.2.drv' failed
^ permalink raw reply related [flat|nested] 7+ messages in thread