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: Wed, 09 Jan 2013 22:42:11 +0100
User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux)

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



reply via email to

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