unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Glibc macro unbound variable error
@ 2014-03-23 21:53 Manolis Ragkousis
  0 siblings, 0 replies; only message in thread
From: Manolis Ragkousis @ 2014-03-23 21:53 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 47 bytes --]

The build log with the unbound variable error.

[-- Attachment #1.2: Type: text/html, Size: 91 bytes --]

[-- Attachment #2: build.log --]
[-- Type: text/plain, Size: 4246 bytes --]

/usr/bin/mkdir -p `dirname "guix/monads.go"` ;			\
LC_ALL=C							\
./pre-inst-env					\
/usr/bin/guild compile -L "." -L "."	\
  -Wformat -Wunbound-variable -Warity-mismatch			\
  --target="x86_64-unknown-linux-gnu"						\
  -o "guix/monads.go" "guix/monads.scm"
/usr/bin/mkdir -p `dirname "guix/http-client.go"` ;			\
LC_ALL=C							\
./pre-inst-env					\
/usr/bin/guild compile -L "." -L "."	\
  -Wformat -Wunbound-variable -Warity-mismatch			\
  --target="x86_64-unknown-linux-gnu"						\
  -o "guix/http-client.go" "guix/http-client.scm"
/usr/bin/mkdir -p `dirname "guix/gnupg.go"` ;			\
LC_ALL=C							\
./pre-inst-env					\
/usr/bin/guild compile -L "." -L "."	\
  -Wformat -Wunbound-variable -Warity-mismatch			\
  --target="x86_64-unknown-linux-gnu"						\
  -o "guix/gnupg.go" "guix/gnupg.scm"
/usr/bin/mkdir -p `dirname "guix/store.go"` ;			\
LC_ALL=C							\
./pre-inst-env					\
/usr/bin/guild compile -L "." -L "."	\
  -Wformat -Wunbound-variable -Warity-mismatch			\
  --target="x86_64-unknown-linux-gnu"						\
  -o "guix/store.go" "guix/store.scm"
wrote `guix/http-client.go'
/usr/bin/mkdir -p `dirname "guix/ui.go"` ;			\
LC_ALL=C							\
./pre-inst-env					\
/usr/bin/guild compile -L "." -L "."	\
  -Wformat -Wunbound-variable -Warity-mismatch			\
  --target="x86_64-unknown-linux-gnu"						\
  -o "guix/ui.go" "guix/ui.scm"
wrote `guix/gnupg.go'
/usr/bin/mkdir -p `dirname "guix/build/cmake-build-system.go"` ;			\
LC_ALL=C							\
./pre-inst-env					\
/usr/bin/guild compile -L "." -L "."	\
  -Wformat -Wunbound-variable -Warity-mismatch			\
  --target="x86_64-unknown-linux-gnu"						\
  -o "guix/build/cmake-build-system.go" "guix/build/cmake-build-system.scm"
;;; note: source file ./gnu/packages/base.scm
;;;       newer than compiled /home/manolis/.cache/guile/ccache/2.0-LE-8-2.0/home/manolis/git_repos/guix_/gnu/packages/base.scm.go
wrote `guix/build/cmake-build-system.go'
/usr/bin/mkdir -p `dirname "guix/build/git.go"` ;			\
LC_ALL=C							\
./pre-inst-env					\
/usr/bin/guild compile -L "." -L "."	\
  -Wformat -Wunbound-variable -Warity-mismatch			\
  --target="x86_64-unknown-linux-gnu"						\
  -o "guix/build/git.go" "guix/build/git.scm"
Backtrace:
In ice-9/psyntax.scm:
1509: 19 [parse (((# # # ...) . #(syntax-object # # ...))) () ...]
In ice-9/boot-9.scm:
 627: 18 [map #<procedure 2509d80 at ice-9/psyntax.scm:1510:50 (x)> ((# . #))]
In ice-9/psyntax.scm:
1259: 17 [#<procedure 24f7550 (test then else)> # # #]
1331: 16 [#<procedure 24f7460 (e0 e1)> package-derivation (store # system)]
In ice-9/boot-9.scm:
 625: 15 [map #<procedure 2507e40 at ice-9/psyntax.scm:1332:35 (e)> (store # system)]
In ice-9/psyntax.scm:
1257: 14 [#<procedure 2507e40 at ice-9/psyntax.scm:1332:35 (e)> (@ # guile-final)]
 579: 13 [syntax-type guile-final (# # # # ...) (#) ...]
 293: 12 [get-global-definition-hook guile-final (public gnu packages base)]
In ice-9/boot-9.scm:
2708: 11 [#<procedure 154e6c0 at ice-9/boot-9.scm:2696:4 (name #:optional autoload version #:key ensure)> # ...]
2981: 10 [try-module-autoload (gnu packages base) #f]
2320: 9 [save-module-excursion #<procedure 2509930 at ice-9/boot-9.scm:2982:17 ()>]
3001: 8 [#<procedure 2509930 at ice-9/boot-9.scm:2982:17 ()>]
In unknown file:
   ?: 7 [primitive-load-path "gnu/packages/base" ...]
In ice-9/eval.scm:
 453: 6 [eval # ()]
 387: 5 [eval # ()]
 387: 4 [eval # #]
 387: 3 [eval # #]
 393: 2 [eval # #]
In unknown file:
   ?: 1 [memoize-variable-access! #<memoized glibc> #<directory # 24cdd80>]
In ice-9/boot-9.scm:
 106: 0 [#<procedure 16a7240 at ice-9/boot-9.scm:97:6 (thrown-k . args)> unbound-variable ...]

ice-9/boot-9.scm:106:20: In procedure #<procedure 16a7240 at ice-9/boot-9.scm:97:6 (thrown-k . args)>:
ice-9/boot-9.scm:106:20: Unbound variable: glibc
wrote `guix/build/git.go'
Makefile:3559: recipe for target 'guix/monads.go' failed
make[2]: *** [guix/monads.go] Error 1
make[2]: *** Waiting for unfinished jobs....
wrote `guix/ui.go'
wrote `guix/store.go'
make[2]: Leaving directory '/home/manolis/git_repos/guix_'
Makefile:2761: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/manolis/git_repos/guix_'
Makefile:1609: recipe for target 'all' failed
make: *** [all] Error 2

[-- Attachment #3: add_macro.patch --]
[-- Type: text/x-patch, Size: 1613 bytes --]

From 8f8f74da2ee0f7da8d00b75d16f0089c8a73d72b Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Sat, 22 Mar 2014 18:01:29 +0000
Subject: [PATCH] gnu: base: Added macro for choosing glibc for target system

* gnu/packages/base.scm (glibc/linux): Renamed glibc to glibc/linux
* gnu/packages/base.scm (glibc-for-target): Choose which glibc to use
* gnu/packages/base.scm (glibc): Added macro to choose glibc
---
 gnu/packages/base.scm | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 906d0a3..c90d1fc 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -39,7 +39,8 @@
   #:use-module (guix utils)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
-  #:use-module (ice-9 match))
+  #:use-module (ice-9 match)
+  #:export (glibc))
 
 ;;; Commentary:
 ;;;
@@ -353,7 +354,7 @@ library for working with executable and object formats is also included.")
    (license gpl3+)
    (home-page "http://www.gnu.org/software/binutils/")))
 
-(define-public glibc
+(define-public glibc/linux
   (package
    (name "glibc")
    (version "2.18")
@@ -1091,4 +1092,14 @@ store.")
       ("gcc" ,gcc-final)
       ("libc" ,glibc-final))))
 
+(define (glibc-for-target target)
+  "Return the glibc for TARGET, glibc/linux for a linux host or
+glibc/hurd for a hurd host"
+  (match target
+    ("i686-pc-gnu" glibc/hurd)
+    (_ glibc/linux)))
+
+(define-syntax glibc
+  (identifier-syntax (glibc-for-target (or (%current-target-system) (%current-system)))))
+
 ;;; base.scm ends here
-- 
1.9.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-23 21:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-23 21:53 Glibc macro unbound variable error Manolis Ragkousis

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).