From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMIbn-0007f7-9t for guix-patches@gnu.org; Sat, 17 Jun 2017 14:38:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMIbi-00043h-Ns for guix-patches@gnu.org; Sat, 17 Jun 2017 14:38:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:50987) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dMIbi-00043d-KQ for guix-patches@gnu.org; Sat, 17 Jun 2017 14:38:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dMIbi-0005Br-EF for guix-patches@gnu.org; Sat, 17 Jun 2017 14:38:02 -0400 Subject: [bug#27412] [PATCH] gnu: rustc: Enable tests. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMIat-00073X-Dq for guix-patches@gnu.org; Sat, 17 Jun 2017 14:37:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMIao-0003QY-Vb for guix-patches@gnu.org; Sat, 17 Jun 2017 14:37:11 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:52302) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dMIao-0003Oq-Om for guix-patches@gnu.org; Sat, 17 Jun 2017 14:37:06 -0400 From: Danny Milosavljevic Date: Sat, 17 Jun 2017 20:37:01 +0200 Message-Id: <20170617183701.28819-1-dannym@scratchpost.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 27412@debbugs.gnu.org * 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)