GNU bug report logs -
#27412
[PATCH] gnu: rustc: Enable tests.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27412 in the body.
You can then email your comments to 27412 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#27412
; Package
guix-patches
.
(Sat, 17 Jun 2017 18:38:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Danny Milosavljevic <dannym <at> scratchpost.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sat, 17 Jun 2017 18:38:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/rust.scm (rustc)[source]: Remove bundled llvm.
[native-inputs]: Add bison, flex, procps.
[inputs]: Update llvm to llvm-3.9.1.
[arguments]: Patch and enable tests.
---
gnu/packages/rust.scm | 35 +++++++++++++++++++++++++++--------
1 file changed, 27 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 1217ec71f..1c03bde2a 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -21,13 +21,16 @@
(define-module (gnu packages rust)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bison)
#:use-module (gnu packages bootstrap)
#:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
#:use-module (gnu packages elf)
+ #:use-module (gnu packages flex)
#:use-module (gnu packages gcc)
#:use-module (gnu packages jemalloc)
+ #:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
@@ -205,22 +208,27 @@ rustc-bootstrap and cargo-bootstrap packages.")
"rustc-" version "-src.tar.gz"))
(sha256
(base32
- "1d78jq7mc34n265by68amr9r4nzbiqrilfbwh7gx56ydn4gb6rpr"))))
+ "1d78jq7mc34n265by68amr9r4nzbiqrilfbwh7gx56ydn4gb6rpr"))
+ (modules '((guix build utils)))
+ (snippet
+ `(begin
+ (delete-file-recursively "src/llvm")
+ #t))))
(build-system gnu-build-system)
(native-inputs
- `(("cmake" ,cmake)
+ `(("bison" ,bison) ; For the tests
+ ("cmake" ,cmake)
+ ("flex" ,flex) ; For the tests
("git" ,git)
+ ("procps" ,procps) ; For the tests
("python-2" ,python-2)
("rust-bootstrap" ,rust-bootstrap)
("which" ,which)))
(inputs
`(("jemalloc" ,jemalloc)
- ("llvm" ,llvm)))
+ ("llvm" ,llvm-3.9.1)))
(arguments
- ;; FIXME: Test failure with llvm 3.8; Update llvm.
- ;; https://github.com/rust-lang/rust/issues/36835
- `(#:tests? #f
- #:phases
+ `(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-configure
(lambda _
@@ -254,7 +262,18 @@ rustc-bootstrap and cargo-bootstrap packages.")
(substitute* "src/tools/tidy/src/main.rs"
(("^.*cargo.*::check.*$") ""))
(substitute* "src/libstd/process.rs"
- (("\"/bin/sh\"") (string-append "\"" bash "/bin/sh\"")))
+ ;; The newline is intentional.
+ ;; There's a line length "tidy" check in Rust which would
+ ;; fail otherwise.
+ (("\"/bin/sh\"") (string-append "
+\"" bash "/bin/sh\"")))
+ (substitute* "src/libstd/sys/unix/process/process_common.rs"
+ (("fn test_process_mask") "#[cfg_attr(target_os = \"linux\", ignore)]
+fn test_process_mask"))
+ (substitute* "src/vendor/libc/src/lib.rs"
+ (("TODO") "TXDO"))
+ ;; Our ld-wrapper cannot process non-UTF8 bytes in LIBRARY_PATH.
+ (delete-file-recursively "src/test/run-make/linker-output-non-utf8")
#t)))
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
Information forwarded
to
guix-patches <at> gnu.org
:
bug#27412
; Package
guix-patches
.
(Sun, 18 Jun 2017 16:18:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 27412 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Danny Milosavljevic <dannym <at> scratchpost.org> writes:
> * gnu/packages/rust.scm (rustc)[source]: Remove bundled llvm.
> [native-inputs]: Add bison, flex, procps.
> [inputs]: Update llvm to llvm-3.9.1.
> [arguments]: Patch and enable tests.
Great!
[...]
> @@ -254,7 +262,18 @@ rustc-bootstrap and cargo-bootstrap packages.")
> (substitute* "src/tools/tidy/src/main.rs"
> (("^.*cargo.*::check.*$") ""))
> (substitute* "src/libstd/process.rs"
> - (("\"/bin/sh\"") (string-append "\"" bash "/bin/sh\"")))
> + ;; The newline is intentional.
> + ;; There's a line length "tidy" check in Rust which would
> + ;; fail otherwise.
> + (("\"/bin/sh\"") (string-append "
> +\"" bash "/bin/sh\"")))
Can you use '\n' instead?
> + (substitute* "src/libstd/sys/unix/process/process_common.rs"
> + (("fn test_process_mask") "#[cfg_attr(target_os = \"linux\", ignore)]
> +fn test_process_mask"))
I'm guessing this is disabled due to some build container oddity?
> + (substitute* "src/vendor/libc/src/lib.rs"
> + (("TODO") "TXDO"))
A comment about this would be nice.
> + ;; Our ld-wrapper cannot process non-UTF8 bytes in LIBRARY_PATH.
> + (delete-file-recursively "src/test/run-make/linker-output-non-utf8")
This is temporary, right? Maybe add the guix-devel URL?
LGTM!
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#27412
; Package
guix-patches
.
(Sun, 18 Jun 2017 17:29:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 27412 <at> debbugs.gnu.org (full text, mbox):
Hi Marius,
On Sun, 18 Jun 2017 18:17:48 +0200
Marius Bakke <mbakke <at> fastmail.com> wrote:
> > + (("\"/bin/sh\"") (string-append "
> > +\"" bash "/bin/sh\"")))
>
> Can you use '\n' instead?
No idea. I don't really use '\n' in Guile at all. I'll try it...
> > + (substitute* "src/libstd/sys/unix/process/process_common.rs"
> > + (("fn test_process_mask") "#[cfg_attr(target_os = \"linux\", ignore)]
> > +fn test_process_mask"))
>
> I'm guessing this is disabled due to some build container oddity?
Yeah. Strangely enough if I manually run the tests in "guix environment -C -N", it works. WTF?
See <https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00222.html>.
> > + (substitute* "src/vendor/libc/src/lib.rs"
> > + (("TODO") "TXDO"))
I think this was a false flag and it works without that substitution. I'll try...
> > + ;; Our ld-wrapper cannot process non-UTF8 bytes in LIBRARY_PATH.
> > + (delete-file-recursively "src/test/run-make/linker-output-non-utf8")
>This is temporary, right?
Not really. I think Guile will continue to convert char* to Unicode UCS-4 (or similar) strings - so I don't see how that's ever going to change. What this Rust test does is it explicitly uses a NON-Unicode character (as in 0xFF) to make sure that that works, too.
I'm not sure what the use case is for that...
See <https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00193.html>.
>Maybe add the guix-devel URL?
I'll add links to these archive entries as comments, and try without the "TODO" substitution and if all is well then I'll push to master (building takes ≈ 4 h per round, so no hurry).
Thanks for the review!
bug closed, send any further explanations to
27412 <at> debbugs.gnu.org and Danny Milosavljevic <dannym <at> scratchpost.org>
Request was from
Danny Milosavljevic <dannym <at> scratchpost.org>
to
control <at> debbugs.gnu.org
.
(Sat, 15 Jul 2017 10:45:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 12 Aug 2017 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 41 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.