bug-guix
[Top][All Lists]
Advanced

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

Re: Porting to mips64el


From: Ludovic Courtès
Subject: Re: Porting to mips64el
Date: Fri, 11 Jan 2013 14:28:33 +0100
User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux)

Hi,

Nikita Karetnikov <address@hidden> 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’.



reply via email to

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