[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
40/43: Revert "compile: Run the load phase within 'with-target'."
From: |
guix-commits |
Subject: |
40/43: Revert "compile: Run the load phase within 'with-target'." |
Date: |
Mon, 20 Apr 2020 07:34:11 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit 9c6bb2f8b48c0bbc4f7635475e89acc58b7729f4
Author: Jan (janneke) Nieuwenhuizen <address@hidden>
AuthorDate: Sat Apr 11 11:42:17 2020 +0200
Revert "compile: Run the load phase within 'with-target'."
Oh irony, this patch that fixes the cross-compilation result on the Hurd,
breaks cross-compiling to the Hurd.
It a cross-build environment
./pre-inst-env guix build --target=i586-pc-gnu guix --keep-failed
--no-offload
Doing:
GUILE_LOAD_COMPILED_PATH= guild compile --target=i586-pc-gnu -L .
gnu/ci.scm -o foo.go
GUILE_LOAD_COMPILED_PATH= guild compile --target=i586-pc-gnu -L .
gnu/tests/install.scm -o bar.go
Give something like:
WARNING: Use of `load' in declarative module (guix ui). Add #:declarative?
#f to your define-module invocation.
WARNING: (guix build emacs-build-system): imported module (guix build
utils) overrides core binding `delete'
Backtrace:
In ice-9/boot-9.scm:
3297:17 19 (resolve-interface (gnu system install) #:select _ #:hide _
#:prefix _ #:renamer _ #:version _)
In ice-9/threads.scm:
390:8 18 (_ _)
In ice-9/boot-9.scm:
3223:13 17 (_)
In ice-9/threads.scm:
390:8 16 (_ _)
In ice-9/boot-9.scm:
3507:20 15 (_)
2806:4 14 (save-module-excursion #<procedure 7f6220dc7cc0 at
ice-9/boot-9.scm:3508:21 ()>)
3527:26 13 (_)
In unknown file:
12 (primitive-load-path "gnu/system/install" #<procedure
7f622318f7c0 at ice-9/boot-9.scm:3514:37 ()>)
In ice-9/eval.scm:
626:19 11 (_ #<directory (gnu system install) 7f6229b65780>)
173:47 10 (_ #(#(#<directory (gnu system install) 7f6229b65780>
#<<plain-file> name: "motd" content: "…>) …))
196:43 9 (_ #(#(#<directory (gnu system install) 7f6229b65780>
#<<plain-file> name: "motd" content: "…>) …))
293:34 8 (_ #(#(#(#<directory (gnu system install) 7f6229b65780>
#<<plain-file> name: "motd" conte…>) …) #))
619:8 7 (_ #(#(#(#<directory (gnu installer) 7f62248f3dc0>))
#<variable 7f621d5d75b0 value: #<gexp (be…> …))
626:19 6 (_ #(#(#(#<directory (gnu installer) 7f62248f3dc0>))
#<variable 7f621d5d75b0 value: #<gexp (be…> …))
159:9 5 (_ #(#(#(#<directory (guix discovery) 7f62339ee280>)
"/tmp/guix-build-guix-1.0.1-18.11fc384…" …) …))
In srfi/srfi-1.scm:
495:18 4 (fold-right #<procedure 7f621d786ca0 at ice-9/eval.scm:336:13
(a b)> () _ . _)
In ice-9/eval.scm:
293:34 3 (_ #(#(#(#(#(#(#(#<directory (guix discovery) 7f62339ee280>
("~^m\x18 " (. #) …) …)) …) …) …) …) …))
155:9 2 (_ #(#(#(#(#<directory (guix discovery) 7f62339ee280>)
"/tmp/guix-build-guix-1.0.1-18.11…" …) …) …))
In unknown file:
1 (lstat
"/tmp/guix-build-guix-1.0.1-18.11fc384.drv-0/source/gnu/../gnu/installer/~^m\x18
")
In ice-9/boot-9.scm:
1669:16 0 (raise-exception _ #:continuable? _)
ice-9/boot-9.scm:1669:16: In procedure raise-exception:
In procedure lstat: No such file or directory:
"/tmp/guix-build-guix-1.0.1-18.11fc384.drv-0/source/gnu/../gnu/installer/~^m\x18
"
This reverts commit 041c3c22dc14d485ca58b3ae1436b62d4a39d0aa.
---
guix/build/compile.scm | 51 +++++++++++++++++++++++++-------------------------
1 file changed, 26 insertions(+), 25 deletions(-)
diff --git a/guix/build/compile.scm b/guix/build/compile.scm
index 3ce0ece..4b64727 100644
--- a/guix/build/compile.scm
+++ b/guix/build/compile.scm
@@ -184,35 +184,36 @@ files are for HOST, a GNU triplet such as
\"x86_64-linux-gnu\"."
;; Exit as soon as something goes wrong.
(exit-on-exception
file
- (let ((relative (relative-file source-directory file)))
- (compile-file file
- #:output-file (string-append build-directory "/"
- (scm->go relative))
- #:opts (append warning-options
- (optimization-options relative))))))
+ (with-target host
+ (lambda ()
+ (let ((relative (relative-file source-directory file)))
+ (compile-file file
+ #:output-file (string-append build-directory "/"
+ (scm->go relative))
+ #:opts (append warning-options
+ (optimization-options relative))))))))
(with-augmented-search-path %load-path source-directory
(with-augmented-search-path %load-compiled-path build-directory
(with-fluids ((*current-warning-prefix* ""))
- (with-target host
- (lambda ()
- ;; FIXME: To work around <https://bugs.gnu.org/15602>, we first
- ;; load all of FILES.
- (load-files source-directory files
- #:report-load report-load
- #:debug-port debug-port)
-
- ;; Make sure compilation related modules are loaded before
- ;; starting to compile files in parallel.
- (compile #f)
-
- ;; XXX: Don't use too many workers to work around the insane
- ;; memory requirements of the compiler in Guile 2.2.2:
- ;;
<https://lists.gnu.org/archive/html/guile-devel/2017-05/msg00033.html>.
- (n-par-for-each (min workers 8) build files)
-
- (unless (zero? total)
- (report-compilation #f total total))))))))
+
+ ;; FIXME: To work around <https://bugs.gnu.org/15602>, we first load
all
+ ;; of FILES.
+ (load-files source-directory files
+ #:report-load report-load
+ #:debug-port debug-port)
+
+ ;; Make sure compilation related modules are loaded before starting to
+ ;; compile files in parallel.
+ (compile #f)
+
+ ;; XXX: Don't use too many workers to work around the insane memory
+ ;; requirements of the compiler in Guile 2.2.2:
+ ;;
<https://lists.gnu.org/archive/html/guile-devel/2017-05/msg00033.html>.
+ (n-par-for-each (min workers 8) build files)
+
+ (unless (zero? total)
+ (report-compilation #f total total))))))
(eval-when (eval load)
(when (and (string=? "2" (major-version))
- 30/43: gnu: tcl: Disable troublesome test on the Hurd., (continued)
- 30/43: gnu: tcl: Disable troublesome test on the Hurd., guix-commits, 2020/04/20
- 42/43: REMOVEME gnu: guix: Bugfix for cross compiling to the Hurd., guix-commits, 2020/04/20
- 37/43: gnu: guix: Apply courage for the Hurd., guix-commits, 2020/04/20
- 18/43: services: Add hurd-user-services-service-type., guix-commits, 2020/04/20
- 33/43: gnu: guix: Use gnutls-3.6.13 when cross-compiling., guix-commits, 2020/04/20
- 27/43: system: hurd: Create system profile for guix development., guix-commits, 2020/04/20
- 29/43: guile: Disable web-server test on the Hurd., guix-commits, 2020/04/20
- 38/43: gnu: guix: Add dependency on `hurd' when building for the Hurd., guix-commits, 2020/04/20
- 39/43: gnu: guix: Avoid loading (gnu installer) when cross compiling., guix-commits, 2020/04/20
- 36/43: gnu: guix: Cross-build fix: override compressors., guix-commits, 2020/04/20
- 40/43: Revert "compile: Run the load phase within 'with-target'.",
guix-commits <=
- 43/43: gnu: guix: Run `make update-guix-package'., guix-commits, 2020/04/20
- 34/43: gnu: guix: Fix cross-compilation., guix-commits, 2020/04/20
- 35/43: gnu: guix: Cross-build fixup for wrap-program., guix-commits, 2020/04/20
- 41/43: Revert "records: Have ABI check work well for cross-compilation.", guix-commits, 2020/04/20