Re: branch master updated: gnu: Add musl-cross.

2020-05-06 Thread Ludovic Courtès
Hi,

Danny Milosavljevic  skribis:

> On Sun, 03 May 2020 21:26:23 +0200
> Ludovic Courtès  wrote:
>
>> I understand cross-base.scm is becoming messy and we would need an
>> abstraction to facilitate its use.  Still, to me it sounds like a better
>> option over big monolithic packages.
>> 
>> WDYT?
>
> In general I'm all for using our cross toolchain mechanism.
>
> However, this is the toolchain used by heads[1]--and they have reproducible
> builds.
>
> The use case is to be able to build heads in Guix without modification.
>
> Their attestation of secure boot actually verifies (and asks the user and
> documents the correct hashes in their README) whether the output hashes are
> correct--so the toolchain doesn't need to be just similar, it needs to make
> exactly the same executables.

OK, I see the practical need.

If we take a step back, I think that Heads would be stronger by using
Guix all the way down: it’d benefit from not just reproducible builds,
but also provenance tracking and a reduced set of bootstrap binaries.
In this grand scheme of things, the secure boot attestation of binaries
“built their way” should be compared with the benefits of having
binaries “built our way”.

There are also practical issues: building a whole toolchain as part of
this one package is expensive for our build farm and for users of said
package.

> Also, they are using musl instead of glibc.  I don't think we have a musl-gcc
> yet and I've never done a musl gcc before.
> Could be easy, could be hard--who knows.

I think it should be simpler than the MinGW or even GNU/Hurd
cross-toolchains that we have.  :-)

> That said, I'm all for it.
>
> However, I need heads for work--and one way or another it has to actually
> build the official version :)

Yup, makes sense!

Let’s just try and see how Heads and Guix can build upon each other
eventually.

Ludo’.



Re: branch master updated: gnu: Add musl-cross.

2020-05-03 Thread Vincent Legoll

Hello,

On 03/05/2020 22:17, Danny Milosavljevic wrote:

The use case is to be able to build heads in Guix without modification.


I was about to ask you what was the motivation for that commit,
thanks for reading my mind !

I'm obviously interested in the subject. I'd love to explore 
bootstrapping guix with a musl libc.



Also, they are using musl instead of glibc.  I don't think we have a
musl-gcc yet and I've never done a musl gcc before.


We have musl, but are currently disabling the building/installation of 
its musl-gcc wrapper, I'm not sure you're speaking of this one though.


But maybe we can revisit enabling it, I'll put that on my todo list, if
you won't beat me to it.

--
Vincent Legoll



Re: branch master updated: gnu: Add musl-cross.

2020-05-03 Thread Danny Milosavljevic
Hi Ludo,

On Sun, 03 May 2020 21:26:23 +0200
Ludovic Courtès  wrote:

> I understand cross-base.scm is becoming messy and we would need an
> abstraction to facilitate its use.  Still, to me it sounds like a better
> option over big monolithic packages.
> 
> WDYT?

In general I'm all for using our cross toolchain mechanism.

However, this is the toolchain used by heads[1]--and they have reproducible
builds.

The use case is to be able to build heads in Guix without modification.

Their attestation of secure boot actually verifies (and asks the user and
documents the correct hashes in their README) whether the output hashes are
correct--so the toolchain doesn't need to be just similar, it needs to make
exactly the same executables.

Also, they are using musl instead of glibc.  I don't think we have a musl-gcc
yet and I've never done a musl gcc before.
Could be easy, could be hard--who knows.

That said, I'm all for it.

However, I need heads for work--and one way or another it has to actually
build the official version :)

[1] https://github.com/osresearch/heads/ , basically a Linux that goes on the
BIOS flash ROM.
[2] https://github.com/osresearch/heads/pull/710


pgptaCq4Qm0XS.pgp
Description: OpenPGP digital signature


Re: branch master updated: gnu: Add musl-cross.

2020-05-03 Thread Ludovic Courtès
Hi Danny,

guix-comm...@gnu.org skribis:

> commit f7228e317703808a8a193f6db8a3cb6ba5380f2f
> Author: Danny Milosavljevic 
> AuthorDate: Sat May 2 14:48:29 2020 +0200
>
> gnu: Add musl-cross.
> 
> * gnu/packages/patches/musl-cross-locate.patch: New file.
> * gnu/packages/heads.scm: New file.
> * gnu/local.mk (dist_patch_DATA): Add one.
> (GNU_SYSTEM_MODULES): Add the other.

[...]

> +(define-public musl-cross
> +  (let ((revision "3")
> +(commit "a8a66490dae7f23a2cf5e256f3a596d1ccfe1a03"))
> +  (package
> +(name "musl-cross")

It’s an unconventional way to provide a cross-toolchain.  What about
expressing along the lines of what cross-base.scm does?

I understand cross-base.scm is becoming messy and we would need an
abstraction to facilitate its use.  Still, to me it sounds like a better
option over big monolithic packages.

WDYT?

Ludo’.