all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#36272] [PATCH] gnu: rust: fix building bootstrap chain
@ 2019-06-18  3:00 Ivan Petkov
  2019-06-18  3:06 ` Ivan Petkov
  0 siblings, 1 reply; 7+ messages in thread
From: Ivan Petkov @ 2019-06-18  3:00 UTC (permalink / raw)
  To: 36272; +Cc: Chris Marusich

[-- Attachment #1: Type: text/plain, Size: 294 bytes --]

This patch fixes building rust versions 1.30 and onwards:

* Thanks to a newer GDB version being present, we no longer need to patch the
debug-info tests to the older (and now incorrect) format.
* Downgrade to llvm@6 for older compilers, which don't support the newer llvm@8.

—Ivan


[-- Attachment #2: 0001-gnu-rust-remove-debug-info-patch-thanks-to-newer-gdb.patch --]
[-- Type: application/octet-stream, Size: 2624 bytes --]

From 46c10c35b1cb42b8b2063c567a0f45260aba55b4 Mon Sep 17 00:00:00 2001
From: Ivan Petkov <ivanppetkov@gmail.com>
Date: Mon, 17 Jun 2019 19:36:10 -0700
Subject: [PATCH 1/2] gnu: rust: remove debug-info patch thanks to newer gdb
 version

* gnu/local.mk: (dist_patch_DATA): Delete
%D%/packages/patches/rust-1.30-gdb-llvm.patch
* gnu/packages/rust.scm: (rust-1.30): Delete patch overrides.
(rust-1.31): Delete patch overrides.
---
 gnu/local.mk          |  1 -
 gnu/packages/rust.scm | 11 +----------
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 74d2bafa8d..65c8d98b44 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1256,7 +1256,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch \
   %D%/packages/patches/rust-bootstrap-stage0-test.patch		\
   %D%/packages/patches/rust-coresimd-doctest.patch		\
-  %D%/packages/patches/rust-1.30-gdb-llvm.patch			\
   %D%/packages/patches/rust-reproducible-builds.patch		 \
   %D%/packages/patches/rxvt-unicode-escape-sequences.patch	\
   %D%/packages/patches/scalapack-blacs-mpi-deprecations.patch	\
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 9c8088b2f7..76a38736ac 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -871,10 +871,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                       (delete-file-recursively "src/llvm-emscripten")
                       (delete-file-recursively "src/tools/clang")
                       (delete-file-recursively "src/tools/lldb")
-                      #t))
-          (patches (map search-patch '("rust-1.25-accept-more-detailed-gdb-lines.patch"
-                                       "rust-1.30-gdb-llvm.patch"
-                                       "rust-reproducible-builds.patch")))))
+                      #t))))
       (inputs
        ;; Use LLVM 7.0
        (alist-replace "llvm" (list llvm)
@@ -918,12 +915,6 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
           "0sk84ff0cklybcp0jbbxcw7lk7mrm6kb6km5nzd6m64dy0igrlli")))
     (package
       (inherit base-rust)
-      (source
-        (origin
-          (inherit (package-source base-rust))
-          (patches (map search-patch '("rust-1.25-accept-more-detailed-gdb-lines.patch"
-                                       "rust-1.30-gdb-llvm.patch"
-                                       "rust-reproducible-builds.patch")))))
       (arguments
        (substitute-keyword-arguments (package-arguments base-rust)
          ((#:phases phases)
-- 
2.22.0


[-- Attachment #3: 0002-gnu-rust-downgrade-older-versions-to-llvm-6.patch --]
[-- Type: application/octet-stream, Size: 1024 bytes --]

From 75ff4398e5f430df37372dc2ed21c61f57fc8db1 Mon Sep 17 00:00:00 2001
From: Ivan Petkov <ivanppetkov@gmail.com>
Date: Mon, 17 Jun 2019 19:39:08 -0700
Subject: [PATCH 2/2] gnu: rust: downgrade older versions to llvm@6

* gnu/packages/rust.scm: (rust-1.30): Remove llvm override.
---
 gnu/packages/rust.scm | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 76a38736ac..c83c8a6784 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -872,10 +872,6 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                       (delete-file-recursively "src/tools/clang")
                       (delete-file-recursively "src/tools/lldb")
                       #t))))
-      (inputs
-       ;; Use LLVM 7.0
-       (alist-replace "llvm" (list llvm)
-                      (package-inputs base-rust)))
       (arguments
        (substitute-keyword-arguments (package-arguments base-rust)
          ((#:phases phases)
-- 
2.22.0


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

* [bug#36272] [PATCH] gnu: rust: fix building bootstrap chain
  2019-06-18  3:00 [bug#36272] [PATCH] gnu: rust: fix building bootstrap chain Ivan Petkov
@ 2019-06-18  3:06 ` Ivan Petkov
  2019-06-18  6:51   ` Danny Milosavljevic
  0 siblings, 1 reply; 7+ messages in thread
From: Ivan Petkov @ 2019-06-18  3:06 UTC (permalink / raw)
  To: 36272; +Cc: Chris Marusich

I tried deleting the gnu/packages/patches/rust-1.30-gdb-llvm.patch file since
it is now unused, but after doing so the build fails with a cryptic backtrace.

Anyone have any ideas why?

--Ivan

Backtrace:
In srfi/srfi-1.scm:
   592:29 19 (map1 (#<<service> type: #<service-type mingetty ced…> …))
   592:29 18 (map1 (#<<service> type: #<service-type mingetty ced…> …))
   592:29 17 (map1 (#<<service> type: #<service-type mingetty ced…> …))
   592:29 16 (map1 (#<<service> type: #<service-type syslog 42b50…> …))
   592:17 15 (map1 (#<<service> type: #<service-type guix 27825a0…> …))
In ice-9/eval.scm:
   196:43 14 (_ #(#(#(#<directory (gnu tests install) c9f01e0>) #) #))
   293:34 13 (_ #(#(#(#<directory (gnu tests install) c9f01e0>) #) #))
   293:34 12 (_ #(#(#(#(#<directory (gnu packages package-…> …)) …) …))
   174:20 11 (_ #(#(#(#(#<directory (gnu packages package-…> …)) …) …))
   177:49 10 (lp (#<procedure 1839e280 at ice-9/eval.scm:282:4 (e…> …))
   177:49  9 (lp (#<procedure 1839e260 at ice-9/eval.scm:282:4 (e…> …))
   177:49  8 (lp (#<procedure 1839e240 at ice-9/eval.scm:282:4 (e…> …))
   177:32  7 (lp (#<procedure 1839e220 at ice-9/eval.scm:182:7 (env)>))
In unknown file:
           6 (force #<promise #<procedure 5b90da0 at ice-9/eval.scm:…>)
In ice-9/eval.scm:
   293:34  5 (_ #(#(#<directory (gnu packages package-management…> …)))
In ice-9/boot-9.scm:
    829:9  4 (catch git-error #<procedure 183a1ac0 at ice-9/eval.sc…> …)
In ice-9/eval.scm:
   293:34  3 (_ #(#(#(#<directory (guix git-download) 253daa0> #)) #))
In srfi/srfi-1.scm:
   466:18  2 (fold #<procedure 17fb2340 at ice-9/eval.scm:336:13 (a…> …)
In ice-9/eval.scm:
   293:34  1 (_ #(#(#<directory (guix git-download) 253daa0> "/…") …))
In unknown file:
           0 (lstat "/home/ivan/import/guix-rust-upgrade/gnu/package…")

ERROR: In procedure lstat:
In procedure lstat: No such file or directory: "/home/ivan/import/guix-rust-upgrade/gnu/packages/patches/rust-1.30-gdb-llvm.patch"

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

* [bug#36272] [PATCH] gnu: rust: fix building bootstrap chain
  2019-06-18  3:06 ` Ivan Petkov
@ 2019-06-18  6:51   ` Danny Milosavljevic
  2019-06-19  5:43     ` Ivan Petkov
  0 siblings, 1 reply; 7+ messages in thread
From: Danny Milosavljevic @ 2019-06-18  6:51 UTC (permalink / raw)
  To: Ivan Petkov; +Cc: 36272, Chris Marusich

[-- Attachment #1: Type: text/plain, Size: 655 bytes --]

Hi Ivan,

On Mon, 17 Jun 2019 20:06:37 -0700
Ivan Petkov <ivanppetkov@gmail.com> wrote:

> I tried deleting the gnu/packages/patches/rust-1.30-gdb-llvm.patch file since
> it is now unused, but after doing so the build fails with a cryptic backtrace.
> 
> Anyone have any ideas why?

Hmm, I've had spooky things like that when I didn't run "make" in the guix
directory after the change before trying to use it.
Not sure why that is--since guile is supposed to compile on demand--, but it
happened.

So try running "make" in guix.

Otherwise "grep -r gdb-llvm ." to find left-overs, if any.

If nothing else helps, rm -rf ~/.cache/guile

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* [bug#36272] [PATCH] gnu: rust: fix building bootstrap chain
  2019-06-18  6:51   ` Danny Milosavljevic
@ 2019-06-19  5:43     ` Ivan Petkov
  2019-06-19 11:10       ` Danny Milosavljevic
  0 siblings, 1 reply; 7+ messages in thread
From: Ivan Petkov @ 2019-06-19  5:43 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 36272, Chris Marusich

[-- Attachment #1: Type: text/plain, Size: 919 bytes --]

Hi Danny,

> On Jun 17, 2019, at 11:51 PM, Danny Milosavljevic <dannym@scratchpost.org> wrote:
> 
> So try running "make" in guix.

I always run make before any ./pre-inst-env invocation, and that’s what raises the error.

> Otherwise "grep -r gdb-llvm ." to find left-overs, if any.

No results (besides those in .git). Maybe it’s because there are items in the store which
have references to it and guix is getting confused somewhere? Unfortunately, I don’t
know enough to stipulate further...

> If nothing else helps, rm -rf ~/.cache/guile

Unfortunately this didn’t help either :(

I’m willing to get this merged in as is for now, get rust to build again, and clean up my store
with `guix gc` before trying to delete the patch file again. Maybe things will work then.

Also attaching one more patch update, this time for bumping to llvm@8 for the latest
rust version!

—Ivan


[-- Attachment #2: 0003-gnu-rust-use-llvm-8.patch --]
[-- Type: application/octet-stream, Size: 1774 bytes --]

From f25bff63091da94595aa0b2d096b9f3b9f64544f Mon Sep 17 00:00:00 2001
From: Ivan Petkov <ivanppetkov@gmail.com>
Date: Mon, 17 Jun 2019 22:10:52 -0700
Subject: [PATCH 3/3] gnu: rust: use llvm@8

* gnu/packages/llvm.scm (llvm): Rename to...
(llvm-8): ...this.
(llvm): New variable.
* gnu/packages/rust.scm (rust)[inputs]: Use llvm-8
---
 gnu/packages/llvm.scm | 4 +++-
 gnu/packages/rust.scm | 3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 8cb05a6cad..0ae4373c05 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -47,7 +47,7 @@
   #:use-module (gnu packages python)
   #:use-module (gnu packages xml))
 
-(define-public llvm
+(define-public llvm-8
   (package
     (name "llvm")
     (version "8.0.0")
@@ -98,6 +98,8 @@ languages is in development.  The compiler infrastructure includes mirror sets
 of programming tools as well as libraries with equivalent functionality.")
     (license license:ncsa)))
 
+(define-public llvm llvm-8)
+
 (define* (clang-runtime-from-llvm llvm hash
                                   #:optional (patches '()))
   (package
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index c83c8a6784..9444d8be73 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -1056,6 +1056,9 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
            "0bbizy6b7002v1rdhrxrf5gijclbyizdhkglhp81ib3bf5x66kas")))
     (package
       (inherit base-rust)
+      (inputs
+       (alist-replace "llvm" (list llvm-8)
+                      (package-inputs base-rust)))
       (arguments
        (substitute-keyword-arguments (package-arguments base-rust)
          ((#:phases phases)
-- 
2.22.0


[-- Attachment #3: Type: text/plain, Size: 1 bytes --]



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

* [bug#36272] [PATCH] gnu: rust: fix building bootstrap chain
  2019-06-19  5:43     ` Ivan Petkov
@ 2019-06-19 11:10       ` Danny Milosavljevic
  2019-06-19 16:01         ` Ivan Petkov
  0 siblings, 1 reply; 7+ messages in thread
From: Danny Milosavljevic @ 2019-06-19 11:10 UTC (permalink / raw)
  To: Ivan Petkov; +Cc: 36272, Chris Marusich

[-- Attachment #1: Type: text/plain, Size: 171 bytes --]

Ah, maybe the sha checksum of the origin is used as a key to a cache for the
origin.
Try changing a digit in it (in the call to rust-bootstapped-package in rust-1.30).

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* [bug#36272] [PATCH] gnu: rust: fix building bootstrap chain
  2019-06-19 11:10       ` Danny Milosavljevic
@ 2019-06-19 16:01         ` Ivan Petkov
  2019-06-29  1:46           ` bug#36272: " Ivan Petkov
  0 siblings, 1 reply; 7+ messages in thread
From: Ivan Petkov @ 2019-06-19 16:01 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 36272, Chris Marusich


> On Jun 19, 2019, at 4:10 AM, Danny Milosavljevic <dannym@scratchpost.org> wrote:
> 
> Ah, maybe the sha checksum of the origin is used as a key to a cache for the
> origin.
> Try changing a digit in it (in the call to rust-bootstapped-package in rust-1.30).

Still no dice.

I even tried commenting out the rust package definitions entirely and the issue still
occurs when running `make` after `make clean`, so I don’t think its related to the
package definitions themselves...

—Ivan

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

* bug#36272: [PATCH] gnu: rust: fix building bootstrap chain
  2019-06-19 16:01         ` Ivan Petkov
@ 2019-06-29  1:46           ` Ivan Petkov
  0 siblings, 0 replies; 7+ messages in thread
From: Ivan Petkov @ 2019-06-29  1:46 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: Chris Marusich, 36272-done

I’ve merged this in as f5de2b9a3e0070ec431e01c279192e6d93d6a1c8.
I’ll come back a bit later and see if removing the patch file works…

—Ivan

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

end of thread, other threads:[~2019-06-29  1:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-18  3:00 [bug#36272] [PATCH] gnu: rust: fix building bootstrap chain Ivan Petkov
2019-06-18  3:06 ` Ivan Petkov
2019-06-18  6:51   ` Danny Milosavljevic
2019-06-19  5:43     ` Ivan Petkov
2019-06-19 11:10       ` Danny Milosavljevic
2019-06-19 16:01         ` Ivan Petkov
2019-06-29  1:46           ` bug#36272: " Ivan Petkov

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.