Hi Chris,

On Tue, 12 Feb 2019 03:47:53 -0800
Chris Marusich <cmmarus...@gmail.com> wrote:

> > Would you have some time and a free computer to be able to build rust 
> > 1.19.0 with 
> >
> >   ./pre-inst-env guix build -K -s i686-linux rust@1.19.0
> >
> > on guix master with the patch below?  
> 
> I have a spare computer.  It only has 2 GB of RAM and 2 GB of swap,
> though.  Will it be enough?

If you don't run anything else on it (Firefox etc), it should be barely enough.

> By the way, unfortunately your patch did not apply cleanly to the
> current master branch head (c86b5f1b9bdfdd478ba15804f9343feb8d9c019b).
> If you think my little computer will be able to crunch through the
> build, I'm happy to let it run if you can supply a clean patch.

Yeah, sorry, it was cut.  I've cleaned it up and attached the new version.

It should apply to master using "patch -p1 < mrustc-master.patch".
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 501736d89..78705103b 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -101,11 +101,11 @@
                 (method git-fetch)
                 (uri (git-reference
                       (url "https://github.com/thepowersgang/mrustc.git";)
-                      (commit (string-append "v" version))))
+                      (commit "7b6fa5c6e7d6838c2479280dd3f8d14a43c13899")))
                 (file-name (git-file-name name version))
                 (sha256
                  (base32
-                  "0a7v8ccyzp1sdkwni8h1698hxpfz2sxhcpx42n6l2pbm0rbjp08i"))))
+                  "0ki5jv76gmvd0q9y2lixzn4xhy1jamba3f77bk8cz2k4ix6yx5z1"))))
       (outputs '("out" "cargo"))
       (build-system gnu-build-system)
       (inputs
@@ -118,6 +118,7 @@
           ,(rust-source "1.19.0" "0l8c14qsf42rmkqy92ahij4vf356dbyspxcips1aswpvad81y8qm"))))
       (arguments
        `(#:test-target "local_tests"
+         #:strip-binaries? #f
          #:make-flags (list (string-append "LLVM_CONFIG="
                                            (assoc-ref %build-inputs "llvm")
                                            "/bin/llvm-config"))
@@ -127,6 +128,9 @@
             (lambda _
               (substitute* "Makefile"
                (("shell date") "shell date -d @1"))
+              (substitute* "Makefile"
+               (("-g ") "-g3 ")
+               (("-O2") ""))
               #t))
            (add-after 'patch-date 'unpack-target-compiler
              (lambda* (#:key inputs outputs #:allow-other-keys)
@@ -184,7 +188,7 @@ safety and thread safety guarantees.")
       ;; Dual licensed.
       (license (list license:asl2.0 license:expat)))))
 
-(define rust-1.19
+(define-public rust-1.19
   (package
     (name "rust")
     (version "1.19.0")
@@ -308,12 +312,14 @@ test = { path = \"../libtest\" }
                (setenv "CFG_VERSION" #f)
                (setenv "CFG_PREFIX" #f)
                (setenv "CFG_LIBDIR_RELATIVE" #f)
+               ; Fails:
                (invoke (string-append rustc-bootstrap "/tools/bin/minicargo")
                        "src/tools/cargo" "--vendor-dir" "src/vendor"
                        "--output-dir" "output/cargo-build"
                        "-L" "output/"
                        "-L" (string-append rustc-bootstrap "/lib/mrust")
                        "-j" "1")
+               ;(invoke "eee")
                ;; Now use the newly-built rustc to build the libraries.
                ;; One day that could be replaced by:
                ;; (invoke "output/cargo-build/cargo" "build"

Attachment: pgpV2qBot4htA.pgp
Description: OpenPGP digital signature

Reply via email to