Re: Porting to anything

2013-02-21 Thread Andreas Enge
Am Donnerstag, 21. Februar 2013 schrieb Ludovic Courtès:
> Isn’t it equally unsatisfying?  :-)

Exactly, whence my message.

> Yes.  I outlined a plan in
> .
> 
> 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



Re: Porting to anything

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

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.  :-/