[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MIPS64/N64 support

From: Ludovic Courtès
Subject: Re: MIPS64/N64 support
Date: Wed, 09 Oct 2013 12:39:37 +0200
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

Hi Mark,

Thanks for the thorough analysis.

Mark H Weaver <address@hidden> skribis:

> My suspicion is that my kernel (linux-libre- and Guix's glibc
> are not playing nicely together.  However, Guix's glibc was configured
> to support kernels as early as 2.6.30, and the same 'pwd' executable
> that fails within 'guix-daemon' seems to work outside of it, even when
> run within a chroot.

Could it have something to do with bind mounts?

The method ‘DerivationGoal::initChild()’ in libstore/ is what
sets up the chroot environment.  The /tmp/nix-build-* directory is
itself bind-mounted in the chroot.


> * The initial stat(".") syscall reports inode 7274551, which corresponds
>   to "/tmp/nix-build-make-boot0-3.82.drv-0/make-3.82", as expected.
> * stat("/") reports inode 1073173, which looks WRONG.
> * stat("..") reports inode 7274550, which corresponds to
>   "/tmp/nix-build-make-boot0-3.82.drv-0", as expected.
> * reading the contents of ".." reports inode numbers that all look
>   correct, including "make-3.82" with inode 7274551, the same as ".".
>   Thus 'pwd' concludes that its result will end with "/make-3.82".
> * stat("../..") reports inode 1073174, which looks WRONG.
> * reading the contents of "../.." reports inode numbers that all look
>   WRONG:
>    "nix-build-make-boot0-3.82.drv-0" with inode 1073325
>    ".." with inode 1073173
>    "." with inode 1073174
>   None of these match the inode of "..", so 'pwd' fails.

Could it be that stat("/") reports the inode of the underlying root?

Can you try this in a REPL (assuming the bootstrap Guile works):

  (use-modules (guix store) (guix monads) (guix utils)
               (gnu packages bootstrap) (guix packages))
  (define (test)
    (derivation-expression "test" (%current-system)
                              (pk 'root (stat:ino (stat "/")))
                              (pk 'dotdotdotdot (stat:ino (stat "../.."))))
                              (pk 'dotdot (stat:ino (stat "..")))
                              (pk 'tmp (stat:ino (stat "/tmp"))))
                              (pk 'dot (stat:ino (stat ".")))
                              (pk 'tmpdir (stat:ino (stat 
                             (mkdir %output))
  (define s (open-connection))
  (define drv
    (run-with-store s (test)
                    #:guile-for-build (package-derivation s %bootstrap-guile)))
  (build-derivations s drv)

If that test fails, that most likely indicates a bug in Linux-Libre.

BTW, were you able to run (some of) ‘make check’?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]