From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0 Subject: Re: [PATCH v2] gnu: Add rust Date: Tue, 13 Sep 2016 19:11:49 +0000 Message-ID: <87mvjb7gy2.fsf@we.make.ritual.n0.is> References: <1473227838-22277-1-git-send-email-eric.le.bihan.dev@free.fr> <878tuwdmrd.fsf@we.make.ritual.n0.is> <20160913192059.471f151a@itchy> <87oa3rfybr.fsf@we.make.ritual.n0.is> <874m5j1vwd.fsf@we.make.ritual.n0.is> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjt87-0000xw-KJ for guix-devel@gnu.org; Tue, 13 Sep 2016 15:12:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjt84-0002OW-84 for guix-devel@gnu.org; Tue, 13 Sep 2016 15:12:27 -0400 Received: from aibo.runbox.com ([91.220.196.211]:44185) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjt83-0002O7-Pt for guix-devel@gnu.org; Tue, 13 Sep 2016 15:12:24 -0400 In-Reply-To: <874m5j1vwd.fsf@we.make.ritual.n0.is> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Eric Le Bihan Cc: guix-devel@gnu.org This now fails differently after a good while of compiling. llvm[1]: ***** Completed Release Build make[1]: Leaving directory '/tmp/guix-build-rust-1.10.0.drv-0/rustc-1.10.0/x86_64-unknown-linux-gnu/llvm' rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore compile: x86_64-unknown-linux-gnu/rustllvm/ExecutionEngineWrapper.o compile: x86_64-unknown-linux-gnu/rustllvm/RustWrapper.o compile: x86_64-unknown-linux-gnu/rustllvm/PassWrapper.o compile: x86_64-unknown-linux-gnu/rustllvm/ArchiveWrapper.o link: x86_64-unknown-linux-gnu/rt/librustllvm.a ar: `u' modifier ignored since `D' is the default (see `U') src/libcore/lib.rs:69:12: 69:33 warning: unused or unknown feature, #[warn(unused_features)] on by default src/libcore/lib.rs:69 #![feature(cfg_target_has_atomic)] ^~~~~~~~~~~~~~~~~~~~~ rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_unicode rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_bitflags rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_system rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcollections rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_abort rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libarena rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libflate rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgetopts rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgraphviz rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libterm rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblog rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libfmt_macros rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_llvm rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_platform_intrinsics cp: x86_64-unknown-linux-gnu/stage1/lib/libstd rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserialize error: linking with `cc` failed: exit code: 1 note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/tmp/guix-build-rust-1.10.0.drv-0/rustc-1.10.0/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib" "x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/rustc_llvm-2f39a9bd.0.o" "-o" "x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_llvm-2f39a9bd.so" "x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/rustc_llvm-2f39a9bd.metadata.o" "-Wl,-O1" "-nodefaultlibs" "-L" "x86_64-unknown-linux-gnu/rt" "-L" "/tmp/guix-build-rust-1.10.0.drv-0/rustc-1.10.0/x86_64-unknown-linux-gnu/llvm/Release/lib" "-L" "/tmp/guix-build-rust-1.10.0.drv-0/rustc-1.10.0/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-Wl, --whole-archive" "-l" "rustllvm" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMInterpreter" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMMCJIT" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMExecutionEngine" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMRuntimeDyld" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMipo" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMVectorize" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMLinker" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMIRReader" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMAsmParser" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMPowerPCDisassembler" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMPowerPCCodeGen" "-Wl,- -no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMPowerPCAsmParser" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMPowerPCDesc" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMPowerPCInfo" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMPowerPCAsmPrinter" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMMipsDisassembler" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMMipsCodeGen" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMMipsAsmParser" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMMipsDesc" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMMipsInfo" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMMipsAsmPrinter" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMAArch64Disassembler" "-Wl,--no-w hole-archive" "-Wl,--whole-archive" "-l" "LLVMAArch64CodeGen" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMAArch64AsmParser" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMAArch64Desc" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMAArch64Info" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMAArch64AsmPrinter" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMAArch64Utils" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMARMDisassembler" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMARMCodeGen" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMARMAsmParser" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMARMDesc" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMARMInfo" "-Wl,--no-whole-archive" "-W l,--whole-archive" "-l" "LLVMARMAsmPrinter" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMX86Disassembler" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMX86AsmParser" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMX86CodeGen" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMSelectionDAG" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMAsmPrinter" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMCodeGen" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMTarget" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMScalarOpts" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMInstCombine" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMInstrumentation" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLV MProfileData" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMTransformUtils" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMBitWriter" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMAnalysis" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMX86Desc" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMObject" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMMCParser" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMBitReader" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMMCDisassembler" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMX86Info" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMX86AsmPrinter" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMMC" "-Wl,--no-whole-archive" "-Wl,--whole- archive" "-l" "LLVMX86Utils" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMCore" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-l" "LLVMSupport" "-Wl,--no-whole-archive" "-Wl,-Bdynamic" "-l" "pthread" "-l" "dl" "-l" "m" "-l" "stdc++" "-L" "/tmp/guix-build-rust-1.10.0.drv-0/rustc-1.10.0/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "std-2f39a9bd" "-l" "dl" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-l" "util" "-shared" "-Wl,-rpath,$ORIGIN/" "-Wl,-rpath,/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,--enable-new-dtags" "-l" "compiler-rt" note: ld: cannot find -lLLVMInterpreter ld: cannot find -lLLVMMCJIT ld: cannot find -lLLVMRuntimeDyld ld: cannot find -lLLVMPowerPCDisassembler ld: cannot find -lLLVMPowerPCCodeGen ld: cannot find -lLLVMPowerPCAsmParser ld: cannot find -lLLVMPowerPCDesc ld: cannot find -lLLVMPowerPCInfo ld: cannot find -lLLVMPowerPCAsmPrinter ld: cannot find -lLLVMMipsDisassembler ld: cannot find -lLLVMMipsCodeGen ld: cannot find -lLLVMMipsAsmParser ld: cannot find -lLLVMMipsDesc ld: cannot find -lLLVMMipsInfo ld: cannot find -lLLVMMipsAsmPrinter ld: cannot find -lLLVMAArch64Disassembler ld: cannot find -lLLVMAArch64CodeGen ld: cannot find -lLLVMAArch64AsmParser ld: cannot find -lLLVMAArch64Desc ld: cannot find -lLLVMAArch64Info ld: cannot find -lLLVMAArch64AsmPrinter ld: cannot find -lLLVMAArch64Utils ld: cannot find -lLLVMARMDisassembler ld: cannot find -lLLVMARMCodeGen ld: cannot find -lLLVMARMAsmParser ld: cannot find -lLLVMARMDesc ld: cannot find -lLLVMARMInfo ld: cannot find -lLLVMARMAsmPrinter ld: cannot find -lLLVMX86Disassembler ld: cannot find -lLLVMX86AsmParser ld: cannot find -lLLVMX86CodeGen ld: cannot find -lLLVMSelectionDAG ld: cannot find -lLLVMAsmPrinter ld: cannot find -lLLVMX86Desc ld: cannot find -lLLVMMCParser ld: cannot find -lLLVMMCDisassembler ld: cannot find -lLLVMX86Info ld: cannot find -lLLVMX86AsmPrinter ld: cannot find -lLLVMX86Utils collect2: error: ld returned 1 exit status error: aborting due to previous error make: *** [/tmp/guix-build-rust-1.10.0.drv-0/rustc-1.10.0/mk/target.mk:216: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/stamp.rustc_llvm] Error 101 make: *** Waiting for unfinished jobs.... phase `build' failed after 672.4 seconds builder for `/gnu/store/c8acq3klhxjf50sb31wfbsg48v6rg2kj-rust-1.10.0.drv' failed with exit code 1 @ build-failed /gnu/store/c8acq3klhxjf50sb31wfbsg48v6rg2kj-rust-1.10.0.drv - 1 builder for `/gnu/store/c8acq3klhxjf50sb31wfbsg48v6rg2kj-rust-1.10.0.drv' failed with exit code 1 guix build: error: build failed: build of `/gnu/store/c8acq3klhxjf50sb31wfbsg48v6rg2kj-rust-1.10.0.drv' failed Cannot open display "default display" derivation '/gnu/store/c8acq3klhxjf50sb31wfbsg48v6rg2kj-rust-1.10.0.drv' offloaded to '192.168.1.198' failed with exit code 1 @ build-failed /gnu/store/c8acq3klhxjf50sb31wfbsg48v6rg2kj-rust-1.10.0.drv - 1 builder for `/gnu/store/c8acq3klhxjf50sb31wfbsg48v6rg2kj-rust-1.10.0.drv' failed with exit code 100 guix build: error: build failed: build of `/gnu/store/c8acq3klhxjf50sb31wfbsg48v6rg2kj-rust-1.10.0.drv' failed ng0 writes: > Disregard this, works now. > > ng0 writes: > >> Eric Le Bihan writes: >> >>> Hi! >>> >>> Le Tue, 13 Sep 2016 12:09:42 +0000, >>> ng0 a écrit : >>> >>>> I can not apply this patch with git am. Can you resend the patch as an >>>> appended file created with git format-patch or something similar, and >>>> not inlined? >>> >>> That's surprising: the patch was generated by `git format-patch` and >>> sent via `git send-email`. My mail client is Claws Mail and it allows >>> me to save the email I previously sent to a file in mbox format, which >>> applies without problem with `git am`. >>> >>> Anyway, please find it re-attached to this mail. >> >> Thanks, worked this time. >> >>> Best regards, >> >> >> I get this output, same like I had with what jelle ended up with my >> base, produced an equal first error at some point. >> >> Okay, i just realized there was a mistake in the patch i applied, I need >> to check it again, but I've got this before.. I don't know what's wrong >> here. >> >> substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 100.0% >> substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 100.0% >> process 16829 acquired build slot '/var/guix/offload/192.168.1.198/0' >> Cannot open display "default display" >> load on machine '192.168.1.198' is 0.0 (normalized: 0.0) >> @ build-started /gnu/store/qaf7fvpw6z8h6ck5ia9ignik8r6bsm0d-rust-stage0-2016-02-17-4d3eebf.drv - x86_64-linux /var/log/guix/drvs/qa//f7fvpw6z8h6ck5ia9ignik8r6bsm0d-rust-stage0-2016-02-17-4d3eebf.drv.bz2 >> Cannot open display "default display" >> Cannot open display "default display" >> sending 2 store files to '192.168.1.198'... >> Cannot open display "default display" >> exporting path `/gnu/store/hpj2m538l2anjb6bwksxgbivjxz5gnzj-rust-stage0-2016-02-17-4d3eebf-linux-x86_64-d29b7607d13d64078b6324aec82926fb493f59ba.tar.bz2.drv' >> exporting path `/gnu/store/qaf7fvpw6z8h6ck5ia9ignik8r6bsm0d-rust-stage0-2016-02-17-4d3eebf.drv' >> offloading '/gnu/store/qaf7fvpw6z8h6ck5ia9ignik8r6bsm0d-rust-stage0-2016-02-17-4d3eebf.drv' to '192.168.1.198'... >> @ build-remote /gnu/store/qaf7fvpw6z8h6ck5ia9ignik8r6bsm0d-rust-stage0-2016-02-17-4d3eebf.drv 192.168.1.198 >> Cannot open display "default display" >> substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 100.0% >> The following derivation will be built: >> /gnu/store/qaf7fvpw6z8h6ck5ia9ignik8r6bsm0d-rust-stage0-2016-02-17-4d3eebf.drv >> @ build-started /gnu/store/qaf7fvpw6z8h6ck5ia9ignik8r6bsm0d-rust-stage0-2016-02-17-4d3eebf.drv - x86_64-linux /var/log/guix/drvs/qa//f7fvpw6z8h6ck5ia9ignik8r6bsm0d-rust-stage0-2016-02-17-4d3eebf.drv.bz2 >> Backtrace: >> In ice-9/boot-9.scm: >> 157: 11 [catch #t # ...] >> In unknown file: >> ?: 10 [apply-smob/1 #] >> In ice-9/boot-9.scm: >> 63: 9 [call-with-prompt prompt0 ...] >> In ice-9/eval.scm: >> 432: 8 [eval # #] >> In ice-9/boot-9.scm: >> 2401: 7 [save-module-excursion #] >> 4050: 6 [#] >> 1724: 5 [%start-stack load-stack #] >> 1729: 4 [#] >> In unknown file: >> ?: 3 [primitive-load "/gnu/store/x5fjjgvzbrcibsv2zwqvsay5zc4916xx-rust-stage0-2016-02-17-4d3eebf-guile-builder"] >> In ice-9/eval.scm: >> 387: 2 [eval # ()] >> 411: 1 [eval # ()] >> In unknown file: >> ?: 0 [string-append #f "/lib/ld-linux-x86-64.so.2"] >> >> ERROR: In procedure string-append: >> ERROR: In procedure string-append: Wrong type (expecting string): #f >> builder for `/gnu/store/qaf7fvpw6z8h6ck5ia9ignik8r6bsm0d-rust-stage0-2016-02-17-4d3eebf.drv' failed with exit code 1 >> @ build-failed /gnu/store/qaf7fvpw6z8h6ck5ia9ignik8r6bsm0d-rust-stage0-2016-02-17-4d3eebf.drv - 1 builder for `/gnu/store/qaf7fvpw6z8h6ck5ia9ignik8r6bsm0d-rust-stage0-2016-02-17-4d3eebf.drv' failed with exit code 1 >> guix build: error: build failed: build of `/gnu/store/qaf7fvpw6z8h6ck5ia9ignik8r6bsm0d-rust-stage0-2016-02-17-4d3eebf.drv' failed >> Cannot open display "default display" >> derivation '/gnu/store/qaf7fvpw6z8h6ck5ia9ignik8r6bsm0d-rust-stage0-2016-02-17-4d3eebf.drv' offloaded to '192.168.1.198' failed with exit code 1 >> @ build-failed /gnu/store/qaf7fvpw6z8h6ck5ia9ignik8r6bsm0d-rust-stage0-2016-02-17-4d3eebf.drv - 1 builder for `/gnu/store/qaf7fvpw6z8h6ck5ia9ignik8r6bsm0d-rust-stage0-2016-02-17-4d3eebf.drv' failed with exit code 100 >> cannot build derivation `/gnu/store/0jplgx6n7a8qc93h36cjwr0bxxcksrah-rust-1.8.0.drv': 1 dependencies couldn't be built >> guix build: error: build failed: build of `/gnu/store/0jplgx6n7a8qc93h36cjwr0bxxcksrah-rust-1.8.0.drv' failed >> >> >> >>> -- >>> ELB >>> From 4f52b3f041e040d93a0a2f178d3b4a6e8f49df9f Mon Sep 17 00:00:00 2001 >>> From: Eric Le Bihan >>> Date: Thu, 28 Jul 2016 20:09:01 +0200 >>> Subject: [PATCH v2] gnu: Add rust >>> >>> * gnu/packages/rust.scm(rust): New variable. >>> >>> Signed-off-by: Eric Le Bihan >>> --- >>> gnu/packages/rust.scm | 143 ++++++++++++++++++++++++++++++++++++++++++++++++++ >>> 1 file changed, 143 insertions(+) >>> create mode 100644 gnu/packages/rust.scm >>> >>> diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm >>> new file mode 100644 >>> index 0000000..7f2edb8 >>> --- /dev/null >>> +++ b/gnu/packages/rust.scm >>> @@ -0,0 +1,143 @@ >>> +;;; GNU Guix --- Functional package management for GNU >>> +;;; Copyright © 2016 Eric Le Bihan >>> +;;; >>> +;;; This file is part of GNU Guix. >>> +;;; >>> +;;; GNU Guix is free software; you can redistribute it and/or modify it >>> +;;; under the terms of the GNU General Public License as published by >>> +;;; the Free Software Foundation; either version 3 of the License, or (at >>> +;;; your option) any later version. >>> +;;; >>> +;;; GNU Guix is distributed in the hope that it will be useful, but >>> +;;; WITHOUT ANY WARRANTY; without even the implied warranty of >>> +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >>> +;;; GNU General Public License for more details. >>> +;;; >>> +;;; You should have received a copy of the GNU General Public License >>> +;;; along with GNU Guix. If not, see . >>> + >>> +(define-module (gnu packages rust) >>> + #:use-module (ice-9 regex) >>> + #:use-module ((guix licenses) #:select (asl2.0 x11-style)) >>> + #:use-module (guix packages) >>> + #:use-module (guix download) >>> + #:use-module (guix build-system gnu) >>> + #:use-module (gnu packages base) >>> + #:use-module (gnu packages bootstrap) >>> + #:use-module (gnu packages curl) >>> + #:use-module (gnu packages elf) >>> + #:use-module (gnu packages gcc) >>> + #:use-module (gnu packages jemalloc) >>> + #:use-module (gnu packages perl) >>> + #:use-module (gnu packages python)) >>> + >>> +(define rust-bootstrap-x86_64-1.9.0 >>> + (origin >>> + (method url-fetch) >>> + (uri >>> + "https://static.rust-lang.org/dist/2016-05-24/rustc-1.9.0-x86_64-unknown-linux-gnu.tar.gz") >>> + (sha256 >>> + (base32 >>> + "1i44rlvvn3pr81sli6bdbkzd78ar1ibybxx6mzpw6rkw4c84sw6h")))) >>> + >>> +(define rust-bootstrap-i686-1.9.0 >>> + (origin >>> + (method url-fetch) >>> + (uri >>> + "https://static.rust-lang.org/dist/2016-05-24/rustc-1.9.0-i686-unknown-linux-gnu.tar.gz") >>> + (sha256 >>> + (base32 >>> + "0fdf5xvh3g4hdza0y80w1r9vnfczjqnbzbvs7k878yc26p4dwl99")))) >>> + >>> +(define-public rust >>> + (package >>> + (name "rust") >>> + (version "1.10.0") >>> + (source (origin >>> + (method url-fetch) >>> + (uri (string-append "https://static.rust-lang.org/dist/rustc-" >>> + version "-src.tar.gz")) >>> + (sha256 >>> + (base32 >>> + "0sb82xb8y2pzs8l1hk91z228bambwx3dmi2kj8isin7nyjn5l0d4")))) >>> + (build-system gnu-build-system) >>> + (native-inputs >>> + `(("curl" ,curl) >>> + ("gcc" ,gcc) >>> + ("gcc-lib" ,gcc "lib") >>> + ("jemalloc" ,jemalloc) >>> + ("patchelf" ,patchelf) >>> + ("perl" ,perl) >>> + ("python" ,python-2) >>> + ("rust-bootstrap" >>> + ,(if (string-match "x86_64" >>> + (or (%current-target-system) (%current-system))) >>> + rust-bootstrap-x86_64-1.9.0 >>> + rust-bootstrap-i686-1.9.0)) >>> + ("which" ,which))) >>> + (arguments >>> + `(#:phases >>> + (modify-phases %standard-phases >>> + (add-after 'unpack 'unpack-bootstrap >>> + (lambda* (#:key inputs #:allow-other-keys) >>> + (with-directory-excursion (getcwd) >>> + (zero? (system* >>> + "tar" >>> + "--strip-components=1" >>> + "-xzf" >>> + (assoc-ref inputs "rust-bootstrap")))))) >>> + (replace 'configure >>> + (lambda* (#:key inputs outputs #:allow-other-keys) >>> + (let ((out (assoc-ref outputs "out")) >>> + (binutils (assoc-ref inputs "binutils")) >>> + (gcc (assoc-ref inputs "gcc")) >>> + (gcc-lib (assoc-ref inputs "gcc-lib")) >>> + (jemalloc (assoc-ref inputs "jemalloc")) >>> + (ld-so (string-append >>> + (assoc-ref inputs "libc") >>> + ,(glibc-dynamic-linker))) >>> + (python (assoc-ref inputs "python"))) >>> + (setenv "SHELL" (which "sh")) >>> + (setenv "CONFIG_SHELL" (which "sh")) >>> + ;; Tell where to find libgcc_s.so >>> + (setenv "LD_LIBRARY_PATH" (string-append gcc-lib "/lib")) >>> + ;; Remove reference to "/lib64/ld-linux-x86-64.so.2" from binary >>> + (zero? (system* >>> + "patchelf" >>> + "--set-interpreter" ld-so >>> + "rustc/bin/rustc")) >>> + (zero? (system* >>> + "./configure" >>> + (string-append "--prefix=" out) >>> + (string-append "--default-linker=" gcc "/bin/gcc") >>> + (string-append "--default-ar=" binutils "/bin/ar") >>> + (string-append "--jemalloc-root=" jemalloc "/lib") >>> + (string-append "--enable-rpath") >>> + (string-append "--enable-local-rust") >>> + (string-append "--local-rust-root=" (getcwd) "/rustc") >>> + (string-append "--python=" python "/bin/python2") >>> + "--disable-manage-submodules"))))) >>> + (add-before 'build 'create-linker-wrapper >>> + (lambda _ >>> + (let* ((bindir (string-append (getcwd) "/bin")) >>> + (cc (string-append bindir "/cc"))) >>> + (mkdir bindir) >>> + (call-with-output-file cc >>> + (lambda (port) >>> + (format port >>> + "#!~a\n\nexec gcc \"$@\"\n" (which "sh")))) >>> + (chmod cc #o755)))) >>> + (add-before 'build 'change-PATH >>> + (lambda _ >>> + (setenv "PATH" >>> + (string-append (getcwd) >>> + "/bin:" >>> + (getenv "PATH")))))) >>> + ;; Disable tests which can only be run from Git repository >>> + #:tests? #f)) >>> + (synopsis "Compiler for the Rust progamming language") >>> + (description >>> + "Rust is a systems programming language that runs blazingly fast, prevents >>> +segfaults, and guarantees thread safety.") >>> + (home-page "https://www.rust-lang.org") >>> + (license (list asl2.0 (x11-style "file://LICENSE-MIT"))))) >>> -- >>> 2.4.11 >>> >> >> -- >> ng0 >> >> > > -- > ng0 > > -- ng0