all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Manolis Ragkousis <manolis837@gmail.com>
To: Thomas Schwinge <thomas@codesourcery.com>
Cc: Guix-devel <Guix-devel@gnu.org>, "Ludovic Courtès" <ludo@gnu.org>,
	bug-hurd@gnu.org, "Samuel Thibault" <samuel.thibault@gnu.org>
Subject: Re: GSoC: Porting Guix to Hurd week 3+4 report.
Date: Thu, 4 Jun 2015 00:25:15 +0300	[thread overview]
Message-ID: <CAFtzXzMSb5jTZdV+MWLkkD9xVJ5dGczPdZmPHyG-BQVCyaOJjg@mail.gmail.com> (raw)
In-Reply-To: <87lhg2je9j.fsf@kepler.schwinge.homeip.net>

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
http://www.gnu.org/software/guix/manual/guix.html#Setting-Up-the-Daemon
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
cross-libc
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
/usr/local/var/log/guix/drvs/*/*".

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

Thank you again for helping me on this :-)

Manolis

  reply	other threads:[~2015-06-03 21:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-31  8:13 GSoC: Porting Guix to Hurd week 3+4 report Manolis Ragkousis
2015-05-31 20:22 ` Ludovic Courtès
2015-06-02 14:06   ` Manolis Ragkousis
2015-06-02 15:55     ` Thomas Schwinge
2015-06-03 21:25       ` Manolis Ragkousis [this message]
2015-06-04 20:48         ` Ludovic Courtès
2015-06-07 20:55           ` Thomas Schwinge
2015-06-08 11:43             ` Manolis Ragkousis
2015-06-08 12:59             ` Ludovic Courtès
2015-06-08 13:12               ` Manolis Ragkousis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFtzXzMSb5jTZdV+MWLkkD9xVJ5dGczPdZmPHyG-BQVCyaOJjg@mail.gmail.com \
    --to=manolis837@gmail.com \
    --cc=Guix-devel@gnu.org \
    --cc=bug-hurd@gnu.org \
    --cc=ludo@gnu.org \
    --cc=samuel.thibault@gnu.org \
    --cc=thomas@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.