[Top][All Lists]

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

Re: GSoC: Porting Guix to Hurd week 3+4 report.

From: Manolis Ragkousis
Subject: Re: GSoC: Porting Guix to Hurd week 3+4 report.
Date: Thu, 4 Jun 2015 00:25:15 +0300

Hey Thomas, thank you for looking into this.

On 2 June 2015 at 18:55, Thomas Schwinge <thomas@codesourcery.com> wrote:
> Shame on me, but I've never actively used/built Guix before.  I do know
> about <https://github.com/Phant0mas/Guix-on-Hurd>, and that there must be
> a Guix manual existing -- but can you help me get started, please?
> (Pointers to specific parts of documentation are appreciated, of course.)

So let's start with the easy one. Currently Guix can be used only of top of a
GNU/Linux system. So with that in mind, clone the repo (the one from savannah
git://git.savannah.gnu.org/guix.git )
on one such system and make sure you have the dependencies mentioned at
<http://www.gnu.org/software/guix/manual/guix.html#Requirements> installed.
Then you just need the usual ./configure && make && make install on
the master branch to build and
install guix. After that follow
on how to setup the builder accounts and how to run the daemon.
Congrats you are a proud user of Guix :-).

Now just checkout the wip-hurd branch from my github repo. I have some
changes there not yet present
or ready for the branch in savannah. Run make again and you are ready.

> Is there a way to have the "Guix build process" create a shell script (or
> some other "linearized log of command invocations")?  At this point, the
> latter would be earier for me to debug (evem reproduce?), compared to
> really "learning Guix" -- which I'll be happy to do (and have been
> meaning to do for a looong time...), but then it's probably going to take
> longer for me to really get started.
> Alternatively/additionally, I'd also appreciate a high-level
> (coarse-grained) overview about the steps you're executing right now.
> (Maybe that already documented somewhere, or is obvious from the "Guix
> build description files" -- which I have not yet looked at.)  That is,
> something like: 1) install GNU Mach headers: configure [...] && make
> install [...], 2) install Hurd headers: [...], 3) build minimal cross-GCC
> configured with [...] options: [...], and so on.

Now the hard part. Ludovic if I do any mistakes on this part, please
correct me. :-)

I will mostly point you on the right places in the code to look,
because I believe the package
definitions are quite simple to understand and they will be much more
helpful in understanding
what's going on.

The command we want to use is "./pre-inst-env guix build
--target=i686-pc-gnu gcc-4.7 -K"
The flag "-K" keeps the failed build directory in /tmp. This commands
tries to cross build gcc
for --target=i686-pc-gnu.

Let's start on how we get the cross-toolchain in gnu/packages/cross-base.scm.

The building sequence
1) Build cross-binutils for target system.
2) Build minimal cross-gcc with the flags from cross-gcc-arguments
3) Build xgnumach-headers, xmig, xhurd-headers, xglibc/hurd-headers,
xhurd-minimal and finally
4) Build cross-gcc with the now present cross-libc.
5) We now have a cross toolchain for our needs.

This part works as expected.
The part that is failing is the "Canadian cross". That is, cross-compiling GCC.
To reproduce, in the guix directory, run ./pre-inst-env guix build
--target=i686-pc-gnu gcc-4.7 -K

gcc-4.7 package definition is located in gnu/packages/gcc.scm and the
configure flags are defined in
"configure-flags" in the same file. We build this packages using the
cross-toolchain from above.

After it fails go to /tmp/nix-build-gcc-4.7...  and there you can find
the failed build. Everything will be there.
As for the the logs, they can  be found with "ls -ltr

I hope this explains most of the things on how to reproduce the error.

Thank you again for helping me on this :-)


reply via email to

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