all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* LLVM: "FileCheck" is missing
@ 2016-03-25 17:45 Danny Milosavljevic
  2016-03-25 21:58 ` Nils Gillmann
  2016-03-25 22:06 ` rust work in progress conflicts (was: Re: LLVM: "FileCheck" is missing) Nils Gillmann
  0 siblings, 2 replies; 27+ messages in thread
From: Danny Milosavljevic @ 2016-03-25 17:45 UTC (permalink / raw)
  To: guix-devel

Hi,

is anyone familiar with our LLVM packages? 

I'm trying to package rust and run into

  /gnu/store/pmiw7p7a6hwl6k2kblsk3zwhxh3gln21-llvm-3.6.2/bin/FileCheck is missing 

when configuring rust. Indeed, it is missing in the entire tree

  /gnu/store/pmiw7p7a6hwl6k2kblsk3zwhxh3gln21-llvm-3.6.2

.

It seems to be a tool for unit testing.

The rusts I'm trying to use are:

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014, 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; 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 <http://www.gnu.org/licenses/>.

(define-module (gnu packages rust)
  #:use-module ((guix licenses)
                #:select (asl2.0))
  #:use-module (gnu packages)
  #:use-module (gnu packages curl)
  #:use-module (gnu packages python)
  #:use-module (gnu packages llvm)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system trivial)
  #:use-module (guix utils)
)

(define-public rust
  (package
    (name "rust")
    (version "1.9.0")
    (home-page "http://www.rust-lang.org/")
    (synopsis "Rust Programming Language")
    (description "Safe, Concurrent Programming Language")
    (license (list asl2.0)) ; FIXME and which MIT
    (build-system gnu-build-system) ; FIXME rust-build-system
    (inputs `(
; TODO llvm python jemalloc nacl musl
("llvm" ,llvm)

))
    (native-inputs `(
("curl" ,curl) ; FIXME remove
("python-2" ,python-2)
("llvm" ,llvm) ; 3.6 ??
; TODO ?
))
    (source
      (origin
         (method url-fetch)
         (uri "https://static.rust-lang.org/dist/2016-03-25/rustc-nightly-src.tar.gz")
         (sha256 (base32 "01sxhssllwqckmmzck6b17kaqqx622mwslwhjdrrkwjwa5qy7v54"))
         ;(uri (string-append "https://github.com/rust-lang/rust/archive/" version ".tar.gz"))
         ;(sha256 (base32 "1m2d1dc243s7ym8fq2yag3fr5jvki0q9c39llfwgcpq1gc8jvcn8"))
))
    (arguments
      `(#:configure-flags `( ;"-DCFG_BUILD=x86_64-unknown-linux-gnu"
                              ;"-disable-codegen-tests" ; because FileCheck is not built in llvm. https://github.com/alexcrichton/rust/commit/295a70f4b92d961c2e74cc750e47083e118ee10a
                             ) ; FIXME don't hard-code
        #:phases
          (modify-phases %standard-phases
            (replace 'configure
                     (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
                      (let ((out (assoc-ref outputs "out")))
                        (zero? (apply system*
                                      `("./configure"
                                        ,(string-append "--prefix=" out)
                                        ,(string-append "--llvm-root=" (assoc-ref inputs "llvm"))
                                        ; FIXME (string-append "--extra-ldflags=-Wl,-rpath-=" out "/lib")
                                        ,@configure-flags)))))))))

; FIXME remove src/llvm
;configure: CFG_LLVM_ROOT        :=  
;configure: CFG_PYTHON           :=  
;configure: CFG_JEMALLOC_ROOT    :=  
;configure: CFG_NACL_CROSS_PATH  :=  
;configure: CFG_MUSL_ROOT        := /usr/local 

))

^ permalink raw reply	[flat|nested] 27+ messages in thread
* Re: Rust
@ 2016-07-29 19:10 David Craven
  2016-07-30 13:39 ` Rust Ludovic Courtès
  0 siblings, 1 reply; 27+ messages in thread
From: David Craven @ 2016-07-29 19:10 UTC (permalink / raw)
  To: guix-devel

> Can we reasonably expect to bootstrap it from source,
> using a series of previous Rust versions, or using an
> alternative implementation?

Currently as Jelle said no. But there is [0] that may be a
viable option in the future.

> Having crates available as normal Guix packages is the
> best option for Guix users: uniform interface, the ability
> to use ‘guix environment’ and all the tools, transactional
> upgrade and rollback, etc.

I think with a cargo plugin that interacts with the guix daemon,
we could achive the same advantages. If we want to package
servo (mozillas experimental rust webbrowser) we could add
a guix package for servo, specify it uses the cargo build
system and that would call cargo build-guix.
For other rust projects (that don't need packaging) it could add
a project profile and add the symlinks in $PROJECT_DIR/target/.

I don't think we should dismiss this possibility straight away...
Rust contributors have been very helpful with issues that arose on
nixos. I think it may be even possible that at some point in the
future cargo build could detect if there is a guix/nix daemon
available and use that as the storage backend instead of
$HOME/.cargo/registry.

[0] https://github.com/thepowersgang/mrustc

^ permalink raw reply	[flat|nested] 27+ messages in thread
* Re: Rust
@ 2016-09-04 14:50 David Craven
  2016-09-07  6:04 ` Rust Eric Le Bihan
  0 siblings, 1 reply; 27+ messages in thread
From: David Craven @ 2016-09-04 14:50 UTC (permalink / raw)
  To: guix-devel, eric.le.bihan.dev

> IIUC, to provide a Guix package for Cargo, the following should be done:

> 1. write a crate importer.
> 2. list all the crates needed by Cargo to build itself.
> 3. package each crate with the importer.
> 4. add a Cargo package which depends on the newly-imported crates and
> uses a binary version of Cargo to bootstrap itself (though this is not
> the best option in terms of auditing/reproducibility).

Have you made any progress on this? =)

FYI I also think that that's the best course of action. I remember
dealing with non gnu-build-system packages in nixos was a bit of a
pain, so I was biased against the importer thing. I think guix does a
better job at it...

To build the crates needed to build cargo a good idea is probably to
have rust-build-system take a #:cargo and a #:rustc package. Then you
can pass the binary versions for bootstrapping cargo.

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2016-09-07  6:05 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-25 17:45 LLVM: "FileCheck" is missing Danny Milosavljevic
2016-03-25 21:58 ` Nils Gillmann
2016-03-25 22:06 ` rust work in progress conflicts (was: Re: LLVM: "FileCheck" is missing) Nils Gillmann
2016-05-04 10:34   ` Jelle Licht
2016-05-05 13:35     ` rust work in progress conflicts Ludovic Courtès
2016-05-05 14:46       ` Alex Griffin
2016-05-06  9:05         ` Andy Wingo
2016-05-06  9:15           ` Andy Wingo
2016-05-06  9:59         ` Ludovic Courtès
2016-05-05 15:06     ` ng0
2016-07-28  8:28       ` ng0
2016-07-28 18:31         ` Eric Le Bihan
2016-07-29  9:03           ` Andreas Enge
2016-07-29 11:40             ` Vincent Legoll
2016-07-29 14:37               ` ng0
2016-07-30 10:04             ` Eric Le Bihan
2016-07-29 15:16           ` Rust Ludovic Courtès
2016-07-29 15:34             ` Rust Alex Griffin
2016-07-29 16:08               ` Rust Jelle Licht
2016-07-30 13:34               ` Rust Ludovic Courtès
2016-07-30 17:57                 ` Rust Pjotr Prins
2016-07-30 11:01             ` Rust Eric Le Bihan
2016-07-30 13:44               ` Rust Ludovic Courtès
  -- strict thread matches above, loose matches on Subject: below --
2016-07-29 19:10 Rust David Craven
2016-07-30 13:39 ` Rust Ludovic Courtès
2016-09-04 14:50 Rust David Craven
2016-09-07  6:04 ` Rust Eric Le Bihan

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.