unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* mips64el: No such file or directory: "/nix/store/*-glibc-2.13.drv"
@ 2012-12-24 19:43 Nikita Karetnikov
  2012-12-30 15:17 ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2012-12-24 19:43 UTC (permalink / raw)
  To: bug-guix

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

Hi,

I'm trying to create bootstrap binaries for mips64el. 'guix-build' fails
with the following. 

# ./pre-inst-env guix-build -K hello

Backtrace:
In guix/packages.scm:
 293: 19 [package-derivation # # "mips64el-linux"]
In srfi/srfi-1.scm:
 576: 18 [map #<procedure expand-input (expr)> (# # # # ...)]
In guix/packages.scm:
 245: 17 [expand-input ("libc" #)]
 293: 16 [package-derivation # # "mips64el-linux"]
In srfi/srfi-1.scm:
 576: 15 [map #<procedure expand-input (expr)> (# # # # ...)]
In guix/packages.scm:
 245: 14 [expand-input ("gcc" #)]
 293: 13 [package-derivation # # "mips64el-linux"]
In srfi/srfi-1.scm:
 576: 12 [map #<procedure expand-input (expr)> (# # # # ...)]
In guix/packages.scm:
 245: 11 [expand-input ("binutils-cross" #)]
 293: 10 [package-derivation # # "mips64el-linux"]
In srfi/srfi-1.scm:
 576: 9 [map #<procedure expand-input (expr)> (# # # # ...)]
In guix/packages.scm:
 245: 8 [expand-input ("make" #)]
 296: 7 [package-derivation # # "mips64el-linux"]
In guix/derivations.scm:
 612: 6 [build-expression->derivation # "make-boot0-3.82" "mips64el-linux" ...]
In srfi/srfi-1.scm:
 578: 5 [map #<procedure 103c20c0 at guix/derivations.scm:612:31 (expr)> #]
In guix/derivations.scm:
 619: 4 [#<procedure 103c20c0 at guix/derivations.scm:612:31 (expr)> #]
In guix/utils.scm:
 543: 3 [#<procedure 103c1df8 at guix/utils.scm:539:4 args> "/nix/store/qc2f73airw91j5hjq7dn7737wzbcygq9-glibc-2.13.drv" ...]
In guix/derivations.scm:
 286: 2 [#<procedure 103c26c0 at guix/derivations.scm:283:3 (path #:optional output)> "/nix/store/qc2f73airw91j5hjq7dn7737wzbcygq9-glibc-2.13.drv" ...]
In ice-9/r4rs.scm:
 145: 1 [call-with-input-file "/nix/store/qc2f73airw91j5hjq7dn7737wzbcygq9-glibc-2.13.drv" ...]
In unknown file:
   ?: 0 [open-file "/nix/store/qc2f73airw91j5hjq7dn7737wzbcygq9-glibc-2.13.drv" "r"]

ERROR: In procedure open-file:
ERROR: In procedure open-file: No such file or directory: "/nix/store/qc2f73airw91j5hjq7dn7737wzbcygq9-glibc-2.13.drv"

It's a bit strange because the mentioned '.drv' file was there. Here is
my previous attempt, which failed.

make[2]: Leaving directory
`/tmp/nix-build-qc2f73airw91j5hjq7dn7737wzbcygq9-glibc-2.13.drv-2/glibc-2.13/login'
 [q [q [pbuilding elf/others
 [3smake  subdir=elf -C elf ..=../ others
 [pmake[2]: Entering directory
`/tmp/nix-build-qc2f73airw91j5hjq7dn7737wzbcygq9-glibc-2.13.drv-2/glibc-2.13/elf'
make[2]: *** virtual memory exhausted.  Stop.
make[2]: Leaving directory
`/tmp/nix-build-qc2f73airw91j5hjq7dn7737wzbcygq9-glibc-2.13.drv-2/glibc-2.13/elf'
 [qmake[1]: *** [elf/others] Error 2
make[1]: Leaving directory
`/tmp/nix-build-qc2f73airw91j5hjq7dn7737wzbcygq9-glibc-2.13.drv-2/glibc-2.13'
 [q [qmake: *** [all] Error 2
 [q [q [qbuilder for
`/nix/store/qc2f73airw91j5hjq7dn7737wzbcygq9-glibc-2.13.drv' failed
with exit code 2
@ build-failed /nix/store/qc2f73airw91j5hjq7dn7737wzbcygq9-glibc-2.13.drv
/nix/store/ifd3d65hsymw84axpvb6x1qk76l40gw4-glibc-2.13 1 builder for
`/nix/store/qc2f73airw91j5hjq7dn7737wzbcygq9-glibc-2.13.drv' failed
with exit code 2
cannot build derivation
`/nix/store/5wp76dvz282lqsi1dmrk66nggspcq48a-glibc-2.16.0.drv': 1
dependencies couldn't be built
cannot build derivation
`/nix/store/bdjrs8cigi5lrg7wl188lq5n4yjd5cys-libunistring-0.9.3.drv':
1 dependencies couldn't be built
cannot build derivation
`/nix/store/2gq94y3hh50q6rz1rg5c4jxlkh3ny9xk-guile-static-stripped-tarball-2.0.6.drv':
1 dependencies couldn't be built
error: build failed: build of
`/nix/store/2gq94y3hh50q6rz1rg5c4jxlkh3ny9xk-guile-static-stripped-tarball-2.0.6.drv'
failed

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: mips64el: No such file or directory: "/nix/store/*-glibc-2.13.drv"
  2012-12-24 19:43 mips64el: No such file or directory: "/nix/store/*-glibc-2.13.drv" Nikita Karetnikov
@ 2012-12-30 15:17 ` Ludovic Courtès
  2012-12-30 16:14   ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2012-12-30 15:17 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Hi,

Nikita Karetnikov <nikita@karetnikov.org> skribis:

> ERROR: In procedure open-file:
> ERROR: In procedure open-file: No such file or directory: "/nix/store/qc2f73airw91j5hjq7dn7737wzbcygq9-glibc-2.13.drv"
>
> It's a bit strange because the mentioned '.drv' file was there. Here is
> my previous attempt, which failed.

It could be that it was GC’d in the meantime.

Can you replace occurrences of ‘nixpkgs-derivation*’ by
‘nixpkgs-derivation’ in your bootstrap.scm?  (The former captures the
.drv paths at compile-time, which speeds things up afterward but can
cause problems like this one.)

Thanks,
Ludo’.

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

* Re: mips64el: No such file or directory: "/nix/store/*-glibc-2.13.drv"
  2012-12-30 15:17 ` Ludovic Courtès
@ 2012-12-30 16:14   ` Nikita Karetnikov
  2012-12-30 17:58     ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2012-12-30 16:14 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix


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

> Can you replace occurrences of ‘nixpkgs-derivation*’ by

There is no such function.

(I've attached the diff.)

Nikita


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: bootstrap.diff --]
[-- Type: text/x-diff, Size: 6487 bytes --]

--- bootstrap.scm-orig	2012-12-30 15:50:33.274957192 +0000
+++ bootstrap.scm		2012-12-24 18:18:52.214043993 +0000
@@ -137,6 +137,7 @@
   "Return the name of Glibc's dynamic linker for SYSTEM."
   (cond ((string=? system "x86_64-linux") "/lib/ld-linux-x86-64.so.2")
         ((string=? system "i686-linux") "/lib/ld-linux.so.2")
+        ((string=? system "mips64el-linux") "/lib/ld.so.1")
         (else (error "dynamic linker name not known for this system"
                      system))))
 
@@ -146,53 +147,56 @@
 ;;;
 
 (define %bootstrap-guile
-  ;; The Guile used to run the build scripts of the initial derivations.
-  ;; It is just unpacked from a tarball containing a pre-built binary.
-  ;; This is typically built using %GUILE-BOOTSTRAP-TARBALL below.
-  ;;
-  ;; XXX: Would need libc's `libnss_files2.so' for proper `getaddrinfo'
-  ;; support (for /etc/services).
-  (let ((raw (build-system
-              (name "raw")
-              (description "Raw build system with direct store access")
-              (build (lambda* (store name source inputs #:key outputs system)
-                       (define (->store file)
-                         (add-to-store store file #t #t "sha256"
-                                       (or (search-bootstrap-binary file
-                                                                    system)
-                                           (error "bootstrap binary not found"
-                                                  file system))))
-
-                       (let* ((tar   (->store "tar"))
-                              (xz    (->store "xz"))
-                              (mkdir (->store "mkdir"))
-                              (bash  (->store "bash"))
-                              (guile (->store "guile-bootstrap-2.0.6.tar.xz"))
-                              (builder
-                               (add-text-to-store store
-                                                  "build-bootstrap-guile.sh"
-                                                  (format #f "
-echo \"unpacking bootstrap Guile to '$out'...\"
-~a $out
-cd $out
-~a -dc < ~a | ~a xv
-
-# Sanity check.
-$out/bin/guile --version~%"
-                                                          mkdir xz guile tar)
-                                                  (list mkdir xz guile tar))))
-                         (derivation store name system
-                                     bash `(,builder) '()
-                                     `((,bash) (,builder)))))))))
-   (package
-     (name "guile-bootstrap")
-     (version "2.0")
-     (source #f)
-     (build-system raw)
-     (synopsis "Bootstrap Guile")
-     (description "Pre-built Guile for bootstrapping purposes.")
-     (home-page #f)
-     (license lgpl3+))))
+  (nixpkgs-derivation "guile" "mips64el-linux"))
+
+;; (define %bootstrap-guile
+;;   ;; The Guile used to run the build scripts of the initial derivations.
+;;   ;; It is just unpacked from a tarball containing a pre-built binary.
+;;   ;; This is typically built using %GUILE-BOOTSTRAP-TARBALL below.
+;;   ;;
+;;   ;; XXX: Would need libc's `libnss_files2.so' for proper `getaddrinfo'
+;;   ;; support (for /etc/services).
+;;   (let ((raw (build-system
+;;               (name "raw")
+;;               (description "Raw build system with direct store access")
+;;               (build (lambda* (store name source inputs #:key outputs system)
+;;                        (define (->store file)
+;;                          (add-to-store store file #t #t "sha256"
+;;                                        (or (search-bootstrap-binary file
+;;                                                                     system)
+;;                                            (error "bootstrap binary not found"
+;;                                                   file system))))
+
+;;                        (let* ((tar   (->store "tar"))
+;;                               (xz    (->store "xz"))
+;;                               (mkdir (->store "mkdir"))
+;;                               (bash  (->store "bash"))
+;;                               (guile (->store "guile-bootstrap-2.0.6.tar.xz"))
+;;                               (builder
+;;                                (add-text-to-store store
+;;                                                   "build-bootstrap-guile.sh"
+;;                                                   (format #f "
+;; echo \"unpacking bootstrap Guile to '$out'...\"
+;; ~a $out
+;; cd $out
+;; ~a -dc < ~a | ~a xv
+
+;; # Sanity check.
+;; $out/bin/guile --version~%"
+;;                                                           mkdir xz guile tar)
+;;                                                   (list mkdir xz guile tar))))
+;;                          (derivation store name system
+;;                                      bash `(,builder) '()
+;;                                      `((,bash) (,builder)))))))))
+;;    (package
+;;      (name "guile-bootstrap")
+;;      (version "2.0")
+;;      (source #f)
+;;      (build-system raw)
+;;      (synopsis "Bootstrap Guile")
+;;      (description "Pre-built Guile for bootstrapping purposes.")
+;;      (home-page #f)
+;;      (license lgpl3+))))
 
 (define %bootstrap-base-url
   ;; This is where the initial binaries come from.
@@ -362,11 +366,21 @@
     (home-page #f)))
 
 (define %bootstrap-inputs
-  ;; The initial, pre-built inputs.  From now on, we can start building our
-  ;; own packages.
-  `(("libc" ,%bootstrap-glibc)
-    ("gcc" ,%bootstrap-gcc)
-    ("binutils" ,%bootstrap-binutils)
-    ("coreutils&co" ,%bootstrap-coreutils&co)))
+  (compile-time-value
+   `(("libc" ,(nixpkgs-derivation "glibc" "mips64el-linux"))
+     ,@(map (lambda (name)
+              (list name (nixpkgs-derivation name "mips64el-linux")))
+            '("gnutar" "gzip" "bzip2" "xz" "patch"
+              "coreutils" "gnused" "gnugrep" "bash"
+              "gawk"                                ; used by `config.status'
+              "gcc" "binutils")))))
+
+;; (define %bootstrap-inputs
+;;   ;; The initial, pre-built inputs.  From now on, we can start building our
+;;   ;; own packages.
+;;   `(("libc" ,%bootstrap-glibc)
+;;     ("gcc" ,%bootstrap-gcc)
+;;     ("binutils" ,%bootstrap-binutils)
+;;     ("coreutils&co" ,%bootstrap-coreutils&co)))
 
 ;;; bootstrap.scm ends here

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: mips64el: No such file or directory: "/nix/store/*-glibc-2.13.drv"
  2012-12-30 16:14   ` Nikita Karetnikov
@ 2012-12-30 17:58     ` Ludovic Courtès
  2012-12-30 20:40       ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2012-12-30 17:58 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> Can you replace occurrences of ‘nixpkgs-derivation*’ by
>
> There is no such function.

Oh, OK.

>  (define %bootstrap-inputs
> -  ;; The initial, pre-built inputs.  From now on, we can start building our
> -  ;; own packages.
> -  `(("libc" ,%bootstrap-glibc)
> -    ("gcc" ,%bootstrap-gcc)
> -    ("binutils" ,%bootstrap-binutils)
> -    ("coreutils&co" ,%bootstrap-coreutils&co)))
> +  (compile-time-value
> +   `(("libc" ,(nixpkgs-derivation "glibc" "mips64el-linux"))
> +     ,@(map (lambda (name)
> +              (list name (nixpkgs-derivation name "mips64el-linux")))
> +            '("gnutar" "gzip" "bzip2" "xz" "patch"
> +              "coreutils" "gnused" "gnugrep" "bash"
> +              "gawk"                                ; used by `config.status'
> +              "gcc" "binutils")))))

Remove ‘compile-time-value’, which has the effect I described.

Ludo’.

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

* Re: mips64el: No such file or directory: "/nix/store/*-glibc-2.13.drv"
  2012-12-30 17:58     ` Ludovic Courtès
@ 2012-12-30 20:40       ` Nikita Karetnikov
  2012-12-30 21:20         ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2012-12-30 20:40 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> Remove ‘compile-time-value’, which has the effect I described.

Here is what I tried:

(define %bootstrap-inputs
  `(("libc" ,(nixpkgs-derivation "glibc" "i686-linux"))
	,@(map (lambda (name)
			 (list name (nixpkgs-derivation name "i686-linux")))
		   '("gnutar" "gzip" "bzip2" "xz" "patch"
			 "coreutils" "gnused" "gnugrep" "bash"
			 "gawk"                                ; used by `config.status'
			 "gcc" "binutils"))))

But the same error occurred.

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: mips64el: No such file or directory: "/nix/store/*-glibc-2.13.drv"
  2012-12-30 20:40       ` Nikita Karetnikov
@ 2012-12-30 21:20         ` Ludovic Courtès
  2012-12-30 22:43           ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2012-12-30 21:20 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> Remove ‘compile-time-value’, which has the effect I described.
>
> Here is what I tried:

Looks good to me.

Can you run ‘make clean && make’ in Guix, in case the .drv path was
retained elsewhere?

Ludo’.

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

* Re: mips64el: No such file or directory: "/nix/store/*-glibc-2.13.drv"
  2012-12-30 21:20         ` Ludovic Courtès
@ 2012-12-30 22:43           ` Nikita Karetnikov
  2012-12-31 12:21             ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2012-12-30 22:43 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> Can you run ‘make clean && make’ in Guix, in case the .drv path was
> retained elsewhere?

Same error.

Also, 'make clean' returned some warnings.

# make clean

[...]

make[1]: Entering directory `/home/guix-savannah'

test -z "nix-setuid-helper" || rm -f nix-setuid-helper
find "/home/guix-savannah/test-tmp" | xargs chmod +w
find: `/home/guix-savannah/test-tmp': No such file or directory
chmod: missing operand after ‘+w’
Try 'chmod --help' for more information.
make[1]: [clean-local] Error 123 (ignored)

[...]

make[1]: Leaving directory `/home/guix-savannah'

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: mips64el: No such file or directory: "/nix/store/*-glibc-2.13.drv"
  2012-12-30 22:43           ` Nikita Karetnikov
@ 2012-12-31 12:21             ` Ludovic Courtès
  2013-01-08 13:26               ` Porting to mips64el (was: mips64el: No such file or directory: "/nix/store/*-glibc-2.13.drv") Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2012-12-31 12:21 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> Can you run ‘make clean && make’ in Guix, in case the .drv path was
>> retained elsewhere?
>
> Same error.

Then I’m pretty clueless here.  /nix/store/*-glibc-2.13.drv is
definitely the result of “nix-instantiate -A glibc /path/to/nixpkgs”.
It should be valid here.

> test -z "nix-setuid-helper" || rm -f nix-setuid-helper
> find "/home/guix-savannah/test-tmp" | xargs chmod +w
> find: `/home/guix-savannah/test-tmp': No such file or directory
> chmod: missing operand after ‘+w’
> Try 'chmod --help' for more information.
> make[1]: [clean-local] Error 123 (ignored)

Should be fixed now.

Thanks,
Ludo’.

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

* Porting to mips64el (was: mips64el: No such file or directory: "/nix/store/*-glibc-2.13.drv")
  2012-12-31 12:21             ` Ludovic Courtès
@ 2013-01-08 13:26               ` Nikita Karetnikov
  2013-01-08 13:34                 ` Porting to mips64el Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-08 13:26 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> Then I’m pretty clueless here.  /nix/store/*-glibc-2.13.drv is
> definitely the result of “nix-instantiate -A glibc /path/to/nixpkgs”.
> It should be valid here.

I haven't found a workaround.  But I decided to try again in a new
chroot.  Now 'make' fails with an error.

# ./bootstrap
# ./configure
# make

Backtrace:
In system/base/compile.scm:
 177: 19 [lp (#<procedure compile-tree-il (x e opts)>) (define-module # # ...) ...]
In ice-9/boot-9.scm:
2131: 18 [save-module-excursion #<procedure 103cb480 at language/scheme/compile-tree-il.scm:29:3 ()>]
In language/scheme/compile-tree-il.scm:
  31: 17 [#<procedure 103cb480 at language/scheme/compile-tree-il.scm:29:3 ()>]
In ice-9/psyntax.scm:
1091: 16 [expand-top-sequence ((define-module # # # ...)) () ((top)) ...]
 976: 15 [scan ((define-module (distro packages base) #:use-module ...)) () ...]
 270: 14 [scan ((#(syntax-object let # ...) (#) (# #) ...)) () ...]
In ice-9/eval.scm:
 400: 13 [eval # ()]
In ice-9/boot-9.scm:
2681: 12 [define-module* (distro packages base) #:filename ...]
2656: 11 [resolve-imports ((#) (#) (#) (#) ...)]
2594: 10 [resolve-interface (distro packages bootstrap) #:select ...]
2519: 9 [#<procedure 1017ea70 at ice-9/boot-9.scm:2507:4 (name #:optional autoload version #:key ensure)> # ...]
2786: 8 [try-module-autoload (distro packages bootstrap) #f]
2131: 7 [save-module-excursion #<procedure 106c3e40 at ice-9/boot-9.scm:2787:17 ()>]
2797: 6 [#<procedure 106c3e40 at ice-9/boot-9.scm:2787:17 ()>]
In unknown file:
   ?: 5 [primitive-load-path "distro/packages/bootstrap" #f]
In ice-9/eval.scm:
 442: 4 [eval # ()]
In guix/utils.scm:
 171: 3 [nixpkgs-derivation "guile" "mips64el-linux"]
In ice-9/popen.scm:
  52: 2 [open-pipe* "r" "/usr/local/bin/nix-instantiate" ...]
In unknown file:
   ?: 1 [open-process "r" "/usr/local/bin/nix-instantiate" ...]
In ice-9/boot-9.scm:
 106: 0 [#<procedure 102b68e0 at ice-9/boot-9.scm:97:6 (thrown-k . args)> wrong-type-arg ...]

ice-9/boot-9.scm:106:20: In procedure #<procedure 102b68e0 at ice-9/boot-9.scm:97:6 (thrown-k . args)>:
ice-9/boot-9.scm:106:20: Wrong type (expecting string): #f
make[2]: *** [distro/packages/base.go] Error 1
make[2]: Leaving directory `/home/guix-savannah'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/guix-savannah'
make: *** [all] Error 2

Here is a more descriptive error message:

scheme@(guile-user)> ,use (distro packages base)

[...]

While executing meta-command:
ERROR: Unbound variable: %bootstrap-guile

More tests:

scheme@(guile-user)> ,use (distro packages bootstrap)
While executing meta-command:
ERROR: Wrong type (expecting string): #f

This error won't appear if I run ',use' again:

scheme@(guile-user)> ,use (distro packages bootstrap)
scheme@(guile-user)>

But I'll get the 'Unbound variable' error anyway:

scheme@(guile-user)> %bootstrap-guile
;;; <unknown-location>: warning: possibly unbound variable `%bootstrap-guile'
ERROR: In procedure #<procedure 10505270 ()>:
ERROR: In procedure module-lookup: Unbound variable: %bootstrap-guile

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> 

By the way, here is a definition of '%bootstrap-guile':

(define %bootstrap-guile
  (nixpkgs-derivation "guile" "mips64el-linux"))

I also tried to call the above procedure from the REPL, but it didn't
work out:

scheme@(guile-user)> ,use (guix utils)
scheme@(guile-user)> (nixpkgs-derivation "guile" "mips64el-linux")
ERROR: In procedure open-process:
ERROR: Wrong type (expecting string): #f

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> 
scheme@(guile-user)> (nixpkgs-derivation "hello" "mips64el-linux")
ERROR: In procedure open-process:
ERROR: Wrong type (expecting string): #f

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> 
scheme@(guile-user)> (nixpkgs-derivation "hello")
ERROR: In procedure open-process:
ERROR: Wrong type (expecting string): #f

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> 

It's possible that I've forgotten to install something.  I ran
'nix-env -i guile' to check that Nix-related things work fine, but I
interrupted the process when it decided to fetch the Linux kernel from
<kernel.org>.

(Actually, it's a bit disappointing because I thought that
'export HYDRA_DISALLOW_UNFREE=1' can handle this.  But it's a different
issue.)

So, do you have any ideas?

Nikita





[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-08 13:26               ` Porting to mips64el (was: mips64el: No such file or directory: "/nix/store/*-glibc-2.13.drv") Nikita Karetnikov
@ 2013-01-08 13:34                 ` Ludovic Courtès
  2013-01-08 14:52                   ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-08 13:34 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Hi!

Nikita Karetnikov <nikita@karetnikov.org> skribis:

> scheme@(guile-user)> (nixpkgs-derivation "hello")
> ERROR: In procedure open-process:
> ERROR: Wrong type (expecting string): #f
>
> Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
> scheme@(guile-user) [1]> 

Can you type ,locals at that point, to display local variables?

Most likely the problem is that (%nixpkgs-directory) is #f.  To fix
that, you need to either run configure --with-nixpkgs=/path/to/nixpkgs,
or set the ‘NIXPKGS’ environment variable.

HTH,
Ludo’.

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

* Re: Porting to mips64el
  2013-01-08 13:34                 ` Porting to mips64el Ludovic Courtès
@ 2013-01-08 14:52                   ` Nikita Karetnikov
  2013-01-08 16:30                     ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-08 14:52 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> Most likely the problem is that (%nixpkgs-directory) is #f.  To fix
> that, you need to either run configure --with-nixpkgs=/path/to/nixpkgs,
> or set the ‘NIXPKGS’ environment variable.

You're right.  I forgot to specify this option.

How can I tell Guix that 'nix-worker --daemon' listens on
'/nix/var/nix/daemon-socket/socket', not
'/usr/local/var/nix/daemon-socket/socket'?  '--with-nix-prefix=/nix'
doesn't work.

I created a symlink to solve this:

# ln -s /nix/var/nix/daemon-socket/socket /usr/local/var/nix/daemon-socket/socket

>> It's possible that I've forgotten to install something.  I ran
>> 'nix-env -i guile' to check that Nix-related things work fine, but I
>> interrupted the process when it decided to fetch the Linux kernel from
>> <kernel.org>.

>> (Actually, it's a bit disappointing because I thought that
>> 'export HYDRA_DISALLOW_UNFREE=1' can handle this.  But it's a different
>> issue.)

Well, it turned out that this is a related issue.

'./pre-inst-env guix-build -K hello' also tries to fetch the kernel from
<http://www.all.kernel.org>. How to instruct Guix to use Linux-libre
instead?

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-08 14:52                   ` Nikita Karetnikov
@ 2013-01-08 16:30                     ` Ludovic Courtès
  2013-01-08 18:18                       ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-08 16:30 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Hi,

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> Most likely the problem is that (%nixpkgs-directory) is #f.  To fix
>> that, you need to either run configure --with-nixpkgs=/path/to/nixpkgs,
>> or set the ‘NIXPKGS’ environment variable.
>
> You're right.  I forgot to specify this option.
>
> How can I tell Guix that 'nix-worker --daemon' listens on
> '/nix/var/nix/daemon-socket/socket', not
> '/usr/local/var/nix/daemon-socket/socket'?  '--with-nix-prefix=/nix'
> doesn't work.

With --localstatedir=/nix/var/nix (see store.scm and config.scm).

>>> It's possible that I've forgotten to install something.  I ran
>>> 'nix-env -i guile' to check that Nix-related things work fine, but I
>>> interrupted the process when it decided to fetch the Linux kernel from
>>> <kernel.org>.
>
>>> (Actually, it's a bit disappointing because I thought that
>>> 'export HYDRA_DISALLOW_UNFREE=1' can handle this.  But it's a different
>>> issue.)
>
> Well, it turned out that this is a related issue.
>
> './pre-inst-env guix-build -K hello' also tries to fetch the kernel from
> <http://www.all.kernel.org>. How to instruct Guix to use Linux-libre
> instead?

Remember: to bootstrap things here, you’re using Nixpkgs.  Here it’s
Nixpkgs’s glibc that uses kernel.org Linux headers.

At this point, you don’t want to build Hello.  ;-)  Instead, you should
build the bootstrap binaries, as described in HACKING, that will allow
our distro to be self-contained.  Make sure to use ‘core-updates’ as a
starting point.

HTH,
Ludo’.

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

* Re: Porting to mips64el
  2013-01-08 16:30                     ` Ludovic Courtès
@ 2013-01-08 18:18                       ` Nikita Karetnikov
  2013-01-08 20:50                         ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-08 18:18 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> With --localstatedir=/nix/var/nix (see store.scm and config.scm).

Actually, it's '--localstatedir=/nix/var', but thanks anyway.

> Remember: to bootstrap things here, you’re using Nixpkgs.  Here it’s
> Nixpkgs’s glibc that uses kernel.org Linux headers.

Yes, I understand that I'm using Nixpkgs.  But is it possible to use
Linux-libre?

> At this point, you don’t want to build Hello.  ;-)  Instead, you should
> build the bootstrap binaries, as described in HACKING, that will allow
> our distro to be self-contained.  Make sure to use ‘core-updates’ as a
> starting point.

Ah, I thought that Guix will bootstrap on the fly if there are no
bootstrap binaries.

As far as I can tell, there are errors in 'HACKING'.  Here is a snippet:

  ./pre-inst-env guix-build                                       \
      -e '(@@ (distro packages base) %guile-bootstrap-tarball)'   \
      --system=i686-linux

There is no '%guile-bootstrap-tarball' in (distro packages base).  I
think it should be changed to (distro packages make-bootstrap).

Going back to the kernel issue...  If I invoke a similar command, it
will try to download the kernel from <http://www.all.kernel.org>.  Is
this unavoidable?

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-08 18:18                       ` Nikita Karetnikov
@ 2013-01-08 20:50                         ` Ludovic Courtès
  2013-01-09 15:53                           ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-08 20:50 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> With --localstatedir=/nix/var/nix (see store.scm and config.scm).
>
> Actually, it's '--localstatedir=/nix/var', but thanks anyway.

Oops, sorry.

>> Remember: to bootstrap things here, you’re using Nixpkgs.  Here it’s
>> Nixpkgs’s glibc that uses kernel.org Linux headers.
>
> Yes, I understand that I'm using Nixpkgs.  But is it possible to use
> Linux-libre?

Well, you could modify Nixpkgs for that.  But note that only the headers
are used, and they are bit-for-bit the same as those of the
corresponding Linux-Libre.  Furthermore, you will no longer need Nixpkgs
once you’ve built the bootstrap binaries for Guix, so I would not
bother.

An unrelated issue that just came to mind: MIPS code for libc is in
glibc-ports, right?  That means you’ll have to conditionally add that to
the inputs of glibc, in base.scm.

>> At this point, you don’t want to build Hello.  ;-)  Instead, you should
>> build the bootstrap binaries, as described in HACKING, that will allow
>> our distro to be self-contained.  Make sure to use ‘core-updates’ as a
>> starting point.
>
> Ah, I thought that Guix will bootstrap on the fly if there are no
> bootstrap binaries.

Well, in a way, yes.  That is, instead of using the statically-linked
binaries made via make-bootstrap.scm, it will use the dynamically-linked
tools provided by Nixpkgs, and then the rest of the procedure is the
same–i.e., you end up with binaries that don’t depend on those produced
using Nixpkgs.

> As far as I can tell, there are errors in 'HACKING'.  Here is a snippet:
>
>   ./pre-inst-env guix-build                                       \
>       -e '(@@ (distro packages base) %guile-bootstrap-tarball)'   \
>       --system=i686-linux
>
> There is no '%guile-bootstrap-tarball' in (distro packages base).  I
> think it should be changed to (distro packages make-bootstrap).

Right, will fix.

Thanks,
Ludo’.

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

* Re: Porting to mips64el
  2013-01-08 20:50                         ` Ludovic Courtès
@ 2013-01-09 15:53                           ` Nikita Karetnikov
  2013-01-09 21:42                             ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-09 15:53 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> Well, you could modify Nixpkgs for that.  But note that only the headers
> are used, and they are bit-for-bit the same as those of the
> corresponding Linux-Libre.  Furthermore, you will no longer need Nixpkgs
> once you’ve built the bootstrap binaries for Guix, so I would not
> bother.

Anyway, I'd like to know how to do it because I often use 'nix-env' to
test things.

'glibc' failed again.

# ./pre-inst-env guix-build -K                                           \
  -e '(@@ (distro packages make-bootstrap) %bootstrap-binaries-tarball)' \
  --system=mips64el-linux

[...]

make[2]: Leaving directory `/tmp/nix-build-qc2f73airw91j5hjq7dn7737wzbcygq9-glibc-2.13.drv-0/glibc-2.13/login'
building elf/others
make  subdir=elf -C elf ..=../ others
make[1]: *** [elf/others] Killed
make[1]: Leaving directory `/tmp/nix-build-qc2f73airw91j5hjq7dn7737wzbcygq9-glibc-2.13.drv-0/glibc-2.13'
make: *** [all] Error 2
builder for `/nix/store/qc2f73airw91j5hjq7dn7737wzbcygq9-glibc-2.13.drv' failed with exit code 2
@ build-failed /nix/store/qc2f73airw91j5hjq7dn7737wzbcygq9-glibc-2.13.drv /nix/store/ifd3d65hsymw84axpvb6x1qk76l40gw4-glibc-2.13 1 builder for `/nix/store/qc2f73airw91j5hjq7dn7737wzbcygq9-glibc-2.13.drv' failed with exit code 2
cannot build derivation `/nix/store/gl6lyv6z12sy7lvmzb9r77jn0bjsnm7d-linux-libre-headers-3.3.8.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/isii94vycpcsz6gjngks19lkz899aklg-guile-2.0.7.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/v3v933mnmy0q1aa9nk93pskn5514i2rp-static-binaries-tarball-0.drv': 1 dependencies couldn't be built
error: build failed: build of `/nix/store/v3v933mnmy0q1aa9nk93pskn5514i2rp-static-binaries-tarball-0.drv' failed
3080 worker operations

Some snippets from 'config.log':

/nix/store/91f8rlqhb9vgkghaf9p6bi7giadaawn3-bootstrap-tools/bin/gcc: error trying to exec '/nix/store/91f8rlqhb9vgkghaf9p6bi7giadaawn3-bootstrap-tools/bin/mips64el-unknown-linux-gcc--B/nix/store/hdwf3jcqrbcz5c676ch8ysf7agi51wfg-bootstrap-glibc/lib/': execvp: No such file or directory

conftest.c:9:28: fatal error: ac_nonexistent.h: No such file or directory
compilation terminated.

/nix/store/91f8rlqhb9vgkghaf9p6bi7giadaawn3-bootstrap-tools/bin/g++: error trying to exec '/nix/store/91f8rlqhb9vgkghaf9p6bi7giadaawn3-bootstrap-tools/bin/mips64el-unknown-linux-gcc--B/nix/store/hdwf3jcqrbcz5c676ch8ysf7agi51wfg-bootstrap-glibc/lib/': execvp: No such file or directory

conftest.c:24:16: fatal error: gd.h: No such file or directory
compilation terminated.

configure:7831: checking whether -fPIC is default
conftest.c:2:3: error: #error PIC is default.

> An unrelated issue that just came to mind: MIPS code for libc is in
> glibc-ports, right?  That means you’ll have to conditionally add that to
> the inputs of glibc, in base.scm.

Did it fail because of this?

I don't understand how to add 'glibc-ports'.  Should I package it?
(There is no such package in Guix.)  'grep' shows that 'glibc-ports'
come along with 'glibc' for ARM and MIPS.  Here is a snippet from
'nixpkgs/pkgs/development/libraries/glibc/2.13/common.nix':

  needsPortsNative = stdenv.isMips || stdenv.isArm;
  needsPortsCross = cross.arch == "mips" || cross.arch == "arm";
  needsPorts =
    if (stdenv ? cross) && stdenv.cross != null && hurdHeaders == null then true    else if cross == null then needsPortsNative
    else needsPortsCross;

  srcPorts = fetchurl {
    url = "mirror://gnu/glibc/glibc-ports-2.13.tar.bz2";
    sha256 = "0npffql62m1xba15l1wkaqf2p0l2bvb33720gx28764jmq0la75i";
  };

If it's not the related, how can I build 'glibc' without Nixpkgs?

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-09 15:53                           ` Nikita Karetnikov
@ 2013-01-09 21:42                             ` Ludovic Courtès
  2013-01-11  4:08                               ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-09 21:42 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> Well, you could modify Nixpkgs for that.  But note that only the headers
>> are used, and they are bit-for-bit the same as those of the
>> corresponding Linux-Libre.  Furthermore, you will no longer need Nixpkgs
>> once you’ve built the bootstrap binaries for Guix, so I would not
>> bother.
>
> Anyway, I'd like to know how to do it because I often use 'nix-env' to
> test things.

You’d have to edit $NIXPKGS/pkgs/os-specific/linux/kernel-headers/*.nix
and change the URL in there.

> 'glibc' failed again.

[...]

> make[2]: Leaving directory `/tmp/nix-build-qc2f73airw91j5hjq7dn7737wzbcygq9-glibc-2.13.drv-0/glibc-2.13/login'
> building elf/others
> make  subdir=elf -C elf ..=../ others
> make[1]: *** [elf/others] Killed

Yes, I think you reported it earlier.  This could be either a sign of
not enough memory, or perhaps that the consequence of trying to run an
invalid binary (such as a corrupt ELF executable.)

I think Lluís said that something must be added to ~/.nixpkgs/config.nix
to make sure the right platform setup is used, but again, I have no
expertise in MIPS64 so I can’t really help.

> Some snippets from 'config.log':

Nothing to worry about here.

>> An unrelated issue that just came to mind: MIPS code for libc is in
>> glibc-ports, right?  That means you’ll have to conditionally add that to
>> the inputs of glibc, in base.scm.
>
> Did it fail because of this?

No no.  Nixpkgs is fine (well, should be); I was talking to glibc in
Guix itself (base.scm), which needs to be adjusted.  You haven’t reached
the point of building packages defined in Guix yet.

> I don't understand how to add 'glibc-ports'.

[...]

>   needsPortsNative = stdenv.isMips || stdenv.isArm;
>   needsPortsCross = cross.arch == "mips" || cross.arch == "arm";
>   needsPorts =
>     if (stdenv ? cross) && stdenv.cross != null && hurdHeaders == null then true    else if cross == null then needsPortsNative
>     else needsPortsCross;
>
>   srcPorts = fetchurl {
>     url = "mirror://gnu/glibc/glibc-ports-2.13.tar.bz2";
>     sha256 = "0npffql62m1xba15l1wkaqf2p0l2bvb33720gx28764jmq0la75i";
>   };

glibc-ports is a glibc add-on, which adds architecture-specific code for
some platforms (glibc itself comes with support for IA32, x86_64, and
SPARC, IIRC, but support for other architectures is in the glibc-ports
tarball.)

Thanks,
Ludo’.

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

* Re: Porting to mips64el
  2013-01-09 21:42                             ` Ludovic Courtès
@ 2013-01-11  4:08                               ` Nikita Karetnikov
  2013-01-11 13:28                                 ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-11  4:08 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> I think Lluís said that something must be added to ~/.nixpkgs/config.nix
> to make sure the right platform setup is used, but again, I have no
> expertise in MIPS64 so I can’t really help.

Thanks, I forgot about 'config.nix'.  Unfortunately, it didn't help.
(The hashes are different, but the errors are the same.)

> Yes, I think you reported it earlier.  This could be either a sign of
> not enough memory, or perhaps that the consequence of trying to run an
> invalid binary (such as a corrupt ELF executable.)

How can I test the latter?  Will it help if I build something without
Nixpkgs?  (What should I build?)

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-11  4:08                               ` Nikita Karetnikov
@ 2013-01-11 13:28                                 ` Ludovic Courtès
  2013-01-11 21:49                                   ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-11 13:28 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Hi,

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> I think Lluís said that something must be added to ~/.nixpkgs/config.nix
>> to make sure the right platform setup is used, but again, I have no
>> expertise in MIPS64 so I can’t really help.
>
> Thanks, I forgot about 'config.nix'.  Unfortunately, it didn't help.

It seems we’re still missing something, because my understanding is that
Lluís has it working on basically the same hardware.  Unfortunately, I’m
ignorant about all things MIPS.

>> Yes, I think you reported it earlier.  This could be either a sign of
>> not enough memory, or perhaps that the consequence of trying to run an
>> invalid binary (such as a corrupt ELF executable.)
>
> How can I test the latter?

You could run ‘nix-build -A stdenv -K /path/to/nixpkgs’.  Upon glibc
build failure, just get into the failed build tree:

  $ sudo chown -r $USER /tmp/nix-build-*glibc-2.13*
  $ cd /tmp/nix-build-*glibc-2.13*
  $ source env-vars
  $ cd build
  $ make

And then ‘strace’ as needed, etc.

(This is admittedly very generic advice, but again the best I can say.)

> Will it help if I build something without Nixpkgs?  (What should I
> build?)

As noted in ‘HACKING’, if you want to avoid Nixpkgs, you could try to
use the installed distro tools as a replacement for those normally
provided by bootstrap.scm.

The way to do it would be along the lines of:

  (define %bootstrap-gcc
    (package
      (name "gcc-bootstrap")
      (source #f)
      (build-system trivial-build-system)
      (arguments
       '(#:builder (begin
                     (use-modules (guix build utils))
                     (define out (assoc-ref %outputs "out"))
                     (define bin (string-append out "/bin"))
                     (mkdir-p bin)
                     (symlink "/usr/bin/gcc"
                              (string-append bin "/gcc")))))
      ;; ...
      ))

And similarly for %bootstrap-glibc, %bootstrap-guile, and all the
others.

Then you would run ‘guix-daemon --disable-chroot’, and try:

  $ ./pre-inst-env guix-build bootstrap-tarballs -K

I’ve never done that, so you’re on your own, but in principle it should work.

HTH,
Ludo’.

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

* Re: Porting to mips64el
  2013-01-11 13:28                                 ` Ludovic Courtès
@ 2013-01-11 21:49                                   ` Nikita Karetnikov
  2013-01-11 23:44                                     ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-11 21:49 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> You could run ‘nix-build -A stdenv -K /path/to/nixpkgs’.  Upon glibc
> build failure, just get into the failed build tree:

Yep, it failed with the same error.

>  $ sudo chown -r $USER /tmp/nix-build-*glibc-2.13*
>  $ cd /tmp/nix-build-*glibc-2.13*
>  $ source env-vars
>  $ cd build
>  $ make

[...]

make[2]: Nothing to be done for `subdir_lib'.
make[2]: Leaving directory `/tmp/nix-build-46dkvs7arjnsb0073n603lr7c6r6wskl-glibc-2.13.drv-1/glibc-2.13/catgets'
building math/subdir_lib
smake  subdir=math -C math ..=../ subdir_lib
make[1]: *** [math/subdir_lib] Killed
make[1]: Leaving directory `/tmp/nix-build-46dkvs7arjnsb0073n603lr7c6r6wskl-glibc-2.13.drv-1/glibc-2.13'
make: *** [all] Error 2

Here is a snippet from 'env-vars':

export PATH="/nix/store/9nw1avchbg97czpvj9ivnxfyji42bi6w-bootstrap-gcc-wrapper/bin:/nix/store/91f8rlqhb9vgkghaf9p6bi7giadaawn3-bootstrap-tools/bin:/nix/store/91f8rlqhb9vgkghaf9p6bi7giadaawn3-bootstrap-tools/bin:/nix/store/r33gc5rbc2yaks3kwx6m18di31532rgs-binutils-2.21.1a/bin:/nix/store/91f8rlqhb9vgkghaf9p6bi7giadaawn3-bootstrap-tools/bin"

# /nix/store/9nw1avchbg97czpvj9ivnxfyji42bi6w-bootstrap-gcc-wrapper/bin/gcc --version
gcc (GCC) 4.5.0
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I've found some (probably related) links. [1,2]  The proposed solution is
to use a newer GCC.  How can I try 4.7.1?

Nikita

[1] http://superuser.com/questions/509294/linux-from-scratch-glibc-make-error
[2] http://sourceware.org/bugzilla/show_bug.cgi?id=14281

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-11 21:49                                   ` Nikita Karetnikov
@ 2013-01-11 23:44                                     ` Ludovic Courtès
  2013-01-12 14:49                                       ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-11 23:44 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> You could run ‘nix-build -A stdenv -K /path/to/nixpkgs’.  Upon glibc
>> build failure, just get into the failed build tree:
>
> Yep, it failed with the same error.

Then there may be something wrong with your setup, because glibc is
known to build on Fuloong, right?  We’d need to compare the derivation
and output paths with Lluís, but I think you already did that.

> make[2]: Nothing to be done for `subdir_lib'.
> make[2]: Leaving directory `/tmp/nix-build-46dkvs7arjnsb0073n603lr7c6r6wskl-glibc-2.13.drv-1/glibc-2.13/catgets'
> building math/subdir_lib
> smake  subdir=math -C math ..=../ subdir_lib
> make[1]: *** [math/subdir_lib] Killed
> make[1]: Leaving directory `/tmp/nix-build-46dkvs7arjnsb0073n603lr7c6r6wskl-glibc-2.13.drv-1/glibc-2.13'
> make: *** [all] Error 2

Can you run ‘strace -f -o log make’ to see exactly what gets killed?
(Do that in the build tree after having sourced ‘env-vars’.)

> I've found some (probably related) links. [1,2]

That seems different: they get an actual compiler error, whereas you get
no error, just “Killed”.

Ludo’.

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

* Re: Porting to mips64el
  2013-01-11 23:44                                     ` Ludovic Courtès
@ 2013-01-12 14:49                                       ` Nikita Karetnikov
  2013-01-12 15:06                                         ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-12 14:49 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

Hi,

It's a memory issue.  I tried without Emacs and got 'virtual memory
exhausted'.

I have a couple ideas and I'm going to try them.

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-12 14:49                                       ` Nikita Karetnikov
@ 2013-01-12 15:06                                         ` Ludovic Courtès
  2013-01-12 15:46                                           ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-12 15:06 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Hello!

Nikita Karetnikov <nikita@karetnikov.org> skribis:

> It's a memory issue.

How do you know?

> I tried without Emacs and got 'virtual memory exhausted'.

You mean without a running Emacs process alongside?

Good luck!  ;-)

Ludo’.

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

* Re: Porting to mips64el
  2013-01-12 15:06                                         ` Ludovic Courtès
@ 2013-01-12 15:46                                           ` Nikita Karetnikov
  2013-01-12 21:01                                             ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-12 15:46 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

>> It's a memory issue.

> How do you know?

I don't.  That phrase is not accurate.  I was trying to say that it
failed with a memory-related error.  Of course it doesn't explain
anything.  For instance, a software bug can be the cause.

> You mean without a running Emacs process alongside?

Yes, from a virtual console (tty).

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-12 15:46                                           ` Nikita Karetnikov
@ 2013-01-12 21:01                                             ` Ludovic Courtès
  2013-01-12 23:00                                               ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-12 21:01 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>>> It's a memory issue.
>
>> How do you know?
>
> I don't.

So you should really try ‘strace -f make’ as I suggested.  It may give
hints, at least.

Ludo’.

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

* Re: Porting to mips64el
  2013-01-12 21:01                                             ` Ludovic Courtès
@ 2013-01-12 23:00                                               ` Nikita Karetnikov
  2013-01-13 20:49                                                 ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-12 23:00 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> So you should really try ‘strace -f make’ as I suggested.  It may give
> hints, at least.

I forgot about it.  (This is my second-to-last attempt.)

$ tail -n 100 ~/guix/home/make.log
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  brk(0x2affc000)                   = 0x2afd8000
2774  mmap(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7cde8000
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7, /* 948 entries */, 23840) = 23840
2774  lseek(7, 745214952, SEEK_SET)     = 745214952
2774  getdents(7,  <ptrace(SYSCALL):No such process>
2774  +++ killed by SIGKILL +++
32229 <... wait4 resumed> [{WIFSIGNALED(s) && WTERMSIG(s) == SIGKILL}], 0, NULL) = 2774
32229 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=2774, si_status=SIGKILL, si_utime=13142, si_stime=13959} ---
32229 rt_sigreturn()                    = 2774
32229 futex(0x2b26beb0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
32229 write(2, "make[1]: ", 9)          = 9
32229 write(2, "*** [math/subdir_lib] Killed", 28) = 28
32229 write(2, "\n", 1)                 = 1
32229 rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 16) = 0
32229 rt_sigprocmask(SIG_SETMASK, [], NULL, 16) = 0
32229 chdir("/tmp/nix-build-46dkvs7arjnsb0073n603lr7c6r6wskl-glibc-2.13.drv-1/build") = 0
32229 write(1, "make[1]: Leaving directory `/tmp"..., 105) = 105
32229 write(1, "\33[q", 3)              = 3
32229 write(2, "\33[q", 3)              = 3
32229 close(1)                          = 0
32229 munmap(0x2b29c000, 65536)         = 0
32229 exit_group(2)                     = ?
32229 +++ exited with 2 +++
32228 <... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 2}], 0, NULL) = 32229
32228 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=32229, si_status=2, si_utime=1110, si_stime=44} ---
32228 rt_sigreturn()                    = 32229
32228 write(2, "make: ", 6)             = 6
32228 write(2, "*** [all] Error 2", 17) = 17
32228 write(2, "\n", 1)                 = 1
32228 rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 16) = 0
32228 rt_sigprocmask(SIG_SETMASK, [], NULL, 16) = 0
32228 chdir("/tmp/nix-build-46dkvs7arjnsb0073n603lr7c6r6wskl-glibc-2.13.drv-1/build") = 0
32228 write(2, "\33[q", 3)              = 3
32228 close(1)                          = 0
32228 munmap(0x77d54000, 65536)         = 0
32228 exit_group(2)                     = ?
32228 +++ exited with 2 +++

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-12 23:00                                               ` Nikita Karetnikov
@ 2013-01-13 20:49                                                 ` Ludovic Courtès
  2013-01-19 16:49                                                   ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-13 20:49 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

> 2774  lseek(7, 745214952, SEEK_SET)     = 745214952
> 2774  getdents(7,  <ptrace(SYSCALL):No such process>
> 2774  +++ killed by SIGKILL +++

I’m again no expert in that area, but this hints at the
readdir/getdirent bug mentioned earlier by Lluís:

  http://patchwork.linux-mips.org/patch/4496/

So please, make sure to run a Linux(-Libre) kernel known to have the fix
(3.5 and 3.6 are known broken, AIUI.)

HTH,
Ludo’.

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

* Re: Porting to mips64el
  2013-01-13 20:49                                                 ` Ludovic Courtès
@ 2013-01-19 16:49                                                   ` Nikita Karetnikov
  2013-01-19 17:45                                                     ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-19 16:49 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

Hi,

> So please, make sure to run a Linux(-Libre) kernel known to have the fix
> (3.5 and 3.6 are known broken, AIUI.)

I'm using 3.4 and ext3.  That error occurred because of these options:

# CONFIG_EXT3_FS is not set
CONFIG_EXT4_FS=y
CONFIG_EXT4_USE_FOR_EXT23=y
CONFIG_EXT4_FS_XATTR=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y

I've been told that ext4 is broken.  So I disabled it and enabled ext3.

Then I invoked 'nix-build -A stdenv -K /home/nixpkgs-github' and it
succeeded.  (How can I check it?)

I'm going to build the bootstrap binaries.

Oh, I've just noticed that I'm still using Nix 1.1.  Should I update to
1.3 and try after that?  Does it matter?

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-19 16:49                                                   ` Nikita Karetnikov
@ 2013-01-19 17:45                                                     ` Ludovic Courtès
  2013-01-20  7:39                                                       ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-19 17:45 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Hi,

Nikita Karetnikov <nikita@karetnikov.org> skribis:

> I'm using 3.4 and ext3.  That error occurred because of these options:
>
> # CONFIG_EXT3_FS is not set
> CONFIG_EXT4_FS=y
> CONFIG_EXT4_USE_FOR_EXT23=y
> CONFIG_EXT4_FS_XATTR=y
> CONFIG_EXT4_FS_POSIX_ACL=y
> CONFIG_EXT4_FS_SECURITY=y
>
> I've been told that ext4 is broken.  So I disabled it and enabled ext3.

Good that you found out!

> Then I invoked 'nix-build -A stdenv -K /home/nixpkgs-github' and it
> succeeded.  (How can I check it?)

“nix-build -A stdenv ...” prints the store path of Nixpkgs ‘stdenv’,
which contains GCC, Coreutils, etc.  You can just quickly check that the
contents look reasonable.

> I'm going to build the bootstrap binaries.

Great!  Crossing fingers.  ;-)

> Oh, I've just noticed that I'm still using Nix 1.1.  Should I update to
> 1.3 and try after that?  Does it matter?

1.1 should be OK.

One you have the bootstrap binaries, you’ll be able to use guix-daemon,
which corresponds to Nix 1.3.

Ludo’.

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

* Re: Porting to mips64el
  2013-01-19 17:45                                                     ` Ludovic Courtès
@ 2013-01-20  7:39                                                       ` Nikita Karetnikov
  2013-01-20 14:33                                                         ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-20  7:39 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> Great!  Crossing fingers.  ;-)

# cat /usr/local/etc/nix/nix.conf
build-users-group=nixbld

# ./pre-inst-env guix-build -K \
> -e '(@ (gnu packages make-bootstrap) %bootstrap-tarballs)' \
> --system=mips64el-linux

[...]

I've tried to compile and run the following simple program:

#include <stdio.h>
int main() { printf("Ok\n"); return(0); }

I used the command:

	gcc -o try -O2 -fno-strict-aliasing -pipe -fstack-protector -I/nix/store/zcfiac107h1nji9sdiv2m1dzpvvagrh5-glibc-2.13/include -fstack-protector -L/nix/store/zcfiac107h1nji9sdiv2m1dzpvvagrh5-glibc-2.13/lib try.c -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
	 ./try

and I got the following output:

/nix/store/g8b8alrsy6fw1g4r6jkycpy291w2403a-binutils-2.21.1a/bin/ld: cannot find -lgdbm
/nix/store/g8b8alrsy6fw1g4r6jkycpy291w2403a-binutils-2.21.1a/bin/ld: cannot find -ldb
collect2: ld returned 1 exit status
I can't compile the test program.
(The supplied flags or libraries might be incorrect.)
 
You have a BIG problem.  Shall I abort Configure [y]  
Ok.  Stopping Configure.
phase `configure' failed after 19 seconds
builder for `/nix/store/md9lfvkydyapd3pji76gg1blsgs37a4m-perl-5.16.1.drv' failed; keeping build directory `/tmp/nix-build-md9lfvkydyapd3pji76gg1blsgs37a4m-perl-5.16.1.drv-0'
builder for `/nix/store/md9lfvkydyapd3pji76gg1blsgs37a4m-perl-5.16.1.drv' failed with exit code 1
@ build-failed /nix/store/md9lfvkydyapd3pji76gg1blsgs37a4m-perl-5.16.1.drv /nix/store/l1xfmb4f5vz15qd02dh9lqvv1k9q0gwg-perl-5.16.1 1 builder for `/nix/store/md9lfvkydyapd3pji76gg1blsgs37a4m-perl-5.16.1.drv' failed with exit code 1
cannot build derivation `/nix/store/xww122kbc08qcyaika8pf03x273rvph7-linux-libre-headers-3.3.8.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/qsivfcrjlnsxrn5vs4xv3zsh4djbl9li-bootstrap-tarballs-0.drv': 1 dependencies couldn't be built
error: build failed: build of `/nix/store/qsivfcrjlnsxrn5vs4xv3zsh4djbl9li-bootstrap-tarballs-0.drv' failed

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-20  7:39                                                       ` Nikita Karetnikov
@ 2013-01-20 14:33                                                         ` Ludovic Courtès
  2013-01-22 22:51                                                           ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-20 14:33 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

> I've tried to compile and run the following simple program:

Oh, this is actually Perl’s configure speaking, not you.

> #include <stdio.h>
> int main() { printf("Ok\n"); return(0); }
>
> I used the command:
>
> 	gcc -o try -O2 -fno-strict-aliasing -pipe -fstack-protector -I/nix/store/zcfiac107h1nji9sdiv2m1dzpvvagrh5-glibc-2.13/include -fstack-protector -L/nix/store/zcfiac107h1nji9sdiv2m1dzpvvagrh5-glibc-2.13/lib try.c -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
> 	 ./try
>
> and I got the following output:
>
> /nix/store/g8b8alrsy6fw1g4r6jkycpy291w2403a-binutils-2.21.1a/bin/ld: cannot find -lgdbm
> /nix/store/g8b8alrsy6fw1g4r6jkycpy291w2403a-binutils-2.21.1a/bin/ld: cannot find -ldb
> collect2: ld returned 1 exit status
> I can't compile the test program.
> (The supplied flags or libraries might be incorrect.)
>  
> You have a BIG problem.  Shall I abort Configure [y]  
> Ok.  Stopping Configure.
> phase `configure' failed after 19 seconds

(The above shows that this is Perl as built by Guix, not Nixpkgs.)

Wild guess: you’re building outside of a chroot, and Perl’s configure
found /usr/lib/libgdbm.so, so it decided to link against it, which
didn’t work because our linker doesn’t look for libraries there.

Can you confirm?

Solution: add “build-use-chroot = true” in nix.conf.

Ludo’.

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

* Re: Porting to mips64el
  2013-01-20 14:33                                                         ` Ludovic Courtès
@ 2013-01-22 22:51                                                           ` Nikita Karetnikov
  2013-01-23  5:01                                                             ` Nikita Karetnikov
  2013-01-23 15:33                                                             ` Ludovic Courtès
  0 siblings, 2 replies; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-22 22:51 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> Wild guess: you’re building outside of a chroot, and Perl’s configure
> found /usr/lib/libgdbm.so, so it decided to link against it, which
> didn’t work because our linker doesn’t look for libraries there.

> Can you confirm?

> Solution: add “build-use-chroot = true” in nix.conf.

Everything I tried failed.

First attempt:

# cat /usr/local/etc/nix/nix.conf
build-users-group = nixbld
build-use-chroot = true

# ./pre-inst-env guix-build -K                \
      -e '(@ (gnu packages make-bootstrap) %bootstrap-tarballs)'  \
      --system=mips64el-linux

[...]

@ build-started /nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv /nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1 mips64el-linux /nix/var/log/nix/drvs/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv.bz2
build error: mounting /proc: No such file or directory
builder for `/nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv' failed; keeping build directory `/tmp/nix-build-md9lfvkydyapd3pji76gg1blsgs37a4m-perl-5.16.1.drv-0/nix-build-1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv-0'
builder for `/nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv' failed with exit code 1
@ build-failed /nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv /nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1 1 builder for `/nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv' failed with exit code 1
cannot build derivation `/nix/store/666x2bd8bsc8sk3wvdr67j02pvc8ad5i-glibc-2.17.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/c2aap304bzqf3amx1q6zl067d6j5dwpx-guile-2.0.7.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/chhbkj4w9l5f20bsqwhls2aijr328c2v-bootstrap-tarballs-0.drv': 1 dependencies couldn't be built
error: build failed: build of `/nix/store/chhbkj4w9l5f20bsqwhls2aijr328c2v-bootstrap-tarballs-0.drv' failed

Second:

# cat /usr/local/etc/nix/nix.conf
build-users-group = nixbld
build-use-chroot = true
build-chroot-dirs = /dev /proc

@ build-started /nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv /nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1 mips64el-linux /nix/var/log/nix/drvs/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv.bz2
building /nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1
unpacking sources
unpacking source archive /nix/store/ics0cri221a5lnym4a92xsyv02qis003-patch-2.6.1.tar.gz
source root is patch-2.6.1
patching sources
configuring
configure flags: --prefix=/nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1  
/nix/store/71xcmhyizrp7n0xl596waid5fijckchm-stdenv-linux-boot/setup: ./configure: /bin/sh: bad interpreter: No such file or directory
builder for `/nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv' failed; keeping build directory `/tmp/nix-build-md9lfvkydyapd3pji76gg1blsgs37a4m-perl-5.16.1.drv-0/nix-build-1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv-1'
builder for `/nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv' failed with exit code 126
@ build-failed /nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv /nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1 1 builder for `/nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv' failed with exit code 126
cannot build derivation `/nix/store/83w852928i2k0ibpnhrj79jybpchygbm-make-3.82.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/666x2bd8bsc8sk3wvdr67j02pvc8ad5i-glibc-2.17.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/ch3ap8nmfaxf3rpz6slbfpkihkmzyjcc-linux-libre-headers-3.3.8.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/chhbkj4w9l5f20bsqwhls2aijr328c2v-bootstrap-tarballs-0.drv': 1 dependencies couldn't be built
error: build failed: build of `/nix/store/chhbkj4w9l5f20bsqwhls2aijr328c2v-bootstrap-tarballs-0.drv' failed

Third:

# cat /usr/local/etc/nix/nix.conf
build-users-group = nixbld
build-use-chroot = true
build-chroot-dirs = /dev /proc /bin

@ build-started /nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv /nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1 mips64el-linux /nix/var/log/nix/drvs/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv.bz2
building /nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1
unpacking sources
unpacking source archive /nix/store/ics0cri221a5lnym4a92xsyv02qis003-patch-2.6.1.tar.gz
source root is patch-2.6.1
patching sources
configuring
configure flags: --prefix=/nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1  
/nix/store/71xcmhyizrp7n0xl596waid5fijckchm-stdenv-linux-boot/setup: ./configure: /bin/sh: bad interpreter: No such file or directory
builder for `/nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv' failed; keeping build directory `/tmp/nix-build-md9lfvkydyapd3pji76gg1blsgs37a4m-perl-5.16.1.drv-0/nix-build-1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv-2'
builder for `/nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv' failed with exit code 126
@ build-failed /nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv /nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1 1 builder for `/nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv' failed with exit code 126
cannot build derivation `/nix/store/c2aap304bzqf3amx1q6zl067d6j5dwpx-guile-2.0.7.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/chhbkj4w9l5f20bsqwhls2aijr328c2v-bootstrap-tarballs-0.drv': 1 dependencies couldn't be built
error: build failed: build of `/nix/store/chhbkj4w9l5f20bsqwhls2aijr328c2v-bootstrap-tarballs-0.drv' failed

I'll try to build statically-linked Bash.  Then I'll place it in
'/bin/sh' and try again.  (This worked on i686.)

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-22 22:51                                                           ` Nikita Karetnikov
@ 2013-01-23  5:01                                                             ` Nikita Karetnikov
  2013-01-23 15:35                                                               ` Ludovic Courtès
  2013-01-23 15:33                                                             ` Ludovic Courtès
  1 sibling, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-23  5:01 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> I'll try to build statically-linked Bash.

Could anyone advise on this?  Which flags and options should be used?

The ones from the corresponding recipe look a bit complex for me.  I
tried this instead:

# ./configure --enable-readline --enable-static-link
# make

[...]

execute_cmd.c: In function 'execute_in_subshell':
execute_cmd.c:1507:5: warning: passing argument 1 of 'execute_command_internal' discards 'volatile' qualifier from pointer target type [enabled by default]
execute_cmd.c:522:1: note: expected 'struct COMMAND *' but argument is of type 'volatile struct COMMAND *'
execute_cmd.c: In function 'execute_function':
execute_cmd.c:4243:3: warning: passing argument 1 of 'array_rshift' discards 'volatile' qualifier from pointer target type [enabled by default]
In file included from variables.h:25:0,
                 from shell.h:31,
                 from execute_cmd.c:66:
array.h:56:12: note: expected 'struct ARRAY *' but argument is of type 'volatile struct ARRAY *'
execute_cmd.c:4245:3: warning: passing argument 1 of 'array_rshift' discards 'volatile' qualifier from pointer target type [enabled by default]
In file included from variables.h:25:0,
                 from shell.h:31,
                 from execute_cmd.c:66:
array.h:56:12: note: expected 'struct ARRAY *' but argument is of type 'volatile struct ARRAY *'
execute_cmd.c:4320:3: warning: passing argument 1 of 'array_shift' discards 'volatile' qualifier from pointer target type [enabled by default]
In file included from variables.h:25:0,
                 from shell.h:31,
                 from execute_cmd.c:66:
array.h:55:23: note: expected 'struct ARRAY *' but argument is of type 'volatile struct ARRAY *'
execute_cmd.c:4321:3: warning: passing argument 1 of 'array_shift' discards 'volatile' qualifier from pointer target type [enabled by default]
In file included from variables.h:25:0,
                 from shell.h:31,
                 from execute_cmd.c:66:
array.h:55:23: note: expected 'struct ARRAY *' but argument is of type 'volatile struct ARRAY *'

[...]

expr.c:207:17: warning: conflicting types for built-in function 'exp2' [enabled by default]

[...]

bashline.o: In function `bash_groupname_completion_function':
/home/bash/bash-4.2/bashline.c:2139: warning: Using 'getgrent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/bash/bash-4.2/bashline.c:2136: warning: Using 'setgrent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/bash/bash-4.2/bashline.c:2147: warning: Using 'endgrent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
./lib/readline/libreadline.a(complete.o): In function `rl_username_completion_function':
/home/bash/bash-4.2/lib/readline/complete.c:2045: warning: Using 'getpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
./lib/readline/libreadline.a(tilde.o): In function `tilde_expand_word':
/home/bash/bash-4.2/lib/readline/./tilde.c:374: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
shell.o: In function `get_current_user_info':
/home/bash/bash-4.2/shell.c:1641: warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
./lib/readline/libreadline.a(complete.o): In function `rl_username_completion_function':
/home/bash/bash-4.2/lib/readline/complete.c:2041: warning: Using 'setpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
shell.o: In function `get_current_user_info':
/home/bash/bash-4.2/shell.c:1657: warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
./lib/sh/libsh.a(netopen.o): In function `netopen':
/home/bash/bash-4.2/lib/sh/netopen.c:304: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
bashline.o: In function `bash_servicename_completion_function':
/home/bash/bash-4.2/bashline.c:2083: warning: Using 'getservent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/bash/bash-4.2/bashline.c:2080: warning: Using 'setservent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/bash/bash-4.2/bashline.c:2105: warning: Using 'endservent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/nix/store/zcfiac107h1nji9sdiv2m1dzpvvagrh5-glibc-2.13/lib/../lib/libc.a(malloc.o): In function `__libc_free':
(.text+0x6380): multiple definition of `free'
./lib/malloc/libmalloc.a(malloc.o):/home/bash/bash-4.2/lib/malloc/malloc.c:1269: first defined here
/nix/store/zcfiac107h1nji9sdiv2m1dzpvvagrh5-glibc-2.13/lib/../lib/libc.a(malloc.o): In function `__libc_malloc':
(.text+0x5c48): multiple definition of `malloc'
./lib/malloc/libmalloc.a(malloc.o):/home/bash/bash-4.2/lib/malloc/malloc.c:1254: first defined here
/nix/store/zcfiac107h1nji9sdiv2m1dzpvvagrh5-glibc-2.13/lib/../lib/libc.a(malloc.o): In function `__libc_realloc':
(.text+0x6500): multiple definition of `realloc'
./lib/malloc/libmalloc.a(malloc.o):/home/bash/bash-4.2/lib/malloc/malloc.c:1262: first defined here
collect2: error: ld returned 1 exit status
make: *** [bash] Error 1

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-22 22:51                                                           ` Nikita Karetnikov
  2013-01-23  5:01                                                             ` Nikita Karetnikov
@ 2013-01-23 15:33                                                             ` Ludovic Courtès
  1 sibling, 0 replies; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-23 15:33 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Hi,

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> Wild guess: you’re building outside of a chroot, and Perl’s configure
>> found /usr/lib/libgdbm.so, so it decided to link against it, which
>> didn’t work because our linker doesn’t look for libraries there.
>
>> Can you confirm?
>
>> Solution: add “build-use-chroot = true” in nix.conf.
>
> Everything I tried failed.
>
> First attempt:
>
> # cat /usr/local/etc/nix/nix.conf
> build-users-group = nixbld
> build-use-chroot = true
>
> # ./pre-inst-env guix-build -K                \
>       -e '(@ (gnu packages make-bootstrap) %bootstrap-tarballs)'  \
>       --system=mips64el-linux
>
> [...]
>
> @ build-started /nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv /nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1 mips64el-linux /nix/var/log/nix/drvs/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv.bz2
> build error: mounting /proc: No such file or directory

This is weird.  Is it nix-daemon?  Which version?

> Second:
>
> # cat /usr/local/etc/nix/nix.conf
> build-users-group = nixbld
> build-use-chroot = true
> build-chroot-dirs = /dev /proc
>
> @ build-started /nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv /nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1 mips64el-linux /nix/var/log/nix/drvs/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv.bz2
> building /nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1
> unpacking sources
> unpacking source archive /nix/store/ics0cri221a5lnym4a92xsyv02qis003-patch-2.6.1.tar.gz
> source root is patch-2.6.1
> patching sources
> configuring
> configure flags: --prefix=/nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1  
> /nix/store/71xcmhyizrp7n0xl596waid5fijckchm-stdenv-linux-boot/setup: ./configure: /bin/sh: bad interpreter: No such file or directory

As you’ve surely guessed ;-), the chroot lacks /bin/sh, hence the error.
Here, you’re building Patch from Nixpkgs, and Nixpkgs requires /bin/sh.

Now, I thought you had successfully built Nixpkgs’s stdenv, and had even
started building Perl from Guix, no?  In that case, I don’t see why
Nixpkgs’s Patch is being rebuilt here.

> Third:
>
> # cat /usr/local/etc/nix/nix.conf
> build-users-group = nixbld
> build-use-chroot = true
> build-chroot-dirs = /dev /proc /bin
>
> @ build-started /nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv /nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1 mips64el-linux /nix/var/log/nix/drvs/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv.bz2
> building /nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1
> unpacking sources
> unpacking source archive /nix/store/ics0cri221a5lnym4a92xsyv02qis003-patch-2.6.1.tar.gz
> source root is patch-2.6.1
> patching sources
> configuring
> configure flags: --prefix=/nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1  
> /nix/store/71xcmhyizrp7n0xl596waid5fijckchm-stdenv-linux-boot/setup: ./configure: /bin/sh: bad interpreter: No such file or directory

Here /bin/sh is dynamically linked, hence the failure.

> I'll try to build statically-linked Bash.  Then I'll place it in
> '/bin/sh' and try again.  (This worked on i686.)

OK.

Ludo’.

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

* Re: Porting to mips64el
  2013-01-23  5:01                                                             ` Nikita Karetnikov
@ 2013-01-23 15:35                                                               ` Ludovic Courtès
  2013-01-23 22:08                                                                 ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-23 15:35 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> I'll try to build statically-linked Bash.
>
> Could anyone advise on this?  Which flags and options should be used?
>
> The ones from the corresponding recipe look a bit complex for me.  I
> tried this instead:
>
> # ./configure --enable-readline --enable-static-link
> # make

[...]

> /nix/store/zcfiac107h1nji9sdiv2m1dzpvvagrh5-glibc-2.13/lib/../lib/libc.a(malloc.o): In function `__libc_free':
> (.text+0x6380): multiple definition of `free'

You also need ‘--without-bash-malloc’ (see ‘bash-light’ in bash.scm).

HTH,
Ludo’.

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

* Re: Porting to mips64el
  2013-01-23 15:35                                                               ` Ludovic Courtès
@ 2013-01-23 22:08                                                                 ` Nikita Karetnikov
  2013-01-24 15:56                                                                   ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-23 22:08 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> You also need ‘--without-bash-malloc’ (see ‘bash-light’ in bash.scm).

# ./configure --enable-static-link \
              --without-bash-malloc \
              --disable-readline \
              --disable-history \
              --disable-help-builtin \
              --disable-progcomp \
              --disable-net-redirections \
              --disable-nls

# make

[...]

./lib/tilde/libtilde.a(tilde.o): In function `tilde_expand_word':
/home/bash/bash-4.2/lib/tilde/tilde.c:374: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
shell.o: In function `get_current_user_info':
/home/bash/bash-4.2/shell.c:1641: warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/bash/bash-4.2/shell.c:1657: warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
./lib/sh/libsh.a(shmatch.o): In function `sh_regmatch':
/home/bash/bash-4.2/lib/sh/shmatch.c:111: undefined reference to `sh_xfree'
/home/bash/bash-4.2/lib/sh/shmatch.c:111: undefined reference to `sh_xfree'
/home/bash/bash-4.2/lib/sh/shmatch.c:112: undefined reference to `sh_xfree'
/home/bash/bash-4.2/lib/sh/shmatch.c:112: undefined reference to `sh_xfree'
./lib/sh/libsh.a(winsize.o): In function `get_new_window_size':
/home/bash/bash-4.2/lib/sh/winsize.c:88: undefined reference to `rl_set_screen_size'
/home/bash/bash-4.2/lib/sh/winsize.c:88: undefined reference to `rl_set_screen_size'
collect2: error: ld returned 1 exit status
make: *** [bash] Error 1

Should I remove '--enable-static-link'?

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-23 22:08                                                                 ` Nikita Karetnikov
@ 2013-01-24 15:56                                                                   ` Ludovic Courtès
  2013-01-26  4:33                                                                     ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-24 15:56 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> You also need ‘--without-bash-malloc’ (see ‘bash-light’ in bash.scm).

Note that ‘%bash-static’ in make-bootstrap.scm is:

  (define %bash-static
    (static-package bash-light))

and ‘static-package’, from gnu.scm, adds this:

  "--disable-shared" "LDFLAGS=-static"

Does it help?

Ludo’.

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

* Re: Porting to mips64el
  2013-01-24 15:56                                                                   ` Ludovic Courtès
@ 2013-01-26  4:33                                                                     ` Nikita Karetnikov
  2013-01-26 21:37                                                                       ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-26  4:33 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

>  "--disable-shared" "LDFLAGS=-static"

Bash doesn't have '--disable-shared'.  I used these commands:

# export LDFLAGS=-static
# ./configure --without-bash-malloc \
              --disable-readline \
              --disable-history \
              --disable-help-builtin \
              --disable-progcomp \
              --disable-net-redirections \
              --disable-nls

There were some errors during 'make':

./builtins/libbuiltins.a(enable.o): In function `dyn_load_builtin':
/home/bash/bash-4.2/builtins/./enable.def:307: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
./lib/tilde/libtilde.a(tilde.o): In function `tilde_expand_word':
/home/bash/bash-4.2/lib/tilde/tilde.c:374: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
shell.o: In function `get_current_user_info':
/home/bash/bash-4.2/shell.c:1641: warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/bash/bash-4.2/shell.c:1657: warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

I installed Bash and replaced '/bin/sh'.

Then I adjusted '/usr/local/etc/nix/nix.conf':

build-users-group = nixbld
build-use-chroot = true
build-chroot-dirs = /dev /proc /bin

And ran the following command:

# ./pre-inst-env guix-build -K                \
      -e '(@ (gnu packages make-bootstrap) %bootstrap-tarballs)'  \
      --system=mips64el-linux

Unfortunately, it failed:

starting phase `build'
`ARCH' set to `mips64el'
Makefile:484: /tmp/nix-build-xww122kbc08qcyaika8pf03x273rvph7-linux-libre-headers-3.3.8.drv-0/linux-3.3.8/arch/mips64el/Makefile: No such file or directory
make: *** No rule to make target `/tmp/nix-build-xww122kbc08qcyaika8pf03x273rvph7-linux-libre-headers-3.3.8.drv-0/linux-3.3.8/arch/mips64el/Makefile'.  Stop.
phase `build' failed after 1 seconds
builder for `/nix/store/xww122kbc08qcyaika8pf03x273rvph7-linux-libre-headers-3.3.8.drv' failed; keeping build directory `/tmp/nix-build-xww122kbc08qcyaika8pf03x273rvph7-linux-libre-headers-3.3.8.drv-0'
builder for `/nix/store/xww122kbc08qcyaika8pf03x273rvph7-linux-libre-headers-3.3.8.drv' failed with exit code 1
@ build-failed /nix/store/xww122kbc08qcyaika8pf03x273rvph7-linux-libre-headers-3.3.8.drv /nix/store/nxi3p21h7vgkra3dbbisafph0dimzsva-linux-libre-headers-3.3.8 1 builder for `/nix/store/xww122kbc08qcyaika8pf03x273rvph7-linux-libre-headers-3.3.8.drv' failed with exit code 1
cannot build derivation `/nix/store/qsivfcrjlnsxrn5vs4xv3zsh4djbl9li-bootstrap-tarballs-0.drv': 1 dependencies couldn't be built
error: build failed: build of `/nix/store/qsivfcrjlnsxrn5vs4xv3zsh4djbl9li-bootstrap-tarballs-0.drv' failed

I guess that I should adjust the recipe like this:

(setenv "ARCH"
		(cond ((string=? arch "i686")     "i386")
			  ((string=? arch "mips64el") "mips")
			  (else arch)))

(There is 'linux-3.3.8/arch/mips/Makefile'.)

Will this work?

By the way, my local repo is a bit outdated.  Should I update it?

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-26  4:33                                                                     ` Nikita Karetnikov
@ 2013-01-26 21:37                                                                       ` Ludovic Courtès
  2013-01-27  5:47                                                                         ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-26 21:37 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

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

Hi,

Nikita Karetnikov <nikita@karetnikov.org> skribis:

> starting phase `build'
> `ARCH' set to `mips64el'
> Makefile:484: /tmp/nix-build-xww122kbc08qcyaika8pf03x273rvph7-linux-libre-headers-3.3.8.drv-0/linux-3.3.8/arch/mips64el/Makefile: No such file or directory

This is because Linux calls this “mips”, not “mips64el”.

The attached patch should solve it, while avoiding a rebuild on other
architectures:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2104 bytes --]

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index de6d53a..aad345a 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -29,20 +29,31 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix build-system gnu))
+  #:use-module (guix build-system gnu)
+  #:use-module ((guix utils) #:select (%current-system)))
 
 (define-public linux-libre-headers
   (let* ((version* "3.3.8")
          (build-phase
-          '(lambda* (#:key system #:allow-other-keys)
+          (lambda ()
+            `(lambda* (#:key system #:allow-other-keys)
                (let ((arch (car (string-split system #\-))))
                  (setenv "ARCH"
                          (cond ((string=? arch "i686") "i386")
+
+                               ;; FIXME: The unquote below is just to
+                               ;; avoid triggering a rebuild.  Remove me
+                               ;; on the next core-updates.
+                               ,@(if (string-prefix? "mips"
+                                                     (%current-system))
+                                     `(((string-prefix? arch "mips")
+                                        "mips"))
+                                     '())
                                (else arch)))
                  (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
 
                (and (zero? (system* "make" "defconfig"))
-                  (zero? (system* "make" "mrproper" "headers_check")))))
+                    (zero? (system* "make" "mrproper" "headers_check"))))))
          (install-phase
           `(lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
@@ -73,7 +84,7 @@
                   (guix build utils)
                   (srfi srfi-1))
        #:phases (alist-replace
-                 'build ,build-phase
+                 'build ,(build-phase)
                  (alist-replace
                   'install ,install-phase
                   (alist-delete 'configure %standard-phases)))

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


Can you confirm?

Thanks,
Ludo’.

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

* Re: Porting to mips64el
  2013-01-26 21:37                                                                       ` Ludovic Courtès
@ 2013-01-27  5:47                                                                         ` Nikita Karetnikov
  2013-01-27 21:15                                                                           ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-27  5:47 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> The attached patch should solve it, while avoiding a rebuild on other
> architectures:

I applied the patch, then ran 'make', but it failed with the same error.

By the way, I've been told that 3.5 and 3.6 versions (not sure about the
latest) of the kernel are broken.  Does it affect the headers too?
Should I try to build an older version of headers?

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-27  5:47                                                                         ` Nikita Karetnikov
@ 2013-01-27 21:15                                                                           ` Ludovic Courtès
  2013-01-28  5:51                                                                             ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-27 21:15 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> The attached patch should solve it, while avoiding a rebuild on other
>> architectures:
>
> I applied the patch, then ran 'make', but it failed with the same error.

Can you confirm that the log contains this line (literally):

  `ARCH' set to `mips'

Can you please post the line with “starting phase `build'” and the next
few lines?

> By the way, I've been told that 3.5 and 3.6 versions (not sure about the
> latest) of the kernel are broken.  Does it affect the headers too?

IIRC correctly it’s a but in the ext4 or VFS implementation, so the
headers definitely don’t matter.

Ludo’.

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

* Re: Porting to mips64el
  2013-01-27 21:15                                                                           ` Ludovic Courtès
@ 2013-01-28  5:51                                                                             ` Nikita Karetnikov
  2013-01-28 12:59                                                                               ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-28  5:51 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix


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

> Can you confirm that the log contains this line (literally):

>   `ARCH' set to `mips'

> Can you please post the line with “starting phase `build'” and the next
> few lines?

# ./pre-inst-env guix-build -K \
       -e '(@ (gnu packages make-bootstrap) %bootstrap-tarballs)' \
       --system=mips64el-linux

[...]

`ARCH' set to `mips64el'
Makefile:484: /tmp/nix-build-wka9dcpcj675k1v9ajvwplgj7398w3lf-linux-libre-headers-3.3.8.drv-2/linux-3.3.8/arch/mips64el/Makefile: No such file or directory
make: *** No rule to make target `/tmp/nix-build-wka9dcpcj675k1v9ajvwplgj7398w3lf-linux-libre-headers-3.3.8.drv-2/linux-3.3.8/arch/mips64el/Makefile'.  Stop.
phase `build' failed after 2 seconds
builder for `/nix/store/wka9dcpcj675k1v9ajvwplgj7398w3lf-linux-libre-headers-3.3.8.drv' failed; keeping build directory `/tmp/nix-build-wka9dcpcj675k1v9ajvwplgj7398w3lf-linux-libre-headers-3.3.8.drv-2'
builder for `/nix/store/wka9dcpcj675k1v9ajvwplgj7398w3lf-linux-libre-headers-3.3.8.drv' failed with exit code 1
@ build-failed /nix/store/wka9dcpcj675k1v9ajvwplgj7398w3lf-linux-libre-headers-3.3.8.drv /nix/store/3g9i41njf29pbhpf7cy4c7dhdn3qc2b4-linux-libre-headers-3.3.8 1 builder for `/nix/store/wka9dcpcj675k1v9ajvwplgj7398w3lf-linux-libre-headers-3.3.8.drv' failed with exit code 1
cannot build derivation `/nix/store/3956dgn5s315f2nkxw2mfab4vdk7bqr9-bootstrap-tarballs-0.drv': 1 dependencies couldn't be built
error: build failed: build of `/nix/store/3956dgn5s315f2nkxw2mfab4vdk7bqr9-bootstrap-tarballs-0.drv' failed

I've also attached 'linux.scm'.

Nikita


[-- Attachment #1.2: linux.scm --]
[-- Type: text/plain, Size: 11003 bytes --]

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages linux)
  #:use-module (guix licenses)
  #:use-module (gnu packages)
  #:use-module ((gnu packages compression)
                #:renamer (symbol-prefix-proc 'guix:))
  #:use-module (gnu packages flex)
  #:use-module (gnu packages libusb)
  #:use-module (gnu packages ncurses)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages pkg-config)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #:use-module ((guix utils) #:select (%current-system)))

(define-public linux-libre-headers
  (let* ((version* "3.3.8")
         (build-phase
          (lambda ()
            `(lambda* (#:key system #:allow-other-keys)
               (let ((arch (car (string-split system #\-))))
                 (setenv "ARCH"
                         (cond ((string=? arch "i686") "i386")

                               ;; FIXME: The unquote below is just to
                               ;; avoid triggering a rebuild.  Remove me
                               ;; on the next core-updates.
                               ,@(if (string-prefix? "mips"
                                                     (%current-system))
                                     `(((string-prefix? arch "mips")
                                        "mips"))
                                     '())
                               (else arch)))
                 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))

               (and (zero? (system* "make" "defconfig"))
                    (zero? (system* "make" "mrproper" "headers_check"))))))
         (install-phase
          `(lambda* (#:key outputs #:allow-other-keys)
             (let ((out (assoc-ref outputs "out")))
               (and (zero? (system* "make"
                                    (string-append "INSTALL_HDR_PATH=" out)
                                    "headers_install"))
                    (mkdir (string-append out "/include/config"))
                    (call-with-output-file
                        (string-append out
                                       "/include/config/kernel.release")
                      (lambda (p)
                        (format p "~a-default~%" ,version*))))))))
   (package
    (name "linux-libre-headers")
    (version version*)
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "http://linux-libre.fsfla.org/pub/linux-libre/releases/3.3.8-gnu/linux-libre-"
                   version "-gnu.tar.xz"))
             (sha256
              (base32
               "0jkfh0z1s6izvdnc3njm39dhzp1cg8i06jv06izwqz9w9qsprvnl"))))
    (build-system gnu-build-system)
    (native-inputs `(("perl" ,perl)))
    (arguments
     `(#:modules ((guix build gnu-build-system)
                  (guix build utils)
                  (srfi srfi-1))
       #:phases (alist-replace
                 'build ,(build-phase)
                 (alist-replace
                  'install ,install-phase
                  (alist-delete 'configure %standard-phases)))
       #:tests? #f))
    (synopsis "GNU Linux-Libre kernel headers")
    (description "Headers of the Linux-Libre kernel.")
    (license "GPLv2")
    (home-page "http://www.gnu.org/software/linux-libre/"))))

(define-public linux-pam
  (package
    (name "linux-pam")
    (version "1.1.6")
    (source
     (origin
      (method url-fetch)
      (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
                                version ".tar.bz2")
                 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
                                version ".tar.bz2")))
      (sha256
       (base32
        "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s"))))
    (build-system gnu-build-system)
    (inputs
     `(("flex" ,flex)

       ;; TODO: optional dependencies
       ;; ("libxcrypt" ,libxcrypt)
       ;; ("cracklib" ,cracklib)
       ))
    (arguments
     ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
     ;; isn't available.
     '(#:tests? #f))
    (home-page "http://www.linux-pam.org/")
    (synopsis "Pluggable authentication modules for Linux")
    (description
     "A *Free* project to implement OSF's RFC 86.0.
Pluggable authentication modules are small shared object files that can
be used through the PAM API to perform tasks, like authenticating a user
at login.  Local and dynamic reconfiguration are its key features")
    (license bsd-3)))

(define-public psmisc
  (package
    (name "psmisc")
    (version "22.20")
    (source
     (origin
      (method url-fetch)
      (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
                          version ".tar.gz"))
      (sha256
       (base32
        "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
    (build-system gnu-build-system)
    (inputs `(("ncurses" ,ncurses)))
    (home-page "http://psmisc.sourceforge.net/")
    (synopsis
     "set of utilities that use the proc filesystem, such as fuser, killall, and pstree")
    (description
     "This PSmisc package is a set of some small useful utilities that
use the proc filesystem. We're not about changing the world, but
providing the system administrator with some help in common tasks.")
    (license gpl2+)))

(define-public util-linux
  (package
    (name "util-linux")
    (version "2.21")
    (source
     (origin
      (method url-fetch)
      (uri (string-append "mirror://kernel.org/linux/utils/"
                          name "/v" version "/"
                          name "-" version ".2" ".tar.xz"))
      (sha256
       (base32
        "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir"))))
    (build-system gnu-build-system)
    (arguments
     `(#:configure-flags '("--disable-use-tty-group")
       #:phases (alist-cons-after
                 'install 'patch-chkdupexe
                 (lambda* (#:key outputs #:allow-other-keys)
                   (let ((out (assoc-ref outputs "out")))
                     (substitute* (string-append out "/bin/chkdupexe")
                       ;; Allow 'patch-shebang' to do its work.
                       (("@PERL@") "/bin/perl"))))
                 %standard-phases)))
    (inputs `(("zlib" ,guix:zlib)
              ("ncurses" ,ncurses)
              ("perl" ,perl)))
    (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
    (synopsis
     "util-linux is a random collection of utilities for the Linux kernel")
    (description
     "util-linux is a random collection of utilities for the Linux kernel.")

    ;; Note that util-linux doesn't use the same license for all the
    ;; code.  GPLv2+ is the default license for a code without an
    ;; explicitly defined license.
    (license (list gpl3+ gpl2+ gpl2 lgpl2.0+
                   bsd-4 public-domain))))

(define-public procps
  (package
    (name "procps")
    (version "3.2.8")
    (source (origin
             (method url-fetch)
             (uri (string-append "http://procps.sourceforge.net/procps-"
                                 version ".tar.gz"))
             (sha256
              (base32
               "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i"))))
    (build-system gnu-build-system)
    (inputs `(("ncurses" ,ncurses)
              ("patch/make-3.82" ,(search-patch "procps-make-3.82.patch"))))
    (arguments
     '(#:patches (list (assoc-ref %build-inputs "patch/make-3.82"))
       #:phases (alist-replace
                 'configure
                 (lambda* (#:key outputs #:allow-other-keys)
                   ;; No `configure', just a single Makefile.
                   (let ((out (assoc-ref outputs "out")))
                     (substitute* "Makefile"
                       (("/usr/") "/")
                       (("--(owner|group) 0") "")
                       (("ldconfig") "true")
                       (("^LDFLAGS[[:blank:]]*:=(.*)$" _ value)
                        ;; Add libproc to the RPATH.
                        (string-append "LDFLAGS := -Wl,-rpath="
                                       out "/lib" value))))
                   (setenv "CC" "gcc"))
                 (alist-replace
                  'install
                  (lambda* (#:key outputs #:allow-other-keys)
                    (let ((out (assoc-ref outputs "out")))
                      (and (zero?
                            (system* "make" "install"
                                     (string-append "DESTDIR=" out)))

                           ;; Sanity check.
                           (zero?
                            (system* (string-append out "/bin/ps")
                                     "--version")))))
                  %standard-phases))

       ;; What did you expect?  Tests?
       #:tests? #f))
    (home-page "http://procps.sourceforge.net/")
    (synopsis
     "Utilities that give information about processes using the /proc filesystem")
    (description
     "procps is the package that has a bunch of small useful utilities
that give information about processes using the Linux /proc file system.
The package includes the programs ps, top, vmstat, w, kill, free,
slabtop, and skill.")
    (license gpl2)))

(define-public usbutils
  (package
    (name "usbutils")
    (version "006")
    (source
     (origin
      (method url-fetch)
      (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
                          "usbutils-" version ".tar.xz"))
      (sha256
       (base32
        "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
    (build-system gnu-build-system)
    (inputs
     `(("libusb" ,libusb) ("pkg-config" ,pkg-config)))
    (home-page "http://www.linux-usb.org/")
    (synopsis
     "Tools for working with USB devices, such as lsusb")
    (description
     "Tools for working with USB devices, such as lsusb.")
    (license gpl2+)))

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-28  5:51                                                                             ` Nikita Karetnikov
@ 2013-01-28 12:59                                                                               ` Ludovic Courtès
  2013-01-29 17:57                                                                                 ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-28 12:59 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>                                ,@(if (string-prefix? "mips"
>                                                      (%current-system))
>                                      `(((string-prefix? arch "mips")
>                                         "mips"))

Oops, there was a typo here: in the second ‘string-prefix?’ call, “mips”
should be the *first* argument.

Can you change that and try again?

TIA,
Ludo’.

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

* Re: Porting to mips64el
  2013-01-28 12:59                                                                               ` Ludovic Courtès
@ 2013-01-29 17:57                                                                                 ` Nikita Karetnikov
  2013-01-29 21:00                                                                                   ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-29 17:57 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> Can you change that and try again?

It worked, but there is a new error:

[...]

starting phase `build'
rm -f mksyntax
make: /nix/store/qn9m4cjncna9mcac98fynialsv2l28jm-glibc-intermediate-2.17/bin/sh: Command not found
make: *** [mksyntax] Error 127
phase `build' failed after 0 seconds
builder for `/nix/store/78lm5y1bpich4k48gjh0v428g7bb051y-bash-light-4.2.drv' failed; keeping build directory `/tmp/nix-build-78lm5y1bpich4k48gjh0v428g7bb051y-bash-light-4.2.drv-1'
builder for `/nix/store/78lm5y1bpich4k48gjh0v428g7bb051y-bash-light-4.2.drv' failed with exit code 1
@ build-failed /nix/store/78lm5y1bpich4k48gjh0v428g7bb051y-bash-light-4.2.drv /nix/store/sdfy06myv9hkvwxg2jndbp1zrf4mfkkr-bash-light-4.2 1 builder for `/nix/store/78lm5y1bpich4k48gjh0v428g7bb051y-bash-light-4.2.drv' failed with exit code 1
cannot build derivation `/nix/store/m53fn7j9pxki4czl5zzn1nmq3bnd0272-glibc-2.17.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/8gnjpp20l93yfg261gxncbzhqkqg3c8p-glibc-2.17.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/5mzr8vw2sq075mwc1vny3xscr6ynij96-libgc-7.2alpha6.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/pqnzl91rpwhbr4vh7mylx62pl0jbkhkb-bootstrap-tarballs-0.drv': 1 dependencies couldn't be built
error: build failed: build of `/nix/store/pqnzl91rpwhbr4vh7mylx62pl0jbkhkb-bootstrap-tarballs-0.drv' failed

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-29 17:57                                                                                 ` Nikita Karetnikov
@ 2013-01-29 21:00                                                                                   ` Ludovic Courtès
  2013-01-29 21:59                                                                                     ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-29 21:00 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

> starting phase `build'
> rm -f mksyntax
> make: /nix/store/qn9m4cjncna9mcac98fynialsv2l28jm-glibc-intermediate-2.17/bin/sh: Command not found
> make: *** [mksyntax] Error 127

The obvious thing to do here is to check whether that binary works
correctly.  It’s supposed to be the statically-linked bootstrap Bash,
see base.scm.

Oh, but in your case you used a dynamically-linked binary in
‘%bootstrap-inputs’.

This is tricky.  You could try to restart the daemon with /bin and
anything else needed added to the chroot, and keep building from there,
hoping that there won’t be impurities again.

HTH,
Ludo’.

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

* Re: Porting to mips64el
  2013-01-29 21:00                                                                                   ` Ludovic Courtès
@ 2013-01-29 21:59                                                                                     ` Nikita Karetnikov
  2013-01-29 22:02                                                                                       ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-29 21:59 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> The obvious thing to do here is to check whether that binary works
> correctly.  It’s supposed to be the statically-linked bootstrap Bash,
> see base.scm.

The files are there.  But if I try
'/nix/store/qn*-glibc-intermediate-2.17/bin/sh --help', I'll get 'No
such file or directory'.

> This is tricky.  You could try to restart the daemon with /bin and
> anything else needed added to the chroot, and keep building from there,
> hoping that there won’t be impurities again.

Well, there are '/dev', '/proc', and '/bin'.  Is it necessary to add
something else?

(I tried again and got the same error.)

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-29 21:59                                                                                     ` Nikita Karetnikov
@ 2013-01-29 22:02                                                                                       ` Ludovic Courtès
  2013-01-29 23:29                                                                                         ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-29 22:02 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> The obvious thing to do here is to check whether that binary works
>> correctly.  It’s supposed to be the statically-linked bootstrap Bash,
>> see base.scm.
>
> The files are there.  But if I try
> '/nix/store/qn*-glibc-intermediate-2.17/bin/sh --help', I'll get 'No
> such file or directory'.

Check “strings /nix/store/qn*-glibc-intermediate-2.17/bin/sh | grep ld-linux”.
Most likely that points to a loader that doesn’t exist.

Ludo’.

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

* Re: Porting to mips64el
  2013-01-29 22:02                                                                                       ` Ludovic Courtès
@ 2013-01-29 23:29                                                                                         ` Nikita Karetnikov
  2013-01-30 20:58                                                                                           ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-29 23:29 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> Check “strings /nix/store/qn*-glibc-intermediate-2.17/bin/sh | grep ld-linux”.
> Most likely that points to a loader that doesn’t exist.

It didn't output anything.

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-29 23:29                                                                                         ` Nikita Karetnikov
@ 2013-01-30 20:58                                                                                           ` Ludovic Courtès
  2013-01-30 23:03                                                                                             ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-30 20:58 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> Check “strings /nix/store/qn*-glibc-intermediate-2.17/bin/sh | grep ld-linux”.
>> Most likely that points to a loader that doesn’t exist.
>
> It didn't output anything.

Maybe ld.so instead of ld-linux?

(Remember to add that to ‘glibc-dynamic-linker’ eventually.)

Ludo’.

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

* Re: Porting to mips64el
  2013-01-30 20:58                                                                                           ` Ludovic Courtès
@ 2013-01-30 23:03                                                                                             ` Nikita Karetnikov
  2013-01-31 12:50                                                                                               ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-30 23:03 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> Maybe ld.so instead of ld-linux?

You're right:

# strings /nix/store/qn9m4cjncna9mcac98fynialsv2l28jm-glibc-intermediate-2.17/bin/sh | grep ld.so
/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-2.13/lib/ld.so.1

How can I fix this?

> (Remember to add that to ‘glibc-dynamic-linker’ eventually.)

Yes, I've already adjusted 'bootstrap.scm':

(define (glibc-dynamic-linker system)
  "Return the name of Glibc's dynamic linker for SYSTEM."
  (cond ((string=? system "x86_64-linux") "/lib/ld-linux-x86-64.so.2")
        ((string=? system "i686-linux") "/lib/ld-linux.so.2")
        ((string=? system "mips64el-linux") "/lib/ld.so.1")
        (else (error "dynamic linker name not known for this system"
                     system))))

Nikita

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-30 23:03                                                                                             ` Nikita Karetnikov
@ 2013-01-31 12:50                                                                                               ` Ludovic Courtès
  2013-01-31 19:32                                                                                                 ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-31 12:50 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

> # strings /nix/store/qn9m4cjncna9mcac98fynialsv2l28jm-glibc-intermediate-2.17/bin/sh | grep ld.so
> /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-2.13/lib/ld.so.1
>
> How can I fix this?

You should actually build a statically-linked Bash, and edit
%bootstrap-inputs to use that instead of Nixpkgs’s dynamically-linked
Bash.

That is, you’d have something along these lines:

  (define %bootstrap-inputs
    (compile-time-value
     `(("libc" ,(nixpkgs-derivation "glibc" "i686-linux"))
       ("bash" "/foo")
       ,@(map (lambda (name)
                (list name (nixpkgs-derivation name "i686-linux")))
              '("gnutar" "gzip" "bzip2" "xz" "patch"
                "coreutils" "gnused" "gnugrep"   ; no “bash” here!
                "gawk"                                ; used by `config.status'
                "gcc" "binutils")))))

where /foo is a directory containing just bin/bash.

>> (Remember to add that to ‘glibc-dynamic-linker’ eventually.)
>
> Yes, I've already adjusted 'bootstrap.scm':

Perfect.

HTH,
Ludo’.

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

* Re: Porting to mips64el
  2013-01-31 12:50                                                                                               ` Ludovic Courtès
@ 2013-01-31 19:32                                                                                                 ` Nikita Karetnikov
  2013-01-31 22:08                                                                                                   ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-01-31 19:32 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> You should actually build a statically-linked Bash, and edit
> %bootstrap-inputs to use that instead of Nixpkgs’s dynamically-linked
> Bash.

Here's what I did:

(define %bootstrap-inputs
  `(("libc" ,(nixpkgs-derivation "glibc" "mips64el-linux"))
    ("bash" "/bin/sh")
    ,@(map (lambda (name)
             (list name (nixpkgs-derivation name "mips64el-linux")))
           '("gnutar" "gzip" "bzip2" "xz" "patch"
             "coreutils" "gnused" "gnugrep"
             "gawk"                                ; used by `config.status'
             "gcc" "binutils"))))

(I used the same [1] '/bin/sh'.  Should I build another one using
different flags?)

Build failed:

(Why was it trying to use the one from the store?)

starting phase `configure'
source directory: "/tmp/nix-build-f60xp1qw77kkyg9pmxx7wz6pp8ndy396-make-boot0-3.82.drv-0/make-3.82" (relative from build: ".")
build directory: "/tmp/nix-build-f60xp1qw77kkyg9pmxx7wz6pp8ndy396-make-boot0-3.82.drv-0/make-3.82"
configure flags: ("CONFIG_SHELL=/nix/store/n6nrnh7lm39qk2v9b3ij6420nlqznhi5-sh/bin/bash" "SHELL=/nix/store/n6nrnh7lm39qk2v9b3ij6420nlqznhi5-sh/bin/bash" "--prefix=/nix/store/kw0g24rxmvxzyysx8sv5v56322n3vnym-make-boot0-3.82" "--enable-fast-install")
Backtrace:
In ice-9/boot-9.scm:
 157: 13 [catch #t #<catch-closure 101c8540> ...]
In unknown file:
   ?: 12 [apply-smob/1 #<catch-closure 101c8540>]
In ice-9/boot-9.scm:
  63: 11 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 414: 10 [eval # #]
In ice-9/boot-9.scm:
2131: 9 [save-module-excursion #<procedure 1018f180 at ice-9/boot-9.scm:3660:3 ()>]
3665: 8 [#<procedure 1018f180 at ice-9/boot-9.scm:3660:3 ()>]
1456: 7 [%start-stack load-stack ...]
1461: 6 [#<procedure 101e1678 ()>]
In unknown file:
   ?: 5 [primitive-load "/nix/store/a9kjzd71ipfzcd9f536p62p7gf2bpfhd-make-boot0-3.82-guile-builder"]
In ice-9/eval.scm:
 375: 4 [eval # ()]
In srfi/srfi-1.scm:
 830: 3 [every1 #<procedure 103cbba0 at /nix/store/sghsw1gqw9vb89py0h0nh4vjbarz3caa-module-import/guix/build/gnu-build-system.scm:297:9 (expr)> ...]
In /nix/store/sghsw1gqw9vb89py0h0nh4vjbarz3caa-module-import/guix/build/gnu-build-system.scm:
 301: 2 [#<procedure 103cbba0 at /nix/store/sghsw1gqw9vb89py0h0nh4vjbarz3caa-module-import/guix/build/gnu-build-system.scm:297:9 (expr)> #]
 183: 1 [configure #:inputs (# # # # ...) #:outputs ...]
In unknown file:
   ?: 0 [system* "/nix/store/n6nrnh7lm39qk2v9b3ij6420nlqznhi5-sh/bin/bash" ...]

ERROR: In procedure system*:
ERROR: In procedure system*: Not a directory
phase `configure' failed after 1 seconds
builder for `/nix/store/f60xp1qw77kkyg9pmxx7wz6pp8ndy396-make-boot0-3.82.drv' failed; keeping build directory `/tmp/nix-build-f60xp1qw77kkyg9pmxx7wz6pp8ndy396-make-boot0-3.82.drv-0'
builder for `/nix/store/f60xp1qw77kkyg9pmxx7wz6pp8ndy396-make-boot0-3.82.drv' failed with exit code 1
@ build-failed /nix/store/f60xp1qw77kkyg9pmxx7wz6pp8ndy396-make-boot0-3.82.drv /nix/store/kw0g24rxmvxzyysx8sv5v56322n3vnym-make-boot0-3.82 1 builder for `/nix/store/f60xp1qw77kkyg9pmxx7wz6pp8ndy396-make-boot0-3.82.drv' failed with exit code 1
cannot build derivation `/nix/store/4shd2mi6axq07v8gfbs28ma981mnzzws-glibc-2.17.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/dbsy0hq0fcjhz06gcb6bf7sx9am2dwqj-grep-2.14.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/1a1hl5q4w9z06hxrk8aqxgxk9nkn2rff-linux-libre-headers-3.3.8.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/0yxsgqf4llsgnxzis2vcfy7np7q8hqdr-bootstrap-tarballs-0.drv': 1 dependencies couldn't be built
error: build failed: build of `/nix/store/0yxsgqf4llsgnxzis2vcfy7np7q8hqdr-bootstrap-tarballs-0.drv' failed

Nikita

[1] https://lists.gnu.org/archive/html/bug-guix/2013-01/msg00350.html

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-01-31 19:32                                                                                                 ` Nikita Karetnikov
@ 2013-01-31 22:08                                                                                                   ` Ludovic Courtès
  2013-02-01 23:43                                                                                                     ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-01-31 22:08 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

> (define %bootstrap-inputs
>   `(("libc" ,(nixpkgs-derivation "glibc" "mips64el-linux"))
>     ("bash" "/bin/sh")

[...]

>    ?: 0 [system* "/nix/store/n6nrnh7lm39qk2v9b3ij6420nlqznhi5-sh/bin/bash" ...]
>
> ERROR: In procedure system*:
> ERROR: In procedure system*: Not a directory

As I wrote, the “bash” input above should be a *directory* containing
exactly a sub-directory called ‘bin’, itself containing a static
executable called ‘bash’.

Ludo’.

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

* Re: Porting to mips64el
  2013-01-31 22:08                                                                                                   ` Ludovic Courtès
@ 2013-02-01 23:43                                                                                                     ` Nikita Karetnikov
  2013-02-02 10:09                                                                                                       ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-02-01 23:43 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> As I wrote, the “bash” input above should be a *directory* containing
> exactly a sub-directory called ‘bin’, itself containing a static
> executable called ‘bash’.

I also copied 'bash' to 'sh'.  Because the build had failed without it.

After several hours, it failed again:

[...]

../../gcc-4.7.2/gcc/config/mips/gnu-user.h:94:309: warning: missing terminating " character [enabled by default]
../../gcc-4.7.2/gcc/config/mips/gnu-user.h:96:1: error: expected identifier or '(' before '%' token
../../gcc-4.7.2/gcc/config/mips/gnu-user.h:97:1: error: expected identifier or '(' before '%' token
../../gcc-4.7.2/gcc/config/mips/gnu-user.h:98:1: error: expected identifier or '(' before '%' token
../../gcc-4.7.2/gcc/config/mips/gnu-user.h:99:36: warning: missing terminating " character [enabled by default]
../../gcc-4.7.2/gcc/config/mips/gnu-user.h:98:1: error: missing terminating " character
In file included from ./tm.h:36:0,
                 from ../../gcc-4.7.2/gcc/genflags.c:27:
../../gcc-4.7.2/gcc/config/mips/gnu-user64.h:31:309: warning: missing terminating " character [enabled by default]
../../gcc-4.7.2/gcc/config/mips/gnu-user64.h:33:1: error: expected identifier or '(' before '%' token
../../gcc-4.7.2/gcc/config/mips/gnu-user64.h:34:1: error: expected identifier or '(' before '%' token
../../gcc-4.7.2/gcc/config/mips/gnu-user64.h:35:1: error: expected identifier or '(' before '%' token
../../gcc-4.7.2/gcc/config/mips/gnu-user64.h:36:36: warning: missing terminating " character [enabled by default]
../../gcc-4.7.2/gcc/config/mips/gnu-user64.h:35:1: error: missing terminating " character
make[3]: *** [build/genflags.o] Error 1
make[3]: Leaving directory `/tmp/nix-build-4i9pdi5wy5axlcp54g08f4f1gf82hlxx-gcc-4.7.2.drv-0/build/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/tmp/nix-build-4i9pdi5wy5axlcp54g08f4f1gf82hlxx-gcc-4.7.2.drv-0/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/tmp/nix-build-4i9pdi5wy5axlcp54g08f4f1gf82hlxx-gcc-4.7.2.drv-0/build'
make: *** [all] Error 2
phase `build' failed after 2047 seconds
builder for `/nix/store/4i9pdi5wy5axlcp54g08f4f1gf82hlxx-gcc-4.7.2.drv' failed; keeping build directory `/tmp/nix-build-4i9pdi5wy5axlcp54g08f4f1gf82hlxx-gcc-4.7.2.drv-0'
builder for `/nix/store/4i9pdi5wy5axlcp54g08f4f1gf82hlxx-gcc-4.7.2.drv' failed with exit code 1
@ build-failed /nix/store/4i9pdi5wy5axlcp54g08f4f1gf82hlxx-gcc-4.7.2.drv /nix/store/n4blfp5bz6lvx9w9afn1i9c9v7akjnns-gcc-4.7.2 1 builder for `/nix/store/4i9pdi5wy5axlcp54g08f4f1gf82hlxx-gcc-4.7.2.drv' failed with exit code 1
cannot build derivation `/nix/store/v564vvxmyds190jlbxdmsxqnc5w35b6b-guile-2.0.7.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/6cy3dcrbpblk73ch1knif3h09l5d1pbr-bootstrap-tarballs-0.drv': 1 dependencies couldn't be built
error: build failed: build of `/nix/store/6cy3dcrbpblk73ch1knif3h09l5d1pbr-bootstrap-tarballs-0.drv' failed

Should I ask GCC people about this error?

I can try to run 'strace' if you tell me what to look for.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-02-01 23:43                                                                                                     ` Nikita Karetnikov
@ 2013-02-02 10:09                                                                                                       ` Ludovic Courtès
  2013-02-02 12:32                                                                                                         ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-02-02 10:09 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Hi,

Nikita Karetnikov <nikita@karetnikov.org> skribis:

> ../../gcc-4.7.2/gcc/config/mips/gnu-user.h:94:309: warning: missing terminating " character [enabled by default]

Can you check what’s in that file, in the build tree?  Presumably the
LIB_SPEC patching in base.scm doesn’t work as expected.

Ludo’.

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

* Re: Porting to mips64el
  2013-02-02 10:09                                                                                                       ` Ludovic Courtès
@ 2013-02-02 12:32                                                                                                         ` Nikita Karetnikov
  2013-02-02 17:34                                                                                                           ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-02-02 12:32 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

>> ../../gcc-4.7.2/gcc/config/mips/gnu-user.h:94:309: warning: missing terminating " character [enabled by default]

> Can you check what’s in that file, in the build tree?  Presumably the
> LIB_SPEC patching in base.scm doesn’t work as expected.

#define LIB_SPEC "-L/nix/store/7ya3mh0987kmc9xkwxzapkpw4s4hzkz0-glibc-2.17/lib %{!static:-rpath=/nix/store/7ya3mh0987kmc9xkwxzapkpw4s4hzkz0-glibc-2.17/lib %{!static-libgcc:-rpath=/nix/store/n4blfp5bz6lvx9w9afn1i9c9v7akjnns-gcc-4.7.2/lib64 -rpath=/nix/store/n4blfp5bz6lvx9w9afn1i9c9v7akjnns-gcc-4.7.2/lib}} " "\

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-02-02 12:32                                                                                                         ` Nikita Karetnikov
@ 2013-02-02 17:34                                                                                                           ` Ludovic Courtès
  2013-02-02 20:47                                                                                                             ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-02-02 17:34 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>>> ../../gcc-4.7.2/gcc/config/mips/gnu-user.h:94:309: warning: missing terminating " character [enabled by default]
>
>> Can you check what’s in that file, in the build tree?  Presumably the
>> LIB_SPEC patching in base.scm doesn’t work as expected.
>
> #define LIB_SPEC "-L/nix/store/7ya3mh0987kmc9xkwxzapkpw4s4hzkz0-glibc-2.17/lib %{!static:-rpath=/nix/store/7ya3mh0987kmc9xkwxzapkpw4s4hzkz0-glibc-2.17/lib %{!static-libgcc:-rpath=/nix/store/n4blfp5bz6lvx9w9afn1i9c9v7akjnns-gcc-4.7.2/lib64 -rpath=/nix/store/n4blfp5bz6lvx9w9afn1i9c9v7akjnns-gcc-4.7.2/lib}} " "\

Hmm, I fail to see where the error is.

Can you send this file?

TIA,
Ludo’.

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

* Re: Porting to mips64el
  2013-02-02 17:34                                                                                                           ` Ludovic Courtès
@ 2013-02-02 20:47                                                                                                             ` Nikita Karetnikov
  2013-02-03 18:00                                                                                                               ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-02-02 20:47 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix


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

> Can you send this file?

Attached.


[-- Attachment #1.2: gnu-user.h --]
[-- Type: text/plain, Size: 4735 bytes --]

/* Definitions for MIPS systems using GNU userspace.
   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
   2007, 2008, 2010, 2011 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.

GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.  */

#undef WCHAR_TYPE
#define WCHAR_TYPE "int"

#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32

#undef ASM_DECLARE_OBJECT_NAME
#define ASM_DECLARE_OBJECT_NAME mips_declare_object_name

/* If we don't set MASK_ABICALLS, we can't default to PIC.  */
#undef TARGET_DEFAULT
#define TARGET_DEFAULT MASK_ABICALLS

#define TARGET_OS_CPP_BUILTINS()				\
  do {								\
    GNU_USER_TARGET_OS_CPP_BUILTINS();				\
    /* The GNU C++ standard library requires this.  */		\
    if (c_dialect_cxx ())					\
      builtin_define ("_GNU_SOURCE");				\
  } while (0)

#undef SUBTARGET_CPP_SPEC
#define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"

/* A standard GNU/Linux mapping.  On most targets, it is included in
   CC1_SPEC itself by config/linux.h, but mips.h overrides CC1_SPEC
   and provides this hook instead.  */
#undef SUBTARGET_CC1_SPEC
#define SUBTARGET_CC1_SPEC "%{profile:-p}"

/* From iris5.h */
/* -G is incompatible with -KPIC which is the default, so only allow objects
   in the small data section if the user explicitly asks for it.  */
#undef MIPS_DEFAULT_GVALUE
#define MIPS_DEFAULT_GVALUE 0

/* Borrowed from sparc/linux.h */
#undef LINK_SPEC
#define LINK_SPEC \
 "%(endian_spec) \
  %{shared:-shared} \
  %{!shared: \
    %{!static: \
      %{rdynamic:-export-dynamic} \
      -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \
      %{static:-static}}"

#undef SUBTARGET_ASM_SPEC
#define SUBTARGET_ASM_SPEC \
  "%{!mno-abicalls:%{mplt:-call_nonpic;:-KPIC}}"

/* The MIPS assembler has different syntax for .set. We set it to
   .dummy to trap any errors.  */
#undef SET_ASM_OP
#define SET_ASM_OP "\t.dummy\t"

#undef ASM_OUTPUT_DEF
#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2)				\
 do {									\
	fputc ( '\t', FILE);						\
	assemble_name (FILE, LABEL1);					\
	fputs ( " = ", FILE);						\
	assemble_name (FILE, LABEL2);					\
	fputc ( '\n', FILE);						\
 } while (0)

/* The glibc _mcount stub will save $v0 for us.  Don't mess with saving
   it, since ASM_OUTPUT_REG_PUSH/ASM_OUTPUT_REG_POP do not work in the
   presence of $gp-relative calls.  */
#undef ASM_OUTPUT_REG_PUSH
#undef ASM_OUTPUT_REG_POP

#undef LIB_SPEC
#define LIB_SPEC "-L/nix/store/7ya3mh0987kmc9xkwxzapkpw4s4hzkz0-glibc-2.17/lib %{!static:-rpath=/nix/store/7ya3mh0987kmc9xkwxzapkpw4s4hzkz0-glibc-2.17/lib %{!static-libgcc:-rpath=/nix/store/n4blfp5bz6lvx9w9afn1i9c9v7akjnns-gcc-4.7.2/lib64 -rpath=/nix/store/n4blfp5bz6lvx9w9afn1i9c9v7akjnns-gcc-4.7.2/lib}} " "\

%{pthread:-lpthread} \
%{shared:-lc} \
%{!shared: \
  %{profile:-lc_p} %{!profile:-lc}}"

#ifdef HAVE_AS_NO_SHARED
/* Default to -mno-shared for non-PIC.  */
# define NO_SHARED_SPECS \
  "%{mshared|mno-shared|fpic|fPIC|fpie|fPIE:;:-mno-shared}"
#else
# define NO_SHARED_SPECS ""
#endif

/* -march=native handling only makes sense with compiler running on
   a MIPS chip.  */
#if defined(__mips__)
extern const char *host_detect_local_cpu (int argc, const char **argv);
# define EXTRA_SPEC_FUNCTIONS \
  { "local_cpu_detect", host_detect_local_cpu },

# define MARCH_MTUNE_NATIVE_SPECS				\
  " %{march=native:%<march=native %:local_cpu_detect(arch)}"	\
  " %{mtune=native:%<mtune=native %:local_cpu_detect(tune)}"
#else
# define MARCH_MTUNE_NATIVE_SPECS ""
#endif

#define LINUX_DRIVER_SELF_SPECS \
  NO_SHARED_SPECS							\
  MARCH_MTUNE_NATIVE_SPECS,						\
  /* -mplt has no effect without -mno-shared.  Simplify later		\
     specs handling by removing a redundant option.  */			\
  "%{!mno-shared:%<mplt}",						\
  /* -mplt likewise has no effect for -mabi=64 without -msym32.  */	\
  "%{mabi=64:%{!msym32:%<mplt}}"

#undef DRIVER_SELF_SPECS
#define DRIVER_SELF_SPECS \
  BASE_DRIVER_SELF_SPECS, \
  LINUX_DRIVER_SELF_SPECS

/* Similar to standard Linux, but adding -ffast-math support.  */
#undef  ENDFILE_SPEC
#define ENDFILE_SPEC \
  "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
   %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-02-02 20:47                                                                                                             ` Nikita Karetnikov
@ 2013-02-03 18:00                                                                                                               ` Ludovic Courtès
  2013-02-05 20:53                                                                                                                 ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-02-03 18:00 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

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

Nikita Karetnikov <nikita@karetnikov.org> skribis:

> #define LIB_SPEC "-L/nix/store/7ya3mh0987kmc9xkwxzapkpw4s4hzkz0-glibc-2.17/lib %{!static:-rpath=/nix/store/7ya3mh0987kmc9xkwxzapkpw4s4hzkz0-glibc-2.17/lib %{!static-libgcc:-rpath=/nix/store/n4blfp5bz6lvx9w9afn1i9c9v7akjnns-gcc-4.7.2/lib64 -rpath=/nix/store/n4blfp5bz6lvx9w9afn1i9c9v7akjnns-gcc-4.7.2/lib}} " "\
>
> %{pthread:-lpthread} \
> %{shared:-lc} \
> %{!shared: \
>   %{profile:-lc_p} %{!profile:-lc}}"

Ooh, there’s an extra newline above.  I think it’s fixed by this:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 771 bytes --]

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 23bf00b..5c39ec3 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -449,7 +449,7 @@ BFD (Binary File Descriptor) library, `gprof', `nm', `strip', etc.")
                   ;; RUNPATH to GCC even when `libgcc_s' is not NEEDED.
                   ;; There's not much that can be done to avoid it, though.
                   (format #f "#define LIB_SPEC \"-L~a/lib %{!static:-rpath=~a/lib \
-%{!static-libgcc:-rpath=~a/lib64 -rpath=~a/lib}} \" ~a~%"
+%{!static-libgcc:-rpath=~a/lib64 -rpath=~a/lib}} \" ~a"
                           libc libc out out suffix))
                  (("#define STARTFILE_SPEC.*$" line)
                   (format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\"

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


Unfortunately, this change triggers a full rebuild, so it’s for
‘core-updates’.  But if it’s good for you, then go for it, and we can
open ‘core-updates’ again.

HTH,
Ludo’.

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

* Re: Porting to mips64el
  2013-02-03 18:00                                                                                                               ` Ludovic Courtès
@ 2013-02-05 20:53                                                                                                                 ` Nikita Karetnikov
  2013-02-05 22:00                                                                                                                   ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-02-05 20:53 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix


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

> Unfortunately, this change triggers a full rebuild, so it’s for
> ‘core-updates’.  But if it’s good for you, then go for it, and we can
> open ‘core-updates’ again.

I guess that it worked.

This is an endless journey; Libtool's testsuite failed.  (Thanks for
your patience.)


[-- Attachment #1.2: test-suite.log --]
[-- Type: text/plain, Size: 4769 bytes --]

=========================================
   GNU Libtool 2.4.2: ./test-suite.log   
=========================================

1 of 103 tests failed.  (2 tests were not run).  

.. contents:: :depth: 2


SKIP: tests/tagtrace.test (exit: 77)
====================================

tagtrace.test: ===  Running tagtrace.test
tagtrace.test: This test requires GNU Autoconf

FAIL: tests/demo-nopic-make.test (exit: 2)
==========================================

demo-nopic-make.test: ===  Running demo-nopic-make.test
demo-nopic-make.test: ===  Running demo-nopic-make.test
demo-nopic-make.test: ===  Running `make ' in demo
/nix/store/xnd5ihy6cvjqj79dx4gzicj21yxqxhrq-bash-4.2/bin/bash ./libtool --tag=CC   --mode=compile gcc -DPACKAGE_NAME=\"demo\" -DPACKAGE_TARNAME=\"demo\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"demo\ 1.0\" -DPACKAGE_BUGREPORT=\"bug-libtool@gnu.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"demo\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I.  -I./../..   -g -O2 -c -o hello.lo hello.c
libtool: compile:  gcc -DPACKAGE_NAME=\"demo\" -DPACKAGE_TARNAME=\"demo\" -DPACKAGE_VERSION=\"1.0\" "-DPACKAGE_STRING=\"demo 1.0\"" -DPACKAGE_BUGREPORT=\"bug-libtool@gnu.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"demo\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -I./../.. -g -O2 -c hello.c -o .libs/hello.o
libtool: compile:  gcc -DPACKAGE_NAME=\"demo\" -DPACKAGE_TARNAME=\"demo\" -DPACKAGE_VERSION=\"1.0\" "-DPACKAGE_STRING=\"demo 1.0\"" -DPACKAGE_BUGREPORT=\"bug-libtool@gnu.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"demo\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -I./../.. -g -O2 -c hello.c -o hello.o >/dev/null 2>&1
/nix/store/xnd5ihy6cvjqj79dx4gzicj21yxqxhrq-bash-4.2/bin/bash ./libtool --tag=CC   --mode=compile gcc -DPACKAGE_NAME=\"demo\" -DPACKAGE_TARNAME=\"demo\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"demo\ 1.0\" -DPACKAGE_BUGREPORT=\"bug-libtool@gnu.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"demo\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I.  -I./../..   -g -O2 -c -o foo.lo foo.c
libtool: compile:  gcc -DPACKAGE_NAME=\"demo\" -DPACKAGE_TARNAME=\"demo\" -DPACKAGE_VERSION=\"1.0\" "-DPACKAGE_STRING=\"demo 1.0\"" -DPACKAGE_BUGREPORT=\"bug-libtool@gnu.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"demo\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -I./../.. -g -O2 -c foo.c -o .libs/foo.o
libtool: compile:  gcc -DPACKAGE_NAME=\"demo\" -DPACKAGE_TARNAME=\"demo\" -DPACKAGE_VERSION=\"1.0\" "-DPACKAGE_STRING=\"demo 1.0\"" -DPACKAGE_BUGREPORT=\"bug-libtool@gnu.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"demo\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -I./../.. -g -O2 -c foo.c -o foo.o >/dev/null 2>&1
/nix/store/xnd5ihy6cvjqj79dx4gzicj21yxqxhrq-bash-4.2/bin/bash ./libtool --tag=CC   --mode=link gcc  -g -O2 -no-undefined -version-info 3:12:1  -o libhello.la -rpath /usr/local/lib hello.lo foo.lo -lm -ldl 
libtool: link: gcc -shared  -fPIC -DPIC  .libs/hello.o .libs/foo.o   -lm -ldl  -O2   -Wl,-soname -Wl,libhello.so.2 -o .libs/libhello.so.2.1.12
ld: .libs/hello.o: relocation R_MIPS_HI16 against `__gnu_local_gp' can not be used when making a shared object; recompile with -fPIC
.libs/hello.o: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [libhello.la] Error 1

SKIP: tests/demo-nopic-exec.test (exit: 77)
===========================================

demo-nopic-exec.test: ===  Running demo-nopic-exec.test
demo-nopic-exec.test: ===  Running demo-nopic-exec.test
demo-nopic-exec.test: You must run demo-make.test before running ./tests/demo-nopic-exec.test

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-02-05 20:53                                                                                                                 ` Nikita Karetnikov
@ 2013-02-05 22:00                                                                                                                   ` Ludovic Courtès
  2013-02-06  9:27                                                                                                                     ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-02-05 22:00 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> Unfortunately, this change triggers a full rebuild, so it’s for
>> ‘core-updates’.  But if it’s good for you, then go for it, and we can
>> open ‘core-updates’ again.
>
> I guess that it worked.

Cool!  Would you like to create the ‘core-updates’ branch and commit it
there?

> 1 of 103 tests failed.  (2 tests were not run).  

Arrgh, just one!

> FAIL: tests/demo-nopic-make.test (exit: 2)
> ==========================================

[...]

> libtool: compile:  gcc -DPACKAGE_NAME=\"demo\" -DPACKAGE_TARNAME=\"demo\" -DPACKAGE_VERSION=\"1.0\" "-DPACKAGE_STRING=\"demo 1.0\"" -DPACKAGE_BUGREPORT=\"bug-libtool@gnu.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"demo\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -I./../.. -g -O2 -c foo.c -o .libs/foo.o
> libtool: compile:  gcc -DPACKAGE_NAME=\"demo\" -DPACKAGE_TARNAME=\"demo\" -DPACKAGE_VERSION=\"1.0\" "-DPACKAGE_STRING=\"demo 1.0\"" -DPACKAGE_BUGREPORT=\"bug-libtool@gnu.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"demo\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -I./../.. -g -O2 -c foo.c -o foo.o >/dev/null 2>&1
> /nix/store/xnd5ihy6cvjqj79dx4gzicj21yxqxhrq-bash-4.2/bin/bash ./libtool --tag=CC   --mode=link gcc  -g -O2 -no-undefined -version-info 3:12:1  -o libhello.la -rpath /usr/local/lib hello.lo foo.lo -lm -ldl 
> libtool: link: gcc -shared  -fPIC -DPIC  .libs/hello.o .libs/foo.o   -lm -ldl  -O2   -Wl,-soname -Wl,libhello.so.2 -o .libs/libhello.so.2.1.12
> ld: .libs/hello.o: relocation R_MIPS_HI16 against `__gnu_local_gp' can not be used when making a shared object; recompile with -fPIC
> .libs/hello.o: could not read symbols: Bad value
> collect2: error: ld returned 1 exit status
> make: *** [libhello.la] Error 1

Indeed, .libs/foo.o is not built with -fPIC (above).

Could you report it to bug-libtool?  Make sure to attach test-suite.log.
You can keep me Cc’d.

In the meantime, I suggest adding #:tests? #f to Libtool so that you can
keep building the rest.

Ludo’.

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

* Re: Porting to mips64el
  2013-02-05 22:00                                                                                                                   ` Ludovic Courtès
@ 2013-02-06  9:27                                                                                                                     ` Nikita Karetnikov
  2013-02-06 14:26                                                                                                                       ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-02-06  9:27 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix


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

'binutils-static' failed.


[-- Attachment #1.2: binutils.log --]
[-- Type: text/plain, Size: 2755 bytes --]

phase `strip' succeeded after 1 seconds
@ build-succeeded /nix/store/1v7yd2glfxzxqa6jm4azcnn12ggiv3z7-xz-5.0.4.drv /nix/store/sqvgsjkd049rzgpmahz0184x6xmpvy8f-xz-5.0.4
@ build-started /nix/store/75lxm8dc68pyx7sfmc3r28h86rhncacy-binutils-static-2.22.drv /nix/store/1d1gw5x4n3qpqdjpxry2lcnygalq1z1l-binutils-static-2.22 mips64el-linux /nix/var/log/nix/drvs/75lxm8dc68pyx7sfmc3r28h86rhncacy-binutils-static-2.22.drv.bz2
copying `ar'...
removing store references from `/nix/store/1d1gw5x4n3qpqdjpxry2lcnygalq1z1l-binutils-static-2.22/bin/ar'...
copying `as'...
removing store references from `/nix/store/1d1gw5x4n3qpqdjpxry2lcnygalq1z1l-binutils-static-2.22/bin/as'...
copying `ld'...
removing store references from `/nix/store/1d1gw5x4n3qpqdjpxry2lcnygalq1z1l-binutils-static-2.22/bin/ld'...
copying `nm'...
removing store references from `/nix/store/1d1gw5x4n3qpqdjpxry2lcnygalq1z1l-binutils-static-2.22/bin/nm'...
copying `objcopy'...
removing store references from `/nix/store/1d1gw5x4n3qpqdjpxry2lcnygalq1z1l-binutils-static-2.22/bin/objcopy'...
copying `objdump'...
removing store references from `/nix/store/1d1gw5x4n3qpqdjpxry2lcnygalq1z1l-binutils-static-2.22/bin/objdump'...
copying `ranlib'...
removing store references from `/nix/store/1d1gw5x4n3qpqdjpxry2lcnygalq1z1l-binutils-static-2.22/bin/ranlib'...
copying `readelf'...
removing store references from `/nix/store/1d1gw5x4n3qpqdjpxry2lcnygalq1z1l-binutils-static-2.22/bin/readelf'...
copying `size'...
removing store references from `/nix/store/1d1gw5x4n3qpqdjpxry2lcnygalq1z1l-binutils-static-2.22/bin/size'...
copying `strings'...
removing store references from `/nix/store/1d1gw5x4n3qpqdjpxry2lcnygalq1z1l-binutils-static-2.22/bin/strings'...
copying `strip'...
removing store references from `/nix/store/1d1gw5x4n3qpqdjpxry2lcnygalq1z1l-binutils-static-2.22/bin/strip'...
builder for `/nix/store/75lxm8dc68pyx7sfmc3r28h86rhncacy-binutils-static-2.22.drv' failed to produce output path `/nix/store/qnjc6jjl61856adw7sgwnxl459khh8kg-binutils-static-2.22-lib'
@ build-failed /nix/store/75lxm8dc68pyx7sfmc3r28h86rhncacy-binutils-static-2.22.drv /nix/store/1d1gw5x4n3qpqdjpxry2lcnygalq1z1l-binutils-static-2.22 1 builder for `/nix/store/75lxm8dc68pyx7sfmc3r28h86rhncacy-binutils-static-2.22.drv' failed to produce output path `/nix/store/qnjc6jjl61856adw7sgwnxl459khh8kg-binutils-static-2.22-lib'
cannot build derivation `/nix/store/b5rf67jz1sb5i93k10aq3l213p0wkx2v-binutils-static-tarball-2.22.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/ldzc4v1qn30b3a82kw5fp8skcimj3gk7-bootstrap-tarballs-0.drv': 1 dependencies couldn't be built
error: build failed: build of `/nix/store/ldzc4v1qn30b3a82kw5fp8skcimj3gk7-bootstrap-tarballs-0.drv' failed
4450 worker operations

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-02-06  9:27                                                                                                                     ` Nikita Karetnikov
@ 2013-02-06 14:26                                                                                                                       ` Ludovic Courtès
  2013-02-08 22:43                                                                                                                         ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-02-06 14:26 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

> builder for `/nix/store/75lxm8dc68pyx7sfmc3r28h86rhncacy-binutils-static-2.22.drv' failed to produce output path `/nix/store/qnjc6jjl61856adw7sgwnxl459khh8kg-binutils-static-2.22-lib'

Fixed by 431f35f, thanks!

Ludo’.

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

* Re: Porting to mips64el
  2013-02-06 14:26                                                                                                                       ` Ludovic Courtès
@ 2013-02-08 22:43                                                                                                                         ` Nikita Karetnikov
  2013-02-08 23:11                                                                                                                           ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-02-08 22:43 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

@ build-succeeded /nix/store/8br9lb269a13panrwkvwx2zhqz3vjszf-bootstrap-tarballs-0.drv /nix/store/cixf5ra7hsq04yndm7b9hzwril6bfz2i-bootstrap-tarballs-0
/nix/store/cixf5ra7hsq04yndm7b9hzwril6bfz2i-bootstrap-tarballs-0

I'm going to test them.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-02-08 22:43                                                                                                                         ` Nikita Karetnikov
@ 2013-02-08 23:11                                                                                                                           ` Ludovic Courtès
  2013-02-11 20:50                                                                                                                             ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-02-08 23:11 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

> @ build-succeeded /nix/store/8br9lb269a13panrwkvwx2zhqz3vjszf-bootstrap-tarballs-0.drv /nix/store/cixf5ra7hsq04yndm7b9hzwril6bfz2i-bootstrap-tarballs-0
> /nix/store/cixf5ra7hsq04yndm7b9hzwril6bfz2i-bootstrap-tarballs-0
>
> I'm going to test them.

Woow, excellent!

Can you publish your changes in a ‘mipsel64-port’ branch?  I guess
Andreas will be happy to give it a spin.  ;-)

If the binaries happen to work well, we’ll have to upload them to
alpha.gnu.org like the others.  Can you already upload them somewhere so
that Andreas can try to run them?

Thanks, and congratulations!  :-)

Ludo’.

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

* Re: Porting to mips64el
  2013-02-08 23:11                                                                                                                           ` Ludovic Courtès
@ 2013-02-11 20:50                                                                                                                             ` Ludovic Courtès
  2013-02-11 21:34                                                                                                                               ` Andreas Enge
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-02-11 20:50 UTC (permalink / raw)
  To: bug-guix

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

Hi!

Nikita sent me the bootstrap binaries they built, and I uploaded them to
www.fdn.fr for testing (we’ll put them on alpha.gnu.org once a couple of
people have been able to build something :-)).

So, with the ‘mips64el’ branch, you should be able to download them and
get started.

I was surprised to see that the glibc-ports tarball isn’t needed, but
apparently glibc-ports is history, which is good news!

Thanks Nikita for the tireless work!

Ludo’.

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: Porting to mips64el
  2013-02-11 20:50                                                                                                                             ` Ludovic Courtès
@ 2013-02-11 21:34                                                                                                                               ` Andreas Enge
  2013-02-11 22:10                                                                                                                                 ` Ludovic Courtès
  2013-02-19 11:05                                                                                                                                 ` Nikita Karetnikov
  0 siblings, 2 replies; 102+ messages in thread
From: Andreas Enge @ 2013-02-11 21:34 UTC (permalink / raw)
  To: bug-guix

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

Am Montag, 11. Februar 2013 schrieb Ludovic Courtès:
> So, with the ‘mips64el’ branch, you should be able to download them and
> get started.

Could you update the links and hashes in the branch? When trying to build 
guix on mips64el, I get the following:

/run/current-system/sw/bin/mkdir -p `dirname 
"gnu/packages/bootstrap/mips64el-linux/guile-2.0.7.tar.xz"`
GUILE_LOAD_COMPILED_PATH=".:$GUILE_LOAD_COMPILED_PATH" 
/nix/var/nix/profiles/default/bin/guile --no-auto-compile -L "." -L "." 
"./build-aux/download.scm" "gnu/packages/bootstrap/mips64el-
linux/guile-2.0.7.tar.xz" 
"35c8d1c1c518bc1c77f3bc260f09712cae22053b7ba160030c9d93ad8ea12f7b"
downloading file `gnu/packages/bootstrap/mips64el-linux/guile-2.0.7.tar.xz' 
from `http://alpha.gnu.org/gnu/guix/bootstrap/mips64el-
linux/20130105/guile-2.0.7.tar.xz'...
file at `http://alpha.gnu.org/gnu/guix/bootstrap/mips64el-
linux/20130105/guile-2.0.7.tar.xz' has SHA256 
d6b33a418ae4fbc90bd69afeaacd07e7c1cce3fa9c3c879b14ae3816a9f322ff; expected 
35c8d1c1c518bc1c77f3bc260f09712cae22053b7ba160030c9d93ad8ea12f7b

Nixos on my machine uses the abi n32 (long and void* have 32 bits, long 
long 64). I would like to switch to abi 64 (long with 64 bits); we might be 
the first distribution supporting this mode. Do we need a completely 
separate toolchain for this? In the debian distribution also installed on 
the machine, there is a separate lib64 directory, and it is enough to pass 
the flag "-mabi=64" to gcc.

Andreas

[-- Attachment #2: Type: text/html, Size: 4082 bytes --]

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

* Re: Porting to mips64el
  2013-02-11 21:34                                                                                                                               ` Andreas Enge
@ 2013-02-11 22:10                                                                                                                                 ` Ludovic Courtès
  2013-02-12  2:37                                                                                                                                   ` Nikita Karetnikov
  2013-02-19 11:05                                                                                                                                 ` Nikita Karetnikov
  1 sibling, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-02-11 22:10 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Andreas Enge <andreas@enge.fr> skribis:

> Am Montag, 11. Februar 2013 schrieb Ludovic Courtès:
>> So, with the ‘mips64el’ branch, you should be able to download them and
>> get started.
>
> Could you update the links and hashes in the branch? When trying to build 
> guix on mips64el, I get the following:

It’s just the Guile tarball that fails to be downloaded, because
build-aux/download.scm is simple-minded and only tries one URL, which is
alpha.gnu.org.

So you can either temporarily modify build-aux/download.scm to point to
fdn.fr/..., or download the file in question by hand and check its hash
against the one that’s in Makefile.am.

> Nixos on my machine uses the abi n32 (long and void* have 32 bits, long 
> long 64). I would like to switch to abi 64 (long with 64 bits); we might be 
> the first distribution supporting this mode. Do we need a completely 
> separate toolchain for this? In the debian distribution also installed on 
> the machine, there is a separate lib64 directory, and it is enough to pass 
> the flag "-mabi=64" to gcc.

N64 seems to be appealing, at least for bignum-consuming apps.  The
binaries Nikita provided appear to be N32, which may mean they can only
be used to built N32 binaries?

Thanks,
Ludo’.

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

* Re: Porting to mips64el
  2013-02-11 22:10                                                                                                                                 ` Ludovic Courtès
@ 2013-02-12  2:37                                                                                                                                   ` Nikita Karetnikov
  2013-02-12  2:42                                                                                                                                     ` Nikita Karetnikov
  2013-02-12  9:57                                                                                                                                     ` Ludovic Courtès
  0 siblings, 2 replies; 102+ messages in thread
From: Nikita Karetnikov @ 2013-02-12  2:37 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> So you can either temporarily modify build-aux/download.scm to point to
> fdn.fr/..., or download the file in question by hand and check its hash
> against the one that’s in Makefile.am.

Please append '-linux' to the following:

<http://www.fdn.fr/~lcourtes/software/guix/packages/mips64el>.

By the way, can we change 'Makefile.am' not to download unnecessary
Guile binaries?

Also, I used the wrong command (i.e., 'nix-hash --type sha256 --base32')
to compute the hashes in 'bootstrap.scm'.
'nix-hash --type sha256 --flat --base32' should be used instead.

I'll send a patch when I build 'hello'.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-02-12  2:37                                                                                                                                   ` Nikita Karetnikov
@ 2013-02-12  2:42                                                                                                                                     ` Nikita Karetnikov
  2013-02-12  7:43                                                                                                                                       ` Nikita Karetnikov
  2013-02-12  9:57                                                                                                                                     ` Ludovic Courtès
  1 sibling, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-02-12  2:42 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> Please append '-linux' to the following:

> <http://www.fdn.fr/~lcourtes/software/guix/packages/mips64el>.

The current workaround is to adjust 'build-aux/download.scm' and
'gnu/packages/bootstrap.scm' like this:

     (string->uri (string-append %url-base "/mips64el"
                                 "/20130105/" basename)))))

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-02-12  2:42                                                                                                                                     ` Nikita Karetnikov
@ 2013-02-12  7:43                                                                                                                                       ` Nikita Karetnikov
  2013-02-14  7:50                                                                                                                                         ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-02-12  7:43 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

I apologize; I totally forgot about these issues: [1,2,3].

I'll push the needed changes later.  (I should test them again.)

[1] http://www.mail-archive.com/bug-guix@gnu.org/msg00614.html
[2] http://www.mail-archive.com/bug-guix@gnu.org/msg00689.html
[3] http://www.mail-archive.com/bug-guix@gnu.org/msg00725.html

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-02-12  2:37                                                                                                                                   ` Nikita Karetnikov
  2013-02-12  2:42                                                                                                                                     ` Nikita Karetnikov
@ 2013-02-12  9:57                                                                                                                                     ` Ludovic Courtès
  2013-02-13  5:35                                                                                                                                       ` Nikita Karetnikov
  1 sibling, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-02-12  9:57 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> So you can either temporarily modify build-aux/download.scm to point to
>> fdn.fr/..., or download the file in question by hand and check its hash
>> against the one that’s in Makefile.am.
>
> Please append '-linux' to the following:
>
> <http://www.fdn.fr/~lcourtes/software/guix/packages/mips64el>.

Done, sorry about that!

> By the way, can we change 'Makefile.am' not to download unnecessary
> Guile binaries?

Should be possible.  The thing is, ‘make dist’ should always bundle
everything.  Another complication is that on x86_64 it’s interesting to
have both i686 and x86_64 binaries...

> Also, I used the wrong command (i.e., 'nix-hash --type sha256 --base32')
> to compute the hashes in 'bootstrap.scm'.
> 'nix-hash --type sha256 --flat --base32' should be used instead.

Indeed.

Note that you can also do:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (use-modules (guix utils) (guix base32))
scheme@(guile-user)> (use-modules (rnrs io ports))
scheme@(guile-user)> (call-with-input-file "bootstrap/i686-linux/mkdir"
                       (compose bytevector->nix-base32-string sha256 get-bytevector-all))
$3 = "13ls4166y7gnykfphzmr0y7pn8kyikp5px4prnnhj1jyk5vhdgfm"
--8<---------------cut here---------------end--------------->8---

Granted, it’s more verbose.  :-)

Maybe we need a command-line interface to that?

Ludo’.

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

* Re: Porting to mips64el
  2013-02-12  9:57                                                                                                                                     ` Ludovic Courtès
@ 2013-02-13  5:35                                                                                                                                       ` Nikita Karetnikov
  2013-02-13 14:43                                                                                                                                         ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-02-13  5:35 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> Maybe we need a command-line interface to that?

I think so.  Should it be a separate file (e.g., 'guix-hash')?

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-02-13  5:35                                                                                                                                       ` Nikita Karetnikov
@ 2013-02-13 14:43                                                                                                                                         ` Ludovic Courtès
  0 siblings, 0 replies; 102+ messages in thread
From: Ludovic Courtès @ 2013-02-13 14:43 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> Maybe we need a command-line interface to that?
>
> I think so.  Should it be a separate file (e.g., 'guix-hash')?

Yes.  If you want to work on it, there are bits from guix-download that
can be reused.  I’d recommend keeping the --format option, for instance.

Ludo’.

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

* Re: Porting to mips64el
  2013-02-12  7:43                                                                                                                                       ` Nikita Karetnikov
@ 2013-02-14  7:50                                                                                                                                         ` Nikita Karetnikov
  2013-02-14 11:33                                                                                                                                           ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-02-14  7:50 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix


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

@ build-succeeded /nix/store/swa7j95kvdp8gi49b59llckmkb73z5b9-hello-2.8.drv /nix/store/3nlfldhm3ckl319jhnb1rdwgi0c7kf38-hello-2.8
/nix/store/3nlfldhm3ckl319jhnb1rdwgi0c7kf38-hello-2.8

I'm attaching three patches.
'0001-gnu-Disable-Libtool-s-testsuite.patch' and
'0001-gnu-Set-ARCH-to-mips.patch' are for 'mips64el'.  The other one is
for 'core-updates', but it's also needed for 'mips64el'.  (Should I push
to both?)

Could you test them?  (Don't forget to adjust 'build-aux/download.scm'.)

I'll push them if they are fine.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Remove-a-newline.patch --]
[-- Type: text/x-diff, Size: 1145 bytes --]

From 41aeaf76e8c61d184f06e8c886e595e8a97ebd16 Mon Sep 17 00:00:00 2001
From: Nikita Karetnikov <nikita@karetnikov.org>
Date: Thu, 14 Feb 2013 06:25:38 +0000
Subject: [PATCH] gnu: Remove a newline.

* gnu/packages/base.scm (gcc-4.7): Remove the newline.
---
 gnu/packages/base.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 23bf00b..5c39ec3 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -449,7 +449,7 @@ BFD (Binary File Descriptor) library, `gprof', `nm', `strip', etc.")
                   ;; RUNPATH to GCC even when `libgcc_s' is not NEEDED.
                   ;; There's not much that can be done to avoid it, though.
                   (format #f "#define LIB_SPEC \"-L~a/lib %{!static:-rpath=~a/lib \
-%{!static-libgcc:-rpath=~a/lib64 -rpath=~a/lib}} \" ~a~%"
+%{!static-libgcc:-rpath=~a/lib64 -rpath=~a/lib}} \" ~a"
                           libc libc out out suffix))
                  (("#define STARTFILE_SPEC.*$" line)
                   (format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\"
-- 
1.8.0.2


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 0001-gnu-Disable-Libtool-s-testsuite.patch --]
[-- Type: text/x-diff, Size: 1019 bytes --]

From ad1536e4730b9d37a0519fdd29bdd8195554358d Mon Sep 17 00:00:00 2001
From: Nikita Karetnikov <nikita@karetnikov.org>
Date: Thu, 14 Feb 2013 06:36:23 +0000
Subject: [PATCH] gnu: Disable Libtool's testsuite.

* gnu/packages/autotools.scm (libtool): Add '#:tests? #f'.
---
 gnu/packages/autotools.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index bc4dddc..e004dd9 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -195,7 +195,8 @@ Standards.  Automake requires the use of Autoconf.")
                "out"))                       ; libltdl.so, ltdl.h, etc.
 
     (arguments
-     `(#:patches (list (assoc-ref %build-inputs "patch/skip-tests"))
+     `(#:tests? #f
+       #:patches (list (assoc-ref %build-inputs "patch/skip-tests"))
        #:phases (alist-cons-before
                  'check 'pre-check
                  (lambda* (#:key inputs #:allow-other-keys)
-- 
1.8.0.2


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.4: 0001-gnu-Set-ARCH-to-mips.patch --]
[-- Type: text/x-diff, Size: 2524 bytes --]

From 31a7f172941c592f04f8f741b89e04a2a6677a76 Mon Sep 17 00:00:00 2001
From: Nikita Karetnikov <nikita@karetnikov.org>
Date: Thu, 14 Feb 2013 06:14:48 +0000
Subject: [PATCH] gnu: Set 'ARCH' to 'mips'.

* gnu/packages/linux.scm (linux-libre-headers): Set 'ARCH' to 'mips'.
---
 gnu/packages/linux.scm | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 58cddc0..fe8148c 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -29,20 +29,31 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix build-system gnu))
+  #:use-module (guix build-system gnu)
+  #:use-module ((guix utils) #:select (%current-system)))
 
 (define-public linux-libre-headers
   (let* ((version* "3.3.8")
          (build-phase
-          '(lambda* (#:key system #:allow-other-keys)
+          (lambda ()
+            `(lambda* (#:key system #:allow-other-keys)
              (let ((arch (car (string-split system #\-))))
                (setenv "ARCH"
                        (cond ((string=? arch "i686") "i386")
+
+                             ;; FIXME: The unquote below is just to
+                             ;; avoid triggering a rebuild.  Remove me
+                             ;; on the next core-updates.
+                             ,@(if (string-prefix? "mips"
+                                                   (%current-system))
+                                   `(((string-prefix? "mips" arch)
+                                      "mips"))
+                                   '())
                              (else arch)))
                (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
 
              (and (zero? (system* "make" "defconfig"))
-                  (zero? (system* "make" "mrproper" "headers_check")))))
+                  (zero? (system* "make" "mrproper" "headers_check"))))))
          (install-phase
           `(lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
@@ -73,7 +84,7 @@
                   (guix build utils)
                   (srfi srfi-1))
        #:phases (alist-replace
-                 'build ,build-phase
+                 'build ,(build-phase)
                  (alist-replace
                   'install ,install-phase
                   (alist-delete 'configure %standard-phases)))
-- 
1.8.0.2


[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-02-14  7:50                                                                                                                                         ` Nikita Karetnikov
@ 2013-02-14 11:33                                                                                                                                           ` Ludovic Courtès
  2013-02-15 20:11                                                                                                                                             ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-02-14 11:33 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

> I'm attaching three patches.
> '0001-gnu-Disable-Libtool-s-testsuite.patch' and
> '0001-gnu-Set-ARCH-to-mips.patch' are for 'mips64el'.  The other one is
> for 'core-updates', but it's also needed for 'mips64el'.  (Should I push
> to both?)
>
> Could you test them?  (Don't forget to adjust 'build-aux/download.scm'.)

I can’t test on MIPS, but here are some comments.

> I'll push them if they are fine.

To the ‘mips64el’ branch.

> From 41aeaf76e8c61d184f06e8c886e595e8a97ebd16 Mon Sep 17 00:00:00 2001
> From: Nikita Karetnikov <nikita@karetnikov.org>
> Date: Thu, 14 Feb 2013 06:25:38 +0000
> Subject: [PATCH] gnu: Remove a newline.

Change to “gnu: gcc: Remove extraneous newline in LIB_SPEC”.  Otherwise
it sounds like it removes a non-significant newline in the code.

> * gnu/packages/base.scm (gcc-4.7): Remove the newline.

“Remove trailing newline when patching ‘LIB_SPEC’.”

You can already commit this one with these changes.

> From ad1536e4730b9d37a0519fdd29bdd8195554358d Mon Sep 17 00:00:00 2001
> From: Nikita Karetnikov <nikita@karetnikov.org>
> Date: Thu, 14 Feb 2013 06:36:23 +0000
> Subject: [PATCH] gnu: Disable Libtool's testsuite.
>
> * gnu/packages/autotools.scm (libtool): Add '#:tests? #f'.
> ---
>  gnu/packages/autotools.scm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
> index bc4dddc..e004dd9 100644
> --- a/gnu/packages/autotools.scm
> +++ b/gnu/packages/autotools.scm
> @@ -195,7 +195,8 @@ Standards.  Automake requires the use of Autoconf.")
>                 "out"))                       ; libltdl.so, ltdl.h, etc.
>  
>      (arguments
> -     `(#:patches (list (assoc-ref %build-inputs "patch/skip-tests"))
> +     `(#:tests? #f

Instead of disabling tests for everyone, do something like:

  `(;; XXX: Work around test failure on MIPS as reported at
    ;; <http://.../bug-libtool/...>.
    #:tests? ,(not (string=? (%current-system) "mips64el-linux"))
    ;; ...
    )

Once done, you can commit it as well.

> From 31a7f172941c592f04f8f741b89e04a2a6677a76 Mon Sep 17 00:00:00 2001
> From: Nikita Karetnikov <nikita@karetnikov.org>
> Date: Thu, 14 Feb 2013 06:14:48 +0000
> Subject: [PATCH] gnu: Set 'ARCH' to 'mips'.
>
> * gnu/packages/linux.scm (linux-libre-headers): Set 'ARCH' to 'mips'.
> ---
>  gnu/packages/linux.scm | 19 +++++++++++++++----
>  1 file changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> index 58cddc0..fe8148c 100644
> --- a/gnu/packages/linux.scm
> +++ b/gnu/packages/linux.scm
> @@ -29,20 +29,31 @@
>    #:use-module (gnu packages pkg-config)
>    #:use-module (guix packages)
>    #:use-module (guix download)
> -  #:use-module (guix build-system gnu))
> +  #:use-module (guix build-system gnu)
> +  #:use-module ((guix utils) #:select (%current-system)))
>  
>  (define-public linux-libre-headers
>    (let* ((version* "3.3.8")
>           (build-phase
> -          '(lambda* (#:key system #:allow-other-keys)
> +          (lambda ()
> +            `(lambda* (#:key system #:allow-other-keys)
>               (let ((arch (car (string-split system #\-))))
>                 (setenv "ARCH"
>                         (cond ((string=? arch "i686") "i386")
> +
> +                             ;; FIXME: The unquote below is just to
> +                             ;; avoid triggering a rebuild.  Remove me
> +                             ;; on the next core-updates.
> +                             ,@(if (string-prefix? "mips"
> +                                                   (%current-system))
> +                                   `(((string-prefix? "mips" arch)
> +                                      "mips"))
> +                                   '())

Now that we’re triggering a rebuild anyway, let’s write it the normal
way, that is:

                 (setenv "ARCH"
                         (cond ((string=? arch "i686") "i386")
                               ((string-prefix? "mips" arch") "mips")
                               (else arch)))

Actually, even better would be do that in host code, as done with
‘glibc-dynamic-linker’:

  (define (system->linux-architecture arch)
    (let ((arch (car (string-split arch #\-))))
      (cond ((string=? arch "i686") "i386")
            ((string-prefix? "mips" arch") "mips")
            (else arch))))

And then, change ‘build-phase’ to something like:

  (let ((build-phase
         (lambda (arch)
           `(lambda _
              (setenv "ARCH" ,(system->linux-architecture arch))
              ...))))
    (arguments `(#:phase ... ,(build-phase (%current-system)) ...)))

Could you try that?

Thanks!

Ludo’.

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

* Re: Porting to mips64el
  2013-02-14 11:33                                                                                                                                           ` Ludovic Courtès
@ 2013-02-15 20:11                                                                                                                                             ` Nikita Karetnikov
  2013-02-16 21:07                                                                                                                                               ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-02-15 20:11 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix


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

> Actually, even better would be do that in host code, as done with
> ‘glibc-dynamic-linker’:

What do you mean by "host code"?

The attached recipe raises the following:

make: *** No rule to make target `defconfig'.  Stop.

[...]

starting phase `build'
Backtrace:
In ice-9/boot-9.scm:
 157: 12 [catch #t #<catch-closure 10501880> ...]
In unknown file:
   ?: 11 [apply-smob/1 #<catch-closure 10501880>]
In ice-9/boot-9.scm:
  63: 10 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 421: 9 [eval # #]
In ice-9/boot-9.scm:
2131: 8 [save-module-excursion #<procedure 104c9120 at ice-9/boot-9.scm:3711:3 ()>]
3716: 7 [#<procedure 104c9120 at ice-9/boot-9.scm:3711:3 ()>]
1456: 6 [%start-stack load-stack ...]
1461: 5 [#<procedure 10518750 ()>]
In unknown file:
   ?: 4 [primitive-load "/nix/store/imhxpwyqxwq08jlck0js0hl55f7c27cx-linux-libre-headers-3.3.8-guile-builder"]
In ice-9/eval.scm:
 376: 3 [eval # ()]
In srfi/srfi-1.scm:
 830: 2 [every1 #<procedure 106b7430 at /nix/store/dqrq0a7g4jimfsqrmk6w8pdjfi83598z-module-import/guix/build/gnu-build-system.scm:297:9 (expr)> ...]
In /nix/store/dqrq0a7g4jimfsqrmk6w8pdjfi83598z-module-import/guix/build/gnu-build-system.scm:
 301: 1 [#<procedure 106b7430 at /nix/store/dqrq0a7g4jimfsqrmk6w8pdjfi83598z-module-import/guix/build/gnu-build-system.scm:297:9 (expr)> #]
In unknown file:
   ?: 0 [#f # ...]

ERROR: In procedure #f:
ERROR: Wrong type to apply: #f
note: keeping build directory `/tmp/nix-build-linux-libre-headers-3.3.8.drv-1'
builder for `/nix/store/302naw10n689ada24wccppryw2rjf63c-linux-libre-headers-3.3.8.drv' failed with exit code 1
@ build-failed /nix/store/302naw10n689ada24wccppryw2rjf63c-linux-libre-headers-3.3.8.drv /nix/store/67hlf49g6k116zvmvipxc9p935w6zyzw-linux-libre-headers-3.3.8 1 builder for `/nix/store/302naw10n689ada24wccppryw2rjf63c-linux-libre-headers-3.3.8.drv' failed with exit code 1
cannot build derivation `/nix/store/402il7xq9z418zjnp3il9ih73v12slv3-linux-libre-headers-3.3.8.drv': 1 dependencies couldn't be built
error: build failed: build of
`/nix/store/402il7xq9z418zjnp3il9ih73v12slv3-linux-libre-headers-3.3.8.drv'
failed


[-- Attachment #1.2: linux.scm --]
[-- Type: text/plain, Size: 12207 bytes --]

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages linux)
  #:use-module (guix licenses)
  #:use-module (gnu packages)
  #:use-module ((gnu packages compression)
                #:renamer (symbol-prefix-proc 'guix:))
  #:use-module (gnu packages flex)
  #:use-module (gnu packages libusb)
  #:use-module (gnu packages ncurses)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages pkg-config)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu))

(define (system->linux-architecture arch)
  (let ((arch (car (string-split arch #\-))))
    (cond ((string=? arch "i686") "i386")
          ((string-prefix? "mips" arch) "mips")
          (else arch))))

(define-public linux-libre-headers
  (let* ((version* "3.3.8")
         (build-phase
          (lambda (arch)
            `(lambda _
               (setenv "ARCH" ,(system->linux-architecture arch))
               (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))

             (and (zero? (system* "make" "defconfig"))
                  (zero? (system* "make" "mrproper" "headers_check")))))
         (install-phase
          `(lambda* (#:key outputs #:allow-other-keys)
             (let ((out (assoc-ref outputs "out")))
               (and (zero? (system* "make"
                                    (string-append "INSTALL_HDR_PATH=" out)
                                    "headers_install"))
                    (mkdir (string-append out "/include/config"))
                    (call-with-output-file
                        (string-append out
                                       "/include/config/kernel.release")
                      (lambda (p)
                        (format p "~a-default~%" ,version*))))))))
   (package
    (name "linux-libre-headers")
    (version version*)
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "http://linux-libre.fsfla.org/pub/linux-libre/releases/3.3.8-gnu/linux-libre-"
                   version "-gnu.tar.xz"))
             (sha256
              (base32
               "0jkfh0z1s6izvdnc3njm39dhzp1cg8i06jv06izwqz9w9qsprvnl"))))
    (build-system gnu-build-system)
    (native-inputs `(("perl" ,perl)))
    (arguments
     `(#:modules ((guix build gnu-build-system)
                  (guix build utils)
                  (srfi srfi-1))
       #:phases (alist-replace
                 'build ,(build-phase (%current-system))
                 (alist-replace
                  'install ,install-phase
                  (alist-delete 'configure %standard-phases)))
       #:tests? #f))
    (synopsis "GNU Linux-Libre kernel headers")
    (description "Headers of the Linux-Libre kernel.")
    (license gpl2)
    (home-page "http://www.gnu.org/software/linux-libre/"))))

(define-public linux-pam
  (package
    (name "linux-pam")
    (version "1.1.6")
    (source
     (origin
      (method url-fetch)
      (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
                                version ".tar.bz2")
                 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
                                version ".tar.bz2")))
      (sha256
       (base32
        "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s"))))
    (build-system gnu-build-system)
    (inputs
     `(("flex" ,flex)

       ;; TODO: optional dependencies
       ;; ("libxcrypt" ,libxcrypt)
       ;; ("cracklib" ,cracklib)
       ))
    (arguments
     ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
     ;; isn't available.
     '(#:tests? #f))
    (home-page "http://www.linux-pam.org/")
    (synopsis "Pluggable authentication modules for Linux")
    (description
     "A *Free* project to implement OSF's RFC 86.0.
Pluggable authentication modules are small shared object files that can
be used through the PAM API to perform tasks, like authenticating a user
at login.  Local and dynamic reconfiguration are its key features")
    (license bsd-3)))

(define-public psmisc
  (package
    (name "psmisc")
    (version "22.20")
    (source
     (origin
      (method url-fetch)
      (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
                          version ".tar.gz"))
      (sha256
       (base32
        "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
    (build-system gnu-build-system)
    (inputs `(("ncurses" ,ncurses)))
    (home-page "http://psmisc.sourceforge.net/")
    (synopsis
     "set of utilities that use the proc filesystem, such as fuser, killall, and pstree")
    (description
     "This PSmisc package is a set of some small useful utilities that
use the proc filesystem. We're not about changing the world, but
providing the system administrator with some help in common tasks.")
    (license gpl2+)))

(define-public util-linux
  (package
    (name "util-linux")
    (version "2.21")
    (source
     (origin
      (method url-fetch)
      (uri (string-append "mirror://kernel.org/linux/utils/"
                          name "/v" version "/"
                          name "-" version ".2" ".tar.xz"))
      (sha256
       (base32
        "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir"))))
    (build-system gnu-build-system)
    (arguments
     `(#:configure-flags '("--disable-use-tty-group")
       #:phases (alist-cons-after
                 'install 'patch-chkdupexe
                 (lambda* (#:key outputs #:allow-other-keys)
                   (let ((out (assoc-ref outputs "out")))
                     (substitute* (string-append out "/bin/chkdupexe")
                       ;; Allow 'patch-shebang' to do its work.
                       (("@PERL@") "/bin/perl"))))
                 %standard-phases)))
    (inputs `(("zlib" ,guix:zlib)
              ("ncurses" ,ncurses)
              ("perl" ,perl)))
    (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
    (synopsis
     "util-linux is a random collection of utilities for the Linux kernel")
    (description
     "util-linux is a random collection of utilities for the Linux kernel.")

    ;; Note that util-linux doesn't use the same license for all the
    ;; code.  GPLv2+ is the default license for a code without an
    ;; explicitly defined license.
    (license (list gpl3+ gpl2+ gpl2 lgpl2.0+
                   bsd-4 public-domain))))

(define-public procps
  (package
    (name "procps")
    (version "3.2.8")
    (source (origin
             (method url-fetch)
             (uri (string-append "http://procps.sourceforge.net/procps-"
                                 version ".tar.gz"))
             (sha256
              (base32
               "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i"))))
    (build-system gnu-build-system)
    (inputs `(("ncurses" ,ncurses)
              ("patch/make-3.82" ,(search-patch "procps-make-3.82.patch"))))
    (arguments
     '(#:patches (list (assoc-ref %build-inputs "patch/make-3.82"))
       #:phases (alist-replace
                 'configure
                 (lambda* (#:key outputs #:allow-other-keys)
                   ;; No `configure', just a single Makefile.
                   (let ((out (assoc-ref outputs "out")))
                     (substitute* "Makefile"
                       (("/usr/") "/")
                       (("--(owner|group) 0") "")
                       (("ldconfig") "true")
                       (("^LDFLAGS[[:blank:]]*:=(.*)$" _ value)
                        ;; Add libproc to the RPATH.
                        (string-append "LDFLAGS := -Wl,-rpath="
                                       out "/lib" value))))
                   (setenv "CC" "gcc"))
                 (alist-replace
                  'install
                  (lambda* (#:key outputs #:allow-other-keys)
                    (let ((out (assoc-ref outputs "out")))
                      (and (zero?
                            (system* "make" "install"
                                     (string-append "DESTDIR=" out)))

                           ;; Sanity check.
                           (zero?
                            (system* (string-append out "/bin/ps")
                                     "--version")))))
                  %standard-phases))

       ;; What did you expect?  Tests?
       #:tests? #f))
    (home-page "http://procps.sourceforge.net/")
    (synopsis
     "Utilities that give information about processes using the /proc filesystem")
    (description
     "procps is the package that has a bunch of small useful utilities
that give information about processes using the Linux /proc file system.
The package includes the programs ps, top, vmstat, w, kill, free,
slabtop, and skill.")
    (license gpl2)))

(define-public usbutils
  (package
    (name "usbutils")
    (version "006")
    (source
     (origin
      (method url-fetch)
      (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
                          "usbutils-" version ".tar.xz"))
      (sha256
       (base32
        "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
    (build-system gnu-build-system)
    (inputs
     `(("libusb" ,libusb) ("pkg-config" ,pkg-config)))
    (home-page "http://www.linux-usb.org/")
    (synopsis
     "Tools for working with USB devices, such as lsusb")
    (description
     "Tools for working with USB devices, such as lsusb.")
    (license gpl2+)))

(define-public e2fsprogs
  (package
    (name "e2fsprogs")
    (version "1.42.7")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://sourceforge/e2fsprogs/e2fsprogs-"
                                 version ".tar.gz"))
             (sha256
              (base32
               "0ibkkvp6kan0hn0d1anq4n2md70j5gcm7mwna515w82xwyr02rfw"))))
    (build-system gnu-build-system)
    (inputs `(("util-linux" ,util-linux)
              ("pkg-config" ,pkg-config)))
    (arguments
     '(#:phases (alist-cons-before
                 'configure 'patch-shells
                 (lambda _
                   (substitute* "configure"
                     (("/bin/sh (.*)parse-types.sh" _ dir)
                      (string-append (which "sh") " " dir
                                     "parse-types.sh")))
                   (substitute* (find-files "." "^Makefile.in$")
                     (("#!/bin/sh")
                      (string-append "#!" (which "sh")))))
                 %standard-phases)

       ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
       ;; they fail because we get an extra line that says "Can't check if
       ;; filesystem is mounted due to missing mtab file".
       #:tests? #f))
    (home-page "http://e2fsprogs.sourceforge.net/")
    (synopsis "Tools for creating and checking ext2/ext3/ext4 filesystems")
    (description
     "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
    (license (list gpl2                           ; programs
                   lgpl2.0                        ; libext2fs
                   x11))))                        ; libuuid

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-02-15 20:11                                                                                                                                             ` Nikita Karetnikov
@ 2013-02-16 21:07                                                                                                                                               ` Ludovic Courtès
  2013-02-19  9:49                                                                                                                                                 ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-02-16 21:07 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> Actually, even better would be do that in host code, as done with
>> ‘glibc-dynamic-linker’:
>
> What do you mean by "host code"?

I mean code that runs in your ‘guix-build’ process, as opposed to
builder code running in the chroot (search the manual for “strata”.)

> The attached recipe raises the following:
>
> make: *** No rule to make target `defconfig'.  Stop.
>
> [...]
>
> starting phase `build'

You have a parenthesis issue here:

         (build-phase
          (lambda (arch)
            `(lambda _
               (setenv "ARCH" ,(system->linux-architecture arch))
               (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))

             (and (zero? (system* "make" "defconfig"))
                  (zero? (system* "make" "mrproper" "headers_check")))))

“make defconfig” & co. should be done in the quoted lambda expression,
as was the case before.

HTH,
Ludo’.

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

* Re: Porting to mips64el
  2013-02-16 21:07                                                                                                                                               ` Ludovic Courtès
@ 2013-02-19  9:49                                                                                                                                                 ` Nikita Karetnikov
  2013-02-19 10:19                                                                                                                                                   ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-02-19  9:49 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix


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

>> What do you mean by "host code"?

> I mean code that runs in your ‘guix-build’ process, as opposed to
> builder code running in the chroot (search the manual for “strata”.)

I've read the manual.  But it's still not clear.

For example: How can I tell which expression is run by a Guile process
launched by the daemon?

Build succeeded; I'm attaching the patch.  (Andreas, could you test it?)
Is it OK to push?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Set-ARCH-to-mips.patch --]
[-- Type: text/x-diff, Size: 2300 bytes --]

From 92f945333f8fa31c855e75ea59d274d457656cfe Mon Sep 17 00:00:00 2001
From: Nikita Karetnikov <nikita@karetnikov.org>
Date: Tue, 19 Feb 2013 09:37:11 +0000
Subject: [PATCH] gnu: Set 'ARCH' to 'mips'.

* gnu/packages/linux.scm (system->linux-architecture): New procedure.
  (linux-libre-headers): Adjust accordingly.
---
 gnu/packages/linux.scm | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 58cddc0..e88c6ae 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -31,18 +31,22 @@
   #:use-module (guix download)
   #:use-module (guix build-system gnu))
 
+(define (system->linux-architecture arch)
+  (let ((arch (car (string-split arch #\-))))
+    (cond ((string=? arch "i686") "i386")
+          ((string-prefix? "mips" arch) "mips")
+          (else arch))))
+
 (define-public linux-libre-headers
   (let* ((version* "3.3.8")
          (build-phase
-          '(lambda* (#:key system #:allow-other-keys)
-             (let ((arch (car (string-split system #\-))))
-               (setenv "ARCH"
-                       (cond ((string=? arch "i686") "i386")
-                             (else arch)))
-               (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
+          (lambda (arch)
+            `(lambda _
+               (setenv "ARCH" ,(system->linux-architecture arch))
+               (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
 
-             (and (zero? (system* "make" "defconfig"))
-                  (zero? (system* "make" "mrproper" "headers_check")))))
+               (and (zero? (system* "make" "defconfig"))
+                    (zero? (system* "make" "mrproper" "headers_check"))))))
          (install-phase
           `(lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
@@ -73,7 +77,7 @@
                   (guix build utils)
                   (srfi srfi-1))
        #:phases (alist-replace
-                 'build ,build-phase
+                 'build ,(build-phase (%current-system))
                  (alist-replace
                   'install ,install-phase
                   (alist-delete 'configure %standard-phases)))
-- 
1.8.0.2


[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-02-19  9:49                                                                                                                                                 ` Nikita Karetnikov
@ 2013-02-19 10:19                                                                                                                                                   ` Ludovic Courtès
  0 siblings, 0 replies; 102+ messages in thread
From: Ludovic Courtès @ 2013-02-19 10:19 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>>> What do you mean by "host code"?
>
>> I mean code that runs in your ‘guix-build’ process, as opposed to
>> builder code running in the chroot (search the manual for “strata”.)
>
> I've read the manual.  But it's still not clear.
>
> For example: How can I tell which expression is run by a Guile process
> launched by the daemon?

Basically, anything that ends up as part of the expression passed to
‘build-expression->derivation’ runs in the builder.  In practice, most
of the arguments to ‘gnu-build-system’ are in this category.

I guess I (or anyone else who feels confident) should write doc for
‘gnu-build-system’, and that would help clarify things.

> Build succeeded; I'm attaching the patch.  (Andreas, could you test it?)
> Is it OK to push?

Looks good to me, feel free to push to the ‘mips64el’ branch.

Thanks!

Ludo’.

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

* Re: Porting to mips64el
  2013-02-11 21:34                                                                                                                               ` Andreas Enge
  2013-02-11 22:10                                                                                                                                 ` Ludovic Courtès
@ 2013-02-19 11:05                                                                                                                                 ` Nikita Karetnikov
  2013-02-19 12:54                                                                                                                                   ` Andreas Enge
  1 sibling, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-02-19 11:05 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

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

> Nixos on my machine uses the abi n32 (long and void* have 32 bits, long long
> 64). I would like to switch to abi 64 (long with 64 bits); we might be the
> first distribution supporting this mode.

I think that the above contradicts the following.

> In the debian distribution also installed on the machine,
> there is a separate lib64 directory, and it is enough to pass the flag "-mabi=
> 64" to gcc.

Is it supported in Debian?

Also, what about compatibility?  Are there any downsides?

"But an ABI can be chosen explicitly to make GMP compatible with other
libraries, or particular application requirements." [1]

I'll give it a try if you provide detailed instructions.

[1] http://gmplib.org/manual/ABI-and-ISA.html

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-02-19 11:05                                                                                                                                 ` Nikita Karetnikov
@ 2013-02-19 12:54                                                                                                                                   ` Andreas Enge
  2013-02-19 16:54                                                                                                                                     ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Andreas Enge @ 2013-02-19 12:54 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

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

Am Dienstag, 19. Februar 2013 schrieb Nikita Karetnikov:
> > Nixos on my machine uses the abi n32 (long and void* have 32 bits,
> > long long 64). I would like to switch to abi 64 (long with 64 bits);
> > we might be the first distribution supporting this mode.
> 
> I think that the above contradicts the following.
> 
> > In the debian distribution also installed on the machine,
> > there is a separate lib64 directory, and it is enough to pass the flag
> > "-mabi= 64" to gcc.
> 
> Is it supported in Debian?

Yes, you can compile programs in 64 bit mode. But if you do nothing 
special, they end up being 32 bits. And all packages (except for a few gcc 
libraries and zlib) are 32 bits. My suggestion is to have the full 
distribution in 64 bit abi.

> Also, what about compatibility?  Are there any downsides?

Libraries compiled with one abi are incompatible with libraries compiled 
with another abi. But that would not matter since our system would be 
consistent. Pointers take more space.

> I'll give it a try if you provide detailed instructions.

Good question, I do not know myself yet how to achieve the goal! Maybe it 
would be enough to provide "CFLAGS=-mabi64" in the bootstrap process; or 
'CFLAGS="-march=mips64 -mabi64"'. Or maybe we need to create new bootstrap 
binaries with these flags.

Andreas

[-- Attachment #2: Type: text/html, Size: 5353 bytes --]

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

* Re: Porting to mips64el
  2013-02-19 12:54                                                                                                                                   ` Andreas Enge
@ 2013-02-19 16:54                                                                                                                                     ` Ludovic Courtès
  2013-02-19 18:20                                                                                                                                       ` Andreas Enge
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-02-19 16:54 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

FWIW, there’s a discussion of MIPS ABIs at
<http://www.linux-mips.org/wiki/WhatsWrongWithO32N32N64> and related
pages.

Andreas Enge <andreas@enge.fr> skribis:

> Good question, I do not know myself yet how to achieve the goal! Maybe it 
> would be enough to provide "CFLAGS=-mabi64" in the bootstrap process; or 
> 'CFLAGS="-march=mips64 -mabi64"'. Or maybe we need to create new bootstrap 
> binaries with these flags.

The bootstrap binaries don’t matter much, I think.  What does matter is
to get ‘gcc-boot0’ (a fake cross-compiler) to target the right ABI by
default.  I’m not sure how to do that, though.

Ludo’.

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

* Re: Porting to mips64el
  2013-02-19 16:54                                                                                                                                     ` Ludovic Courtès
@ 2013-02-19 18:20                                                                                                                                       ` Andreas Enge
  2013-02-19 18:44                                                                                                                                         ` Nikita Karetnikov
                                                                                                                                                           ` (2 more replies)
  0 siblings, 3 replies; 102+ messages in thread
From: Andreas Enge @ 2013-02-19 18:20 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

Am Dienstag, 19. Februar 2013 schrieb Ludovic Courtès:
> The bootstrap binaries don’t matter much, I think.  What does matter is
> to get ‘gcc-boot0’ (a fake cross-compiler) to target the right ABI by
> default.  I’m not sure how to do that, though.

I think it might be enough to add the following configure flags:
   --with-arch=mips64 -with-abi=64
I will give it a try.

Before downloading tarballs, the following frightening warning messages are 
shown:

@ build-started /nix/store/lpws7l6w3za1i8c0s4aij94jh8k9vk9p-module-import-
compiled.drv /nix/store/5yx0igcz2ng9wnik260gapxaqzsn3p6l-module-import-
compiled mips64el-linux 
/usr/local/guix/var/log/nix/drvs/lpws7l6w3za1i8c0s4aij94jh8k9vk9p-module-
import-compiled.drv.bz2
;;; /nix/store/7rz9j519bif6y62sh4wj3mij8jalpw5i-module-
import/guix/build/download.scm:110:17: warning: possibly unbound variable 
`make-session'
;;; /nix/store/7rz9j519bif6y62sh4wj3mij8jalpw5i-module-
import/guix/build/download.scm:110:17: warning: possibly unbound variable 
`connection-end/client'
;;; /nix/store/7rz9j519bif6y62sh4wj3mij8jalpw5i-module-
import/guix/build/download.scm:111:4: warning: possibly unbound variable 
`set-session-transport-fd!'
;;; /nix/store/7rz9j519bif6y62sh4wj3mij8jalpw5i-module-
import/guix/build/download.scm:112:4: warning: possibly unbound variable 
`set-session-default-priority!'
;;; /nix/store/7rz9j519bif6y62sh4wj3mij8jalpw5i-module-
import/guix/build/download.scm:113:4: warning: possibly unbound variable 
`set-session-credentials!'
;;; /nix/store/7rz9j519bif6y62sh4wj3mij8jalpw5i-module-
import/guix/build/download.scm:113:38: warning: possibly unbound variable 
`make-certificate-credentials'
;;; /nix/store/7rz9j519bif6y62sh4wj3mij8jalpw5i-module-
import/guix/build/download.scm:119:4: warning: possibly unbound variable 
`handshake'
;;; /nix/store/7rz9j519bif6y62sh4wj3mij8jalpw5i-module-
import/guix/build/download.scm:120:4: warning: possibly unbound variable 
`session-record-port'
@ build-succeeded /nix/store/lpws7l6w3za1i8c0s4aij94jh8k9vk9p-module-
import-compiled.drv /nix/store/5yx0igcz2ng9wnik260gapxaqzsn3p6l-module-
import-compiled

After that things seem to proceed normally.

Andreas

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

* Re: Porting to mips64el
  2013-02-19 18:20                                                                                                                                       ` Andreas Enge
@ 2013-02-19 18:44                                                                                                                                         ` Nikita Karetnikov
  2013-02-19 21:26                                                                                                                                         ` Ludovic Courtès
  2013-02-20  9:30                                                                                                                                         ` Andreas Enge
  2 siblings, 0 replies; 102+ messages in thread
From: Nikita Karetnikov @ 2013-02-19 18:44 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

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

> I will give it a try.

Thanks.

> Before downloading tarballs, the following frightening warning messages are 
> shown:

'guix/build/download.scm':

;; Autoload GnuTLS so that this module can be used even when GnuTLS is
;; not available.  At compile time, this yields "possibly unbound
;; variable" warnings, but these are OK: we know that the variables will
;; be bound if we need them, because (guix download) adds GnuTLS as an
;; input in that case.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-02-19 18:20                                                                                                                                       ` Andreas Enge
  2013-02-19 18:44                                                                                                                                         ` Nikita Karetnikov
@ 2013-02-19 21:26                                                                                                                                         ` Ludovic Courtès
  2013-02-20  9:30                                                                                                                                         ` Andreas Enge
  2 siblings, 0 replies; 102+ messages in thread
From: Ludovic Courtès @ 2013-02-19 21:26 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Andreas Enge <andreas@enge.fr> skribis:

> Am Dienstag, 19. Februar 2013 schrieb Ludovic Courtès:
>> The bootstrap binaries don’t matter much, I think.  What does matter is
>> to get ‘gcc-boot0’ (a fake cross-compiler) to target the right ABI by
>> default.  I’m not sure how to do that, though.
>
> I think it might be enough to add the following configure flags:
>    --with-arch=mips64 -with-abi=64
> I will give it a try.

Oh right, it’s mentioned in the manual (info "(gccinstall) Configuration").

> Before downloading tarballs, the following frightening warning messages are 
> shown:
>
> @ build-started /nix/store/lpws7l6w3za1i8c0s4aij94jh8k9vk9p-module-import-
> compiled.drv /nix/store/5yx0igcz2ng9wnik260gapxaqzsn3p6l-module-import-
> compiled mips64el-linux 
> /usr/local/guix/var/log/nix/drvs/lpws7l6w3za1i8c0s4aij94jh8k9vk9p-module-
> import-compiled.drv.bz2
> ;;; /nix/store/7rz9j519bif6y62sh4wj3mij8jalpw5i-module-
> import/guix/build/download.scm:110:17: warning: possibly unbound variable 
> `make-session'

These relate to GnuTLS, and it’s normal, see
<http://lists.gnu.org/archive/html/bug-guix/2013-01/msg00255.html>.
Basically (guix build download) can be dynamically linked against
GnuTLS, at run time, but it works fine without it too.

Thanks,
Ludo’.

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

* Re: Porting to mips64el
  2013-02-19 18:20                                                                                                                                       ` Andreas Enge
  2013-02-19 18:44                                                                                                                                         ` Nikita Karetnikov
  2013-02-19 21:26                                                                                                                                         ` Ludovic Courtès
@ 2013-02-20  9:30                                                                                                                                         ` Andreas Enge
  2013-02-20 11:40                                                                                                                                           ` Ludovic Courtès
  2 siblings, 1 reply; 102+ messages in thread
From: Andreas Enge @ 2013-02-20  9:30 UTC (permalink / raw)
  To: bug-guix

Am Dienstag, 19. Februar 2013 schrieb Andreas Enge:
> I think it might be enough to add the following configure flags:
>    --with-arch=mips64 -with-abi=64

Unfortunately, it failed after some compilation time with

make[2]: Leaving directory `/tmp/nix-build-gcc-cross-
boot0-4.7.2.drv-0/build/gcc'
Checking multilib configuration for libgcc...
mkdir -p -- mips64el-guix-linux-gnu/libgcc
Configuring in mips64el-guix-linux-gnu/libgcc
configure: creating cache ./config.cache
checking build system type... mips64el-unknown-linux-gnu
checking host system type... mips64el-guix-linux-gnu
checking for --enable-version-specific-runtime-libs... no
checking for a BSD-compatible install... 
/nix/store/n76w1w24p7llqxayqg2nhf69cx2fwqx9-bootstrap-
binaries-0/bin/install -c
checking for gawk... gawk
checking for mips64el-guix-linux-gnu-ar... mips64el-guix-linux-gnu-ar
checking for mips64el-guix-linux-gnu-lipo... mips64el-guix-linux-gnu-lipo
checking for mips64el-guix-linux-gnu-nm... /tmp/nix-build-gcc-cross-
boot0-4.7.2.drv-0/build/./gcc/nm
checking for mips64el-guix-linux-gnu-ranlib... mips64el-guix-linux-gnu-
ranlib
checking for mips64el-guix-linux-gnu-strip... mips64el-guix-linux-gnu-strip
checking whether ln -s works... yes
checking for mips64el-guix-linux-gnu-gcc... /tmp/nix-build-gcc-cross-
boot0-4.7.2.drv-0/build/./gcc/xgcc -B/tmp/nix-build-gcc-cross-
boot0-4.7.2.drv-0/build/./gcc/ -
B/nix/store/m3wmr929pkbcs2j2fqqsjla17400v0xl-gcc-cross-
boot0-4.7.2/mips64el-guix-linux-gnu/bin/ -
B/nix/store/m3wmr929pkbcs2j2fqqsjla17400v0xl-gcc-cross-
boot0-4.7.2/mips64el-guix-linux-gnu/lib/ -isystem 
/nix/store/m3wmr929pkbcs2j2fqqsjla17400v0xl-gcc-cross-boot0-4.7.2/mips64el-
guix-linux-gnu/include -isystem 
/nix/store/m3wmr929pkbcs2j2fqqsjla17400v0xl-gcc-cross-boot0-4.7.2/mips64el-
guix-linux-gnu/sys-include   
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /tmp/nix-build-gcc-cross-
boot0-4.7.2.drv-0/build/./gcc/xgcc -B/tmp/nix-build-gcc-cross-
boot0-4.7.2.drv-0/build/./gcc/ -
B/nix/store/m3wmr929pkbcs2j2fqqsjla17400v0xl-gcc-cross-
boot0-4.7.2/mips64el-guix-linux-gnu/bin/ -
B/nix/store/m3wmr929pkbcs2j2fqqsjla17400v0xl-gcc-cross-
boot0-4.7.2/mips64el-guix-linux-gnu/lib/ -isystem 
/nix/store/m3wmr929pkbcs2j2fqqsjla17400v0xl-gcc-cross-boot0-4.7.2/mips64el-
guix-linux-gnu/include -isystem 
/nix/store/m3wmr929pkbcs2j2fqqsjla17400v0xl-gcc-cross-boot0-4.7.2/mips64el-
guix-linux-gnu/sys-include    accepts -g... yes
checking for /tmp/nix-build-gcc-cross-boot0-4.7.2.drv-0/build/./gcc/xgcc -
B/tmp/nix-build-gcc-cross-boot0-4.7.2.drv-0/build/./gcc/ -
B/nix/store/m3wmr929pkbcs2j2fqqsjla17400v0xl-gcc-cross-
boot0-4.7.2/mips64el-guix-linux-gnu/bin/ -
B/nix/store/m3wmr929pkbcs2j2fqqsjla17400v0xl-gcc-cross-
boot0-4.7.2/mips64el-guix-linux-gnu/lib/ -isystem 
/nix/store/m3wmr929pkbcs2j2fqqsjla17400v0xl-gcc-cross-boot0-4.7.2/mips64el-
guix-linux-gnu/include -isystem 
/nix/store/m3wmr929pkbcs2j2fqqsjla17400v0xl-gcc-cross-boot0-4.7.2/mips64el-
guix-linux-gnu/sys-include    option to accept ISO C89... unsupported
checking how to run the C preprocessor... /lib/cpp
configure: error: in `/tmp/nix-build-gcc-cross-
boot0-4.7.2.drv-0/build/mips64el-guix-linux-gnu/libgcc':
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory `/tmp/nix-build-gcc-cross-
boot0-4.7.2.drv-0/build'
make: *** [all] Error 2
phase `build' failed after 7571 seconds
builder for `/nix/store/aw84x050w59la6a5y7zxr5jymq2xcnbk-gcc-cross-
boot0-4.7.2.drv' failed with exit code 1

Then everything just hangs. Unfortunately, I forgot the "-K" parameter and 
thus lost config.log.

My guess would be that gcc compiled correctly in 64 bit mode, but that the 
configure for libgcc relies on the 32 bit cpp of the system instead of its 
own.

In libgcc/configure, there is a line
   for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
(as well as in the other lib* subdirectories); maybe this needs to be 
patched? Or something else is missing for cross-compiling?

Strangely, a new run of "guix-build hello" starts by building linux-libre-
headers instead of gcc-cross-boot0.

Andreas

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

* Re: Porting to mips64el
  2013-02-20  9:30                                                                                                                                         ` Andreas Enge
@ 2013-02-20 11:40                                                                                                                                           ` Ludovic Courtès
  2013-02-20 16:25                                                                                                                                             ` Andreas Enge
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-02-20 11:40 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Andreas Enge <andreas@enge.fr> skribis:

> Am Dienstag, 19. Februar 2013 schrieb Andreas Enge:
>> I think it might be enough to add the following configure flags:
>>    --with-arch=mips64 -with-abi=64
>
> Unfortunately, it failed after some compilation time with

[...]

> checking how to run the C preprocessor... /lib/cpp
> configure: error: in `/tmp/nix-build-gcc-cross-
> boot0-4.7.2.drv-0/build/mips64el-guix-linux-gnu/libgcc':
> configure: error: C preprocessor "/lib/cpp" fails sanity check
> See `config.log' for more details.

Can you try to get the config.log file?  It tries /lib/cpp as a last
resort because “xgcc -E” didn’t work, so we need to find out why it
didn’t work.

How exactly did you modify gcc-boot0?

> Strangely, a new run of "guix-build hello" starts by building linux-libre-
> headers instead of gcc-cross-boot0.

Since linux-libre-headers doesn’t depend on gcc-cross-boot0, that’s a
valid choice.

Ludo’.

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

* Re: Porting to mips64el
  2013-02-20 11:40                                                                                                                                           ` Ludovic Courtès
@ 2013-02-20 16:25                                                                                                                                             ` Andreas Enge
  2013-02-20 17:05                                                                                                                                               ` Ludovic Courtès
  2013-02-20 17:42                                                                                                                                               ` Nikita Karetnikov
  0 siblings, 2 replies; 102+ messages in thread
From: Andreas Enge @ 2013-02-20 16:25 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

Am Mittwoch, 20. Februar 2013 schrieb Ludovic Courtès:
> How exactly did you modify gcc-boot0?

For the time being, I simply hard-coded two additional configure flags:

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 5c39ec3..25e07bc 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -705,6 +705,10 @@ identifier SYSTEM."
                             ;; No libc yet.
                             "--without-headers"
 
+                            ;; special options for mips64
+                            "--with-arch=mips64"
+                            "--with-abi=64"
+
                             ;; Disable features not needed at this stage.

The problem is apparently in the bootstrap glibc, which does not contain 
the 64 bit headers. config.log shows that the freshly compiled xgcc does 
not compile a file, with the following error message:

configure:3792: /tmp/nix-build-gcc-cross-boot0-4.7.2.drv-0/build/./gcc/xgcc 
-B/tmp/nix-build-gcc-cross-boot0-4.7.2.drv-0/build/./gcc/ -
B/nix/store/m3wmr929pkbcs2j2fqqsjla17400v0xl-gcc-cross-
boot0-4.7.2/mips64el-guix-linux-gnu/bin/ -
B/nix/store/m3wmr929pkbcs2j2fqqsjla17400v0xl-gcc-cross-
boot0-4.7.2/mips64el-guix-linux-gnu/lib/ -isystem 
/nix/store/m3wmr929pkbcs2j2fqqsjla17400v0xl-gcc-cross-boot0-4.7.2/mips64el-
guix-linux-gnu/include -isystem 
/nix/store/m3wmr929pkbcs2j2fqqsjla17400v0xl-gcc-cross-boot0-4.7.2/mips64el-
guix-linux-gnu/sys-include     -c -g -O2 -minterlink-mips16  conftest.c >&5
In file included from /nix/store/j2gf9gm512s8y64pgvw84258p3qsqfkq-glibc-
bootstrap-0/include/features.h:399:0,
                 from /nix/store/j2gf9gm512s8y64pgvw84258p3qsqfkq-glibc-
bootstrap-0/include/stdio.h:27,
                 from conftest.c:10:
/nix/store/j2gf9gm512s8y64pgvw84258p3qsqfkq-glibc-
bootstrap-0/include/gnu/stubs.h:23:33: fatal error: gnu/stubs-n64_hard.h: 
No such file or directory

The file
/nix/store/j2gf9gm512s8y64pgvw84258p3qsqfkq-glibc-
bootstrap-0/include/gnu/stubs.h
tries to include stubs-n64_hard.h ("hard" standing for "hard float");
but there is only a stubs-n32_hard.h in the directory.

If I understand things correctly, we need a new set of bootstrap binaries, 
compiled with
   CFLAGS="-march=mips64 -mabi=64"
Could you maybe provide some, Nikita? Or am I mistaken?

glibc also provides the option "--enable-multi-arch", to have 32 and 64 bit 
libraries on the same system. But then first the binutils need to provide 
several flavours of programs, and this looks like a much more difficult 
approach.

Andreas

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

* Re: Porting to mips64el
  2013-02-20 16:25                                                                                                                                             ` Andreas Enge
@ 2013-02-20 17:05                                                                                                                                               ` Ludovic Courtès
  2013-02-20 17:42                                                                                                                                               ` Nikita Karetnikov
  1 sibling, 0 replies; 102+ messages in thread
From: Ludovic Courtès @ 2013-02-20 17:05 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Andreas Enge <andreas@enge.fr> skribis:

> The file
> /nix/store/j2gf9gm512s8y64pgvw84258p3qsqfkq-glibc-
> bootstrap-0/include/gnu/stubs.h
> tries to include stubs-n64_hard.h ("hard" standing for "hard float");
> but there is only a stubs-n32_hard.h in the directory.

Ah I see, that’s because the glibc-bootstrap-0 is an N32 build, so it
doesn’t come with the 64-bit headers.

Normally gcc-cross-boot0 wouldn’t refer to it (because it’s built
--without-headers), but since we have $CPATH pointing to it, it ends up
referring to it whether we like it or not.  See
<http://gcc.gnu.org/ml/gcc/2013-02/msg00124.html> on that topic.

So in practice we’d need to have a 64-bit bootstrap glibc to solve
that.  Bummer.

Ludo’.

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

* Re: Porting to mips64el
  2013-02-20 16:25                                                                                                                                             ` Andreas Enge
  2013-02-20 17:05                                                                                                                                               ` Ludovic Courtès
@ 2013-02-20 17:42                                                                                                                                               ` Nikita Karetnikov
  2013-02-20 19:24                                                                                                                                                 ` Andreas Enge
  1 sibling, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-02-20 17:42 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

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

> Could you maybe provide some, Nikita?

Sure.  But what should I do?

Should I adjust '%bootstrap-glibc' somehow?

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-02-20 17:42                                                                                                                                               ` Nikita Karetnikov
@ 2013-02-20 19:24                                                                                                                                                 ` Andreas Enge
  2013-02-20 20:03                                                                                                                                                   ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Andreas Enge @ 2013-02-20 19:24 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Am Mittwoch, 20. Februar 2013 schrieb Nikita Karetnikov:
> > Could you maybe provide some, Nikita?
> Sure.  But what should I do?
> Should I adjust '%bootstrap-glibc' somehow?

I think adding something like
    (arguments
     '(#:configure-flags
       (list "CFLAGS=-march=mips64 -mabi=64")))
to %bootstrap-glibc or maybe %glibc-for-bootstrap (whatever is used to 
obtain the bootstrap glibc) should do the trick.

Then maybe the same is needed for the other bootstrap programs.

For gcc, I would give the same options as I tried in gcc-boot0 instead, 
that is, (list "--with-arch=mips64" "--with-abi=64").

Ludovic, what do you think?

Andreas

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

* Re: Porting to mips64el
  2013-02-20 19:24                                                                                                                                                 ` Andreas Enge
@ 2013-02-20 20:03                                                                                                                                                   ` Ludovic Courtès
  2013-02-20 23:38                                                                                                                                                     ` Porting to anything Andreas Enge
  2013-02-21 16:48                                                                                                                                                     ` Porting to mips64el Nikita Karetnikov
  0 siblings, 2 replies; 102+ messages in thread
From: Ludovic Courtès @ 2013-02-20 20:03 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Andreas Enge <andreas@enge.fr> skribis:

> Am Mittwoch, 20. Februar 2013 schrieb Nikita Karetnikov:
>> > Could you maybe provide some, Nikita?
>> Sure.  But what should I do?
>> Should I adjust '%bootstrap-glibc' somehow?
>
> I think adding something like
>     (arguments
>      '(#:configure-flags
>        (list "CFLAGS=-march=mips64 -mabi=64")))
> to %bootstrap-glibc or maybe %glibc-for-bootstrap (whatever is used to 
> obtain the bootstrap glibc) should do the trick.

It’s %glibc-for-bootstrap in make-bootstrap.scm.

You would actually add those CFLAGS to the configure flags already in there.

> Then maybe the same is needed for the other bootstrap programs.
>
> For gcc, I would give the same options as I tried in gcc-boot0 instead, 
> that is, (list "--with-arch=mips64" "--with-abi=64").
>
> Ludovic, what do you think?

Well, what matters most is glibc, because one you have it’s enough to
build gcc-boot0 to N64.

Now, for consistency, it may be easier to rebuild all of them in 64 bit.

Thanks,
Ludo’.

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

* Porting to anything
  2013-02-20 20:03                                                                                                                                                   ` Ludovic Courtès
@ 2013-02-20 23:38                                                                                                                                                     ` Andreas Enge
  2013-02-21  9:36                                                                                                                                                       ` Ludovic Courtès
  2013-02-21 16:48                                                                                                                                                     ` Porting to mips64el Nikita Karetnikov
  1 sibling, 1 reply; 102+ messages in thread
From: Andreas Enge @ 2013-02-20 23:38 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

The currently unsatisfying situation, according to "HACKING", is that 
bootstrapping guix essentially starts by installing (and thus in the worst 
case porting) nix.

I have spent the evening working on a shell script automating the 
compilation of the bootstrap binaries. Unsurprisingly, I end up 
reprogramming in shell part of make-bootstrap.scm. (In particular, it cost 
me some time to understand how to obtain statically linked binaries of the 
binutils.) And I am only halfway through, and maybe made some errors in the 
process that will only reveal themselves later.

So I wonder whether the dependency on nix is essential in make-
bootstrap.scm. Could one not renounce at working in a chroot with defined 
inputs from nix, and execute the exact same code in the current 
environment, using the programs available in the current system from the 
user's path? Then guix could be bootstrapped easily on any gnu/linux 
system.

Andreas

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

* Re: Porting to anything
  2013-02-20 23:38                                                                                                                                                     ` Porting to anything Andreas Enge
@ 2013-02-21  9:36                                                                                                                                                       ` Ludovic Courtès
  2013-02-21  9:56                                                                                                                                                         ` Andreas Enge
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-02-21  9:36 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Andreas Enge <andreas@enge.fr> skribis:

> The currently unsatisfying situation, according to "HACKING", is that 
> bootstrapping guix essentially starts by installing (and thus in the worst 
> case porting) nix.

Agreed.

> I have spent the evening working on a shell script automating the 
> compilation of the bootstrap binaries. Unsurprisingly, I end up 
> reprogramming in shell part of make-bootstrap.scm. (In particular, it cost 
> me some time to understand how to obtain statically linked binaries of the 
> binutils.) And I am only halfway through, and maybe made some errors in the 
> process that will only reveal themselves later.

Isn’t it equally unsatisfying?  :-)

> So I wonder whether the dependency on nix is essential in make-
> bootstrap.scm. Could one not renounce at working in a chroot with defined 
> inputs from nix, and execute the exact same code in the current 
> environment, using the programs available in the current system from the 
> user's path? Then guix could be bootstrapped easily on any gnu/linux 
> system.

Yes.  I outlined a plan in
<http://lists.gnu.org/archive/html/bug-guix/2013-01/msg00099.html>.

However, I really think cross-compilation is the way to go.  I have a
tentative set of packages for the cross-toolchain that’s not fully baked
yet, and then we’ll have to adjust gnu-build-system to support
cross-compilation.

So that won’t happen overnight, but we could work toward that goal for
the next month or so.

WDYT?

Ludo’, who sympathizes with the feeling of frustration.  :-/

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

* Re: Porting to anything
  2013-02-21  9:36                                                                                                                                                       ` Ludovic Courtès
@ 2013-02-21  9:56                                                                                                                                                         ` Andreas Enge
  0 siblings, 0 replies; 102+ messages in thread
From: Andreas Enge @ 2013-02-21  9:56 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

Am Donnerstag, 21. Februar 2013 schrieb Ludovic Courtès:
> Isn’t it equally unsatisfying?  :-)

Exactly, whence my message.

> Yes.  I outlined a plan in
> <http://lists.gnu.org/archive/html/bug-guix/2013-01/msg00099.html>.
> 
> However, I really think cross-compilation is the way to go.

Your plan in the message above sounds good, and implementable rather 
quickly. From my manual experiments over the past two weeks with cross 
compiling, I am less optimistic about the feasability of the second 
suggestion. Doing everything with the "native" tools (coming from a debian 
installation, for instance, which is widely ported) on the target machine 
sounds much easier.

The devil is really in the details. Just looking at the totally different 
ways of obtaining statically linked binaries for the different gnu projects 
we need for bootstrapping makes me weary of big integrated plans. In my 
naivety, I thought it would be enough to add "--enable-static --disable-
shared" as configure flags, but one ends up patching Makefile.in, adding 
LDFLAGS or AM_LDFLAGS, and working around subtle bugs here and there... So 
let us go for the easiest path, and your first suggestion is very close to 
what is already there.

Andreas

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

* Re: Porting to mips64el
  2013-02-20 20:03                                                                                                                                                   ` Ludovic Courtès
  2013-02-20 23:38                                                                                                                                                     ` Porting to anything Andreas Enge
@ 2013-02-21 16:48                                                                                                                                                     ` Nikita Karetnikov
  2013-02-21 18:44                                                                                                                                                       ` Nikita Karetnikov
  1 sibling, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-02-21 16:48 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

>> I think adding something like
>>     (arguments
>>      '(#:configure-flags
>>        (list "CFLAGS=-march=mips64 -mabi=64")))
>> to %bootstrap-glibc or maybe %glibc-for-bootstrap (whatever is used to 
>> obtain the bootstrap glibc) should do the trick.

> It’s %glibc-for-bootstrap in make-bootstrap.scm.

> You would actually add those CFLAGS to the configure flags already in there.

OK, I added the above.  I'm going to build the bootstrap tarballs (as
suggested in 'HACKING').

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-02-21 16:48                                                                                                                                                     ` Porting to mips64el Nikita Karetnikov
@ 2013-02-21 18:44                                                                                                                                                       ` Nikita Karetnikov
  2013-02-21 21:47                                                                                                                                                         ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-02-21 18:44 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> OK, I added the above.  I'm going to build the bootstrap tarballs (as
> suggested in 'HACKING').

I aborted the process because there were lines like '-mabi=n32' in the
output.

I added these flags

  "--with-arch=mips64"
  "--with-abi=64"

to 'gcc-boot0' and tried again.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-02-21 18:44                                                                                                                                                       ` Nikita Karetnikov
@ 2013-02-21 21:47                                                                                                                                                         ` Nikita Karetnikov
  2013-02-23 18:53                                                                                                                                                           ` Andreas Enge
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-02-21 21:47 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> I aborted the process because there were lines like '-mabi=n32' in the
> output.

> I added these flags

>   "--with-arch=mips64"
>   "--with-abi=64"

> to 'gcc-boot0' and tried again.

The above didn't help.  '-mabi=n32' lines appeared again (when it was
building 'glibc-intermediate-2.17').

What should I try now?

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-02-21 21:47                                                                                                                                                         ` Nikita Karetnikov
@ 2013-02-23 18:53                                                                                                                                                           ` Andreas Enge
  2013-02-23 18:56                                                                                                                                                             ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Andreas Enge @ 2013-02-23 18:53 UTC (permalink / raw)
  To: bug-guix

Am Donnerstag, 21. Februar 2013 schrieb Nikita Karetnikov:
> What should I try now?

Did you already get the glibc, or did the problems appear before? Maybe it 
would be enough to just replace the glibc with one that contains the 64 bit 
headers.

I tried to compile glibc independently with
   CFLAGS="-march=mips64 -mabi=64 -O2"
just to obtain the header file, but it fails with

make[2]: Entering directory `/tmp/glibc-2.17/nptl'
ln -f /tmp/build/nptl/crti.o /tmp/build/nptl/64/crti.o
ln -f /tmp/build/nptl/crtn.o /tmp/build/nptl/64/crtn.o
gcc -mabi=64 pthread_kill_other_threads.c -c -std=gnu99 -fgnu89-inline  -O2 
-Wall -Winline -Wwrite-strings -fmerge-all-constants -frounding-math -
mabi=64 -march=mips64 -Wstrict-prototypes   -fPIC       -I../include -
I/tmp/build/nptl -I/tmp/build -
I../ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl -
I../ports/sysdeps/unix/sysv/linux/mips/mips64/n64 -
I../ports/sysdeps/unix/sysv/linux/mips/mips64/nptl -
I../ports/sysdeps/unix/sysv/linux/mips/mips64 -
I../ports/sysdeps/unix/sysv/linux/mips/nptl -
I../ports/sysdeps/unix/sysv/linux/mips -I../nptl/sysdeps/unix/sysv/linux -
I../nptl/sysdeps/pthread -I../sysdeps/pthread -
I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -
I../sysdeps/gnu -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -
I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -
I../ports/sysdeps/unix/mips/mips64/n64 -I../ports/sysdeps/unix/mips/mips64 
-I../ports/sysdeps/unix/mips -I../nptl/sysdeps/unix -I../ports/sysdeps/unix 
-I../sysdeps/unix -I../sysdeps/posix -I../ports/sysdeps/mips/mips64/n64 -
I../ports/sysdeps/mips/ieee754 -I../sysdeps/ieee754/ldbl-128 -
I../ports/sysdeps/mips/mips64/soft-fp -I../ports/sysdeps/mips/mips64 -
I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -
I../ports/sysdeps/mips -I../sysdeps/wordsize-64 -I../ports/sysdeps/mips/fpu 
-I../ports/sysdeps/mips/nptl -I../sysdeps/ieee754 -I../sysdeps/generic -
I../nptl -I../ports  -I.. -I../libio -I.   -D_LIBC_REENTRANT -include 
../include/libc-symbols.h  -DPIC -DSHARED -DNOT_IN_libc=1 -
DIS_IN_libpthread=1 -DIN_LIB=libpthread    -o 
/tmp/build/nptl/pthread_kill_other_threads.os -MD -MP -MF 
/tmp/build/nptl/pthread_kill_other_threads.os.dt -MT 
/tmp/build/nptl/pthread_kill_other_threads.os
pthread_kill_other_threads.c:34:1: error: expected identifier or ‘(’ before 
‘...’ token
make[2]: *** [/tmp/build/nptl/pthread_kill_other_threads.os] Error 1
make[2]: Leaving directory `/tmp/glibc-2.17/nptl'

Unless you have the glibc at hand, I would drop the issue for the moment 
and wait for Ludovic to finish implementing the cross compiling approach.

Andreas

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

* Re: Porting to mips64el
  2013-02-23 18:53                                                                                                                                                           ` Andreas Enge
@ 2013-02-23 18:56                                                                                                                                                             ` Ludovic Courtès
  2013-03-03 15:01                                                                                                                                                               ` Nikita Karetnikov
  0 siblings, 1 reply; 102+ messages in thread
From: Ludovic Courtès @ 2013-02-23 18:56 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Andreas Enge <andreas@enge.fr> skribis:

> Unless you have the glibc at hand, I would drop the issue for the moment 

Agreed.

> and wait for Ludovic to finish implementing the cross compiling approach.

I’m making progress, but it may still be a week before it’s all in place.

Ludo’.

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

* Re: Porting to mips64el
  2013-02-23 18:56                                                                                                                                                             ` Ludovic Courtès
@ 2013-03-03 15:01                                                                                                                                                               ` Nikita Karetnikov
  2013-03-03 21:26                                                                                                                                                                 ` Ludovic Courtès
  0 siblings, 1 reply; 102+ messages in thread
From: Nikita Karetnikov @ 2013-03-03 15:01 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> I’m making progress, but it may still be a week before it’s all in
> place.

I'm willing to try this [1].  What should I adjust to build with n64?
(My previous attempt: [2].)

[1] https://lists.gnu.org/archive/html/bug-guix/2013-02/msg00290.html
[2] https://lists.gnu.org/archive/html/bug-guix/2013-02/msg00247.html

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Porting to mips64el
  2013-03-03 15:01                                                                                                                                                               ` Nikita Karetnikov
@ 2013-03-03 21:26                                                                                                                                                                 ` Ludovic Courtès
  0 siblings, 0 replies; 102+ messages in thread
From: Ludovic Courtès @ 2013-03-03 21:26 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> I’m making progress, but it may still be a week before it’s all in
>> place.
>
> I'm willing to try this [1].  What should I adjust to build with n64?
> (My previous attempt: [2].)
>
> [1] https://lists.gnu.org/archive/html/bug-guix/2013-02/msg00290.html
> [2] https://lists.gnu.org/archive/html/bug-guix/2013-02/msg00247.html

To get a cross-toolchain for MIPS/n64, you would need to adjust
cross-base.scm to pass --with-arch and similar flags somehow.

But then all you get is a cross-toolchain.  In the absence of special
support from Guix, you’d have to build things manually with that
cross-toolchain, which won’t be particularly great.

I’d rather give a first stab at Guix support for cross-compilation, so
you can start using it.

WDYT?

Ludo’.

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

end of thread, other threads:[~2013-03-03 21:26 UTC | newest]

Thread overview: 102+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-24 19:43 mips64el: No such file or directory: "/nix/store/*-glibc-2.13.drv" Nikita Karetnikov
2012-12-30 15:17 ` Ludovic Courtès
2012-12-30 16:14   ` Nikita Karetnikov
2012-12-30 17:58     ` Ludovic Courtès
2012-12-30 20:40       ` Nikita Karetnikov
2012-12-30 21:20         ` Ludovic Courtès
2012-12-30 22:43           ` Nikita Karetnikov
2012-12-31 12:21             ` Ludovic Courtès
2013-01-08 13:26               ` Porting to mips64el (was: mips64el: No such file or directory: "/nix/store/*-glibc-2.13.drv") Nikita Karetnikov
2013-01-08 13:34                 ` Porting to mips64el Ludovic Courtès
2013-01-08 14:52                   ` Nikita Karetnikov
2013-01-08 16:30                     ` Ludovic Courtès
2013-01-08 18:18                       ` Nikita Karetnikov
2013-01-08 20:50                         ` Ludovic Courtès
2013-01-09 15:53                           ` Nikita Karetnikov
2013-01-09 21:42                             ` Ludovic Courtès
2013-01-11  4:08                               ` Nikita Karetnikov
2013-01-11 13:28                                 ` Ludovic Courtès
2013-01-11 21:49                                   ` Nikita Karetnikov
2013-01-11 23:44                                     ` Ludovic Courtès
2013-01-12 14:49                                       ` Nikita Karetnikov
2013-01-12 15:06                                         ` Ludovic Courtès
2013-01-12 15:46                                           ` Nikita Karetnikov
2013-01-12 21:01                                             ` Ludovic Courtès
2013-01-12 23:00                                               ` Nikita Karetnikov
2013-01-13 20:49                                                 ` Ludovic Courtès
2013-01-19 16:49                                                   ` Nikita Karetnikov
2013-01-19 17:45                                                     ` Ludovic Courtès
2013-01-20  7:39                                                       ` Nikita Karetnikov
2013-01-20 14:33                                                         ` Ludovic Courtès
2013-01-22 22:51                                                           ` Nikita Karetnikov
2013-01-23  5:01                                                             ` Nikita Karetnikov
2013-01-23 15:35                                                               ` Ludovic Courtès
2013-01-23 22:08                                                                 ` Nikita Karetnikov
2013-01-24 15:56                                                                   ` Ludovic Courtès
2013-01-26  4:33                                                                     ` Nikita Karetnikov
2013-01-26 21:37                                                                       ` Ludovic Courtès
2013-01-27  5:47                                                                         ` Nikita Karetnikov
2013-01-27 21:15                                                                           ` Ludovic Courtès
2013-01-28  5:51                                                                             ` Nikita Karetnikov
2013-01-28 12:59                                                                               ` Ludovic Courtès
2013-01-29 17:57                                                                                 ` Nikita Karetnikov
2013-01-29 21:00                                                                                   ` Ludovic Courtès
2013-01-29 21:59                                                                                     ` Nikita Karetnikov
2013-01-29 22:02                                                                                       ` Ludovic Courtès
2013-01-29 23:29                                                                                         ` Nikita Karetnikov
2013-01-30 20:58                                                                                           ` Ludovic Courtès
2013-01-30 23:03                                                                                             ` Nikita Karetnikov
2013-01-31 12:50                                                                                               ` Ludovic Courtès
2013-01-31 19:32                                                                                                 ` Nikita Karetnikov
2013-01-31 22:08                                                                                                   ` Ludovic Courtès
2013-02-01 23:43                                                                                                     ` Nikita Karetnikov
2013-02-02 10:09                                                                                                       ` Ludovic Courtès
2013-02-02 12:32                                                                                                         ` Nikita Karetnikov
2013-02-02 17:34                                                                                                           ` Ludovic Courtès
2013-02-02 20:47                                                                                                             ` Nikita Karetnikov
2013-02-03 18:00                                                                                                               ` Ludovic Courtès
2013-02-05 20:53                                                                                                                 ` Nikita Karetnikov
2013-02-05 22:00                                                                                                                   ` Ludovic Courtès
2013-02-06  9:27                                                                                                                     ` Nikita Karetnikov
2013-02-06 14:26                                                                                                                       ` Ludovic Courtès
2013-02-08 22:43                                                                                                                         ` Nikita Karetnikov
2013-02-08 23:11                                                                                                                           ` Ludovic Courtès
2013-02-11 20:50                                                                                                                             ` Ludovic Courtès
2013-02-11 21:34                                                                                                                               ` Andreas Enge
2013-02-11 22:10                                                                                                                                 ` Ludovic Courtès
2013-02-12  2:37                                                                                                                                   ` Nikita Karetnikov
2013-02-12  2:42                                                                                                                                     ` Nikita Karetnikov
2013-02-12  7:43                                                                                                                                       ` Nikita Karetnikov
2013-02-14  7:50                                                                                                                                         ` Nikita Karetnikov
2013-02-14 11:33                                                                                                                                           ` Ludovic Courtès
2013-02-15 20:11                                                                                                                                             ` Nikita Karetnikov
2013-02-16 21:07                                                                                                                                               ` Ludovic Courtès
2013-02-19  9:49                                                                                                                                                 ` Nikita Karetnikov
2013-02-19 10:19                                                                                                                                                   ` Ludovic Courtès
2013-02-12  9:57                                                                                                                                     ` Ludovic Courtès
2013-02-13  5:35                                                                                                                                       ` Nikita Karetnikov
2013-02-13 14:43                                                                                                                                         ` Ludovic Courtès
2013-02-19 11:05                                                                                                                                 ` Nikita Karetnikov
2013-02-19 12:54                                                                                                                                   ` Andreas Enge
2013-02-19 16:54                                                                                                                                     ` Ludovic Courtès
2013-02-19 18:20                                                                                                                                       ` Andreas Enge
2013-02-19 18:44                                                                                                                                         ` Nikita Karetnikov
2013-02-19 21:26                                                                                                                                         ` Ludovic Courtès
2013-02-20  9:30                                                                                                                                         ` Andreas Enge
2013-02-20 11:40                                                                                                                                           ` Ludovic Courtès
2013-02-20 16:25                                                                                                                                             ` Andreas Enge
2013-02-20 17:05                                                                                                                                               ` Ludovic Courtès
2013-02-20 17:42                                                                                                                                               ` Nikita Karetnikov
2013-02-20 19:24                                                                                                                                                 ` Andreas Enge
2013-02-20 20:03                                                                                                                                                   ` Ludovic Courtès
2013-02-20 23:38                                                                                                                                                     ` Porting to anything Andreas Enge
2013-02-21  9:36                                                                                                                                                       ` Ludovic Courtès
2013-02-21  9:56                                                                                                                                                         ` Andreas Enge
2013-02-21 16:48                                                                                                                                                     ` Porting to mips64el Nikita Karetnikov
2013-02-21 18:44                                                                                                                                                       ` Nikita Karetnikov
2013-02-21 21:47                                                                                                                                                         ` Nikita Karetnikov
2013-02-23 18:53                                                                                                                                                           ` Andreas Enge
2013-02-23 18:56                                                                                                                                                             ` Ludovic Courtès
2013-03-03 15:01                                                                                                                                                               ` Nikita Karetnikov
2013-03-03 21:26                                                                                                                                                                 ` Ludovic Courtès
2013-01-23 15:33                                                             ` Ludovic Courtès

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).