From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0 Subject: Re: [PATCH v2] gnu: Add rust (sidenotes on rust) Date: Tue, 13 Sep 2016 12:19:37 +0000 Message-ID: <8760q0dmau.fsf@we.make.ritual.n0.is> References: <1473227838-22277-1-git-send-email-eric.le.bihan.dev@free.fr> <87bmzsdnf3.fsf@we.make.ritual.n0.is> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjmhI-0005Fw-0u for guix-devel@gnu.org; Tue, 13 Sep 2016 08:20:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjmhB-0007VT-Fi for guix-devel@gnu.org; Tue, 13 Sep 2016 08:20:18 -0400 Received: from aibo.runbox.com ([91.220.196.211]:55598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjmhB-0007V3-91 for guix-devel@gnu.org; Tue, 13 Sep 2016 08:20:13 -0400 In-Reply-To: <87bmzsdnf3.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: David Craven , Eric Le Bihan Cc: guix-devel ng0 writes: > I can testbuild rustc and give some input. > > Additionally, we're having conversations about rust, today this came up: > > > dev @> Very interesting: https://github.com/rust-lang/rfcs/blob/master/text/1200-cargo-install.md > " it's not clear that this is worthwhile enough to support installing libraries yet." > on bootstraping: https://mail.mozilla.org/pipermail/rust-dev/2014-June/010222.html > > dev @> apparently cargo is not designed to use system paths to find dynamic libraries > by default libraries are downloaded from github and stored in a cache directory > > > How problematic will this be for us? Our person in charge for the rust > stuff works around this by including copies of the libraries in a folder > named 'third_party', but I don't understand enough of the language and > lack a build system at the moment. These two links should be useful too, so it might not be that hard to establish a build system. http://doc.crates.io/source-replacement.html http://doc.crates.io/specifying-dependencies.html > David Craven writes: > >> I haven't actually built rustc yet, because I know how long it takes... >> >>> + (ld-so (string-append >>> + (assoc-ref inputs "libc") >>> + ,(glibc-dynamic-linker))) >> >>> + ;; Remove reference to "/lib64/ld-linux-x86-64.so.2" from binary >>> + (zero? (system* >>> + "patchelf" >>> + "--set-interpreter" ld-so >> >> I think that this should be part of the a rustc-bootstrap package. We >> shouldn't export binaries to the user, but I think we need a fully >> functional bootstrap compiler. >> >>> + (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")) >> >> I think this should be a separate phase. We can then use >> #:configure-flags to pass --default-linker etc. >> >>> + #:tests? #f)) >> >> To get tests enabled you can apply this patch [0]. >> >> [0] https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/rust/patches/disable-lockfile-check.patch >> > > -- > ng0 > For non-prism friendly talk find me on http://www.psyced.org > > -- ng0