Re: Porting to mips64el

2013-03-03 Thread Ludovic Courtès
Nikita Karetnikov 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:

Re: Porting to mips64el

2013-03-03 Thread Nikita Karetnikov
> 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/201

Re: Porting to mips64el

2013-02-23 Thread Ludovic Courtès
Andreas Enge 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’.

Re: Porting to mips64el

2013-02-23 Thread Andreas Enge
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 CFLA

Re: Porting to mips64el

2013-02-21 Thread Nikita Karetnikov
> 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'). Wha

Re: Porting to mips64el

2013-02-21 Thread Nikita Karetnikov
> 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. pgpyXxJH9ob92.pgp Desc

Re: Porting to mips64el

2013-02-21 Thread Nikita Karetnikov
>> 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-boots

Re: Porting to mips64el

2013-02-20 Thread Ludovic Courtès
Andreas Enge 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 "

Re: Porting to mips64el

2013-02-20 Thread Andreas Enge
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 %

Re: Porting to mips64el

2013-02-20 Thread Nikita Karetnikov
> Could you maybe provide some, Nikita? Sure. But what should I do? Should I adjust '%bootstrap-glibc' somehow? pgpNbt1ePcXrM.pgp Description: PGP signature

Re: Porting to mips64el

2013-02-20 Thread Ludovic Courtès
Andreas Enge 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

Re: Porting to mips64el

2013-02-20 Thread Andreas Enge
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/pac

Re: Porting to mips64el

2013-02-20 Thread Ludovic Courtès
Andreas Enge 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... /

Re: Porting to mips64el

2013-02-20 Thread Andreas Enge
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'

Re: Porting to mips64el

2013-02-19 Thread Ludovic Courtès
Andreas Enge 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

Re: Porting to mips64el

2013-02-19 Thread Nikita Karetnikov
> 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

Re: Porting to mips64el

2013-02-19 Thread Andreas Enge
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

Re: Porting to mips64el

2013-02-19 Thread Ludovic Courtès
FWIW, there’s a discussion of MIPS ABIs at and related pages. Andreas Enge 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 >

Re: Porting to mips64el

2013-02-19 Thread Andreas Enge
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 contradic

Re: Porting to mips64el

2013-02-19 Thread 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 t

Re: Porting to mips64el

2013-02-19 Thread Ludovic Courtès
Nikita Karetnikov 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

Re: Porting to mips64el

2013-02-19 Thread Nikita Karetnikov
>> 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 l

Re: Porting to mips64el

2013-02-16 Thread Ludovic Courtès
Nikita Karetnikov 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”.)

Re: Porting to mips64el

2013-02-15 Thread Nikita Karetnikov
> 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 [c

Re: Porting to mips64el

2013-02-14 Thread Ludovic Courtès
Nikita Karetnikov 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? (

Re: Porting to mips64el

2013-02-13 Thread Nikita Karetnikov
@ 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' a

Re: Porting to mips64el

2013-02-13 Thread Ludovic Courtès
Nikita Karetnikov 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’

Re: Porting to mips64el

2013-02-12 Thread Nikita Karetnikov
> Maybe we need a command-line interface to that? I think so. Should it be a separate file (e.g., 'guix-hash')? pgpQiP2uz7CwO.pgp Description: PGP signature

Re: Porting to mips64el

2013-02-12 Thread Ludovic Courtès
Nikita Karetnikov 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: > >

Re: Porting to mips64el

2013-02-11 Thread Nikita Karetnikov
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.or

Re: Porting to mips64el

2013-02-11 Thread Nikita Karetnikov
> Please append '-linux' to the following: > . The current workaround is to adjust 'build-aux/download.scm' and 'gnu/packages/bootstrap.scm' like this: (string->uri (string-append %url-base "/mips64el"

Re: Porting to mips64el

2013-02-11 Thread Nikita Karetnikov
> 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: . By

Re: Porting to mips64el

2013-02-11 Thread Ludovic Courtès
Andreas Enge 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 jus

Re: Porting to mips64el

2013-02-11 Thread Andreas Enge
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 `dirn

Re: Porting to mips64el

2013-02-11 Thread Ludovic Courtès
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 surprise

Re: Porting to mips64el

2013-02-08 Thread Ludovic Courtès
Nikita Karetnikov 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, excellen

Re: Porting to mips64el

2013-02-08 Thread Nikita Karetnikov
@ 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. pgpubGyhPQ55R.pgp Description: PGP signature

Re: Porting to mips64el

2013-02-06 Thread Ludovic Courtès
Nikita Karetnikov 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’.

Re: Porting to mips64el

2013-02-06 Thread Nikita Karetnikov
'binutils-static' failed. 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/1d1gw

Re: Porting to mips64el

2013-02-05 Thread Ludovic Courtès
Nikita Karetnikov 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

Re: Porting to mips64el

2013-02-05 Thread Nikita Karetnikov
> 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.)

Re: Porting to mips64el

2013-02-03 Thread Ludovic Courtès
Nikita Karetnikov 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

Re: Porting to mips64el

2013-02-02 Thread Nikita Karetnikov
> Can you send this file? Attached. /* 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

Re: Porting to mips64el

2013-02-02 Thread Ludovic Courtès
Nikita Karetnikov 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 LI

Re: Porting to mips64el

2013-02-02 Thread Nikita Karetnikov
>> ../../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/7ya3mh0987kmc9xk

Re: Porting to mips64el

2013-02-02 Thread Ludovic Courtès
Hi, Nikita Karetnikov 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’.

Re: Porting to mips64el

2013-02-01 Thread Nikita Karetnikov
> 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.

Re: Porting to mips64el

2013-01-31 Thread Ludovic Courtès
Nikita Karetnikov 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*

Re: Porting to mips64el

2013-01-31 Thread Nikita Karetnikov
> 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)

Re: Porting to mips64el

2013-01-31 Thread Ludovic Courtès
Nikita Karetnikov skribis: > # strings > /nix/store/qn9m4cjncna9mcac98fynialsv2l28jm-glibc-intermediate-2.17/bin/sh | > grep ld.so > /nix/store/-glibc-2.13/lib/ld.so.1 > > How can I fix this? You should actually build a statically-linked Bash, and edit %bootstra

Re: Porting to mips64el

2013-01-30 Thread Nikita Karetnikov
> 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/-glibc-2.13/lib/ld.so.1 How can I fix this? > (Remember to add that to ‘glibc-dynamic-linker’ eventuall

Re: Porting to mips64el

2013-01-30 Thread Ludovic Courtès
Nikita Karetnikov 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.

Re: Porting to mips64el

2013-01-29 Thread Nikita Karetnikov
> 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 pgpD7njqelsUp.pgp Description: PGP signature

Re: Porting to mips64el

2013-01-29 Thread Ludovic Courtès
Nikita Karetnikov 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

Re: Porting to mips64el

2013-01-29 Thread Nikita Karetnikov
> 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 t

Re: Porting to mips64el

2013-01-29 Thread Ludovic Courtès
Nikita Karetnikov 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 su

Re: Porting to mips64el

2013-01-29 Thread Nikita Karetnikov
> 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

Re: Porting to mips64el

2013-01-28 Thread Ludovic Courtès
Nikita Karetnikov skribis: >,@(if (string-prefix? "mips" > (%current-system)) > `(((string-prefix? arch "mips") > "mips")) Oops, there

Re: Porting to mips64el

2013-01-27 Thread Nikita Karetnikov
> 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=mips

Re: Porting to mips64el

2013-01-27 Thread Ludovic Courtès
Nikita Karetnikov 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

Re: Porting to mips64el

2013-01-26 Thread Nikita Karetnikov
> 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

Re: Porting to mips64el

2013-01-26 Thread Ludovic Courtès
Hi, Nikita Karetnikov 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 “mi

Re: Porting to mips64el

2013-01-25 Thread Nikita Karetnikov
> "--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-

Re: Porting to mips64el

2013-01-24 Thread Ludovic Courtès
Nikita Karetnikov 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"

Re: Porting to mips64el

2013-01-23 Thread Nikita Karetnikov
> 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 \

Re: Porting to mips64el

2013-01-23 Thread Ludovic Courtès
Nikita Karetnikov 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

Re: Porting to mips64el

2013-01-23 Thread Ludovic Courtès
Hi, Nikita Karetnikov 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-ch

Re: Porting to mips64el

2013-01-22 Thread Nikita Karetnikov
> 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 functio

Re: Porting to mips64el

2013-01-22 Thread Nikita Karetnikov
> 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 t

Re: Porting to mips64el

2013-01-20 Thread Ludovic Courtès
Nikita Karetnikov skribis: > I've tried to compile and run the following simple program: Oh, this is actually Perl’s configure speaking, not you. > #include > int main() { printf("Ok\n"); return(0); } > > I used the command: > > gcc -o try -O2 -fno-strict-aliasing -pipe -fstack-protector

Re: Porting to mips64el

2013-01-19 Thread Nikita Karetnikov
> 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 int

Re: Porting to mips64el

2013-01-19 Thread Ludovic Courtès
Hi, Nikita Karetnikov 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

Re: Porting to mips64el

2013-01-19 Thread Nikita Karetnikov
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_EXT

Re: Porting to mips64el

2013-01-13 Thread Ludovic Courtès
Nikita Karetnikov skribis: > 2774 lseek(7, 745214952, SEEK_SET) = 745214952 > 2774 getdents(7, > 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 pl

Re: Porting to mips64el

2013-01-12 Thread Nikita Karetnikov
> 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 lse

Re: Porting to mips64el

2013-01-12 Thread Ludovic Courtès
Nikita Karetnikov 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’.

Re: Porting to mips64el

2013-01-12 Thread Nikita Karetnikov
>> 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, f

Re: Porting to mips64el

2013-01-12 Thread Ludovic Courtès
Hello! Nikita Karetnikov 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’.

Re: Porting to mips64el

2013-01-12 Thread Nikita Karetnikov
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 pgps3I6yOOpCP.pgp Description: PGP signature

Re: Porting to mips64el

2013-01-11 Thread Ludovic Courtès
Nikita Karetnikov 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?

Re: Porting to mips64el

2013-01-11 Thread Nikita Karetnikov
> 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 [

Re: Porting to mips64el

2013-01-11 Thread Ludovic Courtès
Hi, Nikita Karetnikov 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

Re: Porting to mips64el

2013-01-10 Thread Nikita Karetnikov
> 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 err

Re: Porting to mips64el

2013-01-09 Thread Ludovic Courtès
Nikita Karetnikov 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, s

Re: Porting to mips64el

2013-01-09 Thread Nikita Karetnikov
> 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,

Re: Porting to mips64el

2013-01-08 Thread Ludovic Courtès
Nikita Karetnikov 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 he

Re: Porting to mips64el

2013-01-08 Thread Nikita Karetnikov
> 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.

Re: Porting to mips64el

2013-01-08 Thread Ludovic Courtès
Hi, Nikita Karetnikov 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 Gu

Re: Porting to mips64el

2013-01-08 Thread Nikita Karetnikov
> 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 '/

Re: Porting to mips64el

2013-01-08 Thread Ludovic Courtès
Hi! Nikita Karetnikov 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

Porting to mips64el (was: mips64el: No such file or directory: "/nix/store/*-glibc-2.13.drv")

2013-01-08 Thread Nikita Karetnikov
> 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 # ./configu