GNU bug report logs - #36676
[PATCH 0/3] cargo build system fixes

Previous Next

Package: guix-patches;

Reported by: Robert Vollmert <rob <at> vllmrt.net>

Date: Mon, 15 Jul 2019 19:41:01 UTC

Severity: normal

Tags: patch

Done: Danny Milosavljevic <dannym <at> scratchpost.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Robert Vollmert <rob <at> vllmrt.net>
To: 36676 <at> debbugs.gnu.org
Cc: Robert Vollmert <rob <at> vllmrt.net>
Subject: [bug#36676] [PATCH 1/3] guix: cargo-build-system: Set CARGO_HOME early to fix build
Date: Mon, 15 Jul 2019 21:41:53 +0200
This makes the packages from (gnu packages crates-io)
not fail to build outright with

starting phase `build'
error: failed to acquire package cache lock

Caused by:
  failed to open: /homeless-shelter/.cargo/.package-cache

Caused by:
  Permission denied (os error 13)
phase `build' failed after 0.0 seconds

* guix/build/cargo-build-system.scm (configure): Set CARGO_HOME.
(install): No longer set CARGO_HOME.
---
 guix/build/cargo-build-system.scm | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm
index 1f36304b15..e4e62dd838 100644
--- a/guix/build/cargo-build-system.scm
+++ b/guix/build/cargo-build-system.scm
@@ -99,6 +99,7 @@ Cargo.toml file present at its root."
     inputs)
 
   ;; Configure cargo to actually use this new directory.
+  (setenv "CARGO_HOME" (string-append (getcwd) "/.cargo"))
   (mkdir-p ".cargo")
   (let ((port (open-file ".cargo/config" "w" #:encoding "utf-8")))
     (display "
@@ -148,9 +149,6 @@ directory = '" port)
     ;; Make cargo reuse all the artifacts we just built instead
     ;; of defaulting to making a new temp directory
     (setenv "CARGO_TARGET_DIR" "./target")
-    ;; Force cargo to honor our .cargo/config definitions
-    ;; https://github.com/rust-lang/cargo/issues/6397
-    (setenv "CARGO_HOME" ".")
 
     ;; Only install crates which include binary targets,
     ;; otherwise cargo will raise an error.
-- 
2.20.1 (Apple Git-117)





This bug report was last modified 6 years and 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.