unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* powerpc64[le]-linux port progress
@ 2020-02-22 11:39 dftxbs3e
  2020-02-22 12:34 ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 4+ messages in thread
From: dftxbs3e @ 2020-02-22 11:39 UTC (permalink / raw)
  To: Guix Devel


[-- Attachment #1.1.1: Type: text/plain, Size: 1241 bytes --]

Hello!

So here's my current tree: https://gitlab.com/lle-bout/guix - master branch

Bootstrap binaries are uploaded over LFS at:
https://gitlab.com/lle-bout/guix-bootstrap - master branch

The current issue is during 'glibc-intermediate' in
gnu/packages/commencement.scm

The statically linked gawk binary tries to execute:
execve("/gnu/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bash-static-5.0.7/bin/bash",
["sh", "-c", "test -d nptl"], 0x3fffd261ecc0 /* 57 vars */) = -1

According to Ludovic Courtes, store references with 'eeeeeee' characters
in them are removed store references. So I went and tried to strip the
reference to bash and replace it with `sh` so that either gawk or any of
its dependency can look up `sh` in PATH at bootstrap time (we do not
know any path yet). In the commit history, you can see I tried to patch
glibc and gawk, but that does not solve the problem. The final gawk
binary still contains a reference to bash-static, and I have no idea
where it comes from. Do note that during gawk build process, there's a
'set-shell-filename phase, that I removed in
gnu/packages/make-bootstrap.scm and instead replace every occurrence of
/bin/sh with `sh`. I would appreciate help here. Thank you


[-- Attachment #1.1.2: Type: text/html, Size: 1993 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: powerpc64[le]-linux port progress
  2020-02-22 11:39 powerpc64[le]-linux port progress dftxbs3e
@ 2020-02-22 12:34 ` Jan Nieuwenhuizen
  2020-02-23  1:34   ` dftxbs3e
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Nieuwenhuizen @ 2020-02-22 12:34 UTC (permalink / raw)
  To: dftxbs3e; +Cc: Guix Devel

dftxbs3e writes:

Hello!

> So here's my current tree:
> https://gitlab.com/lle-bout/guix - master branch
> Bootstrap binaries are uploaded over LFS at:
> https://gitlab.com/lle-bout/guix-bootstrap - master branch
> The current issue is during 'glibc-intermediate' in gnu/packages/commencement.scm
> The statically linked gawk binary tries to execute:
> execve("/gnu/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bash-static-5.0.7/bin/bash", ["sh", "-c", "test -d nptl"], 0x3fffd261ecc0 /* 57 vars */) = -1
> According to Ludovic Courtes, store references with 'eeeeeee' characters in them are removed store references.
> So I went and tried to strip the reference to bash and replace it with `sh` so that either gawk or any of its dependency can look up `sh` in PATH at bootstrap time (we do not know any path yet).

Have you tried building static gawk standalone and check it for that
bash?  You could do something like

   grep -ao '/gnu/store/e*-bash' $(./pre-inst-env guix build -e '(@@ (gnu packages make-bootstrap) %static-binaries)')

On my x86_64-linux system, I get

   /gnu/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bash

> In the commit history, you can see I tried to patch glibc and gawk, but that does not solve the problem.
> The final gawk binary still contains a reference to bash-static, and I have no idea where it comes from.
> Do note that during gawk build process, there's a 'set-shell-filename phase, that I removed in gnu/packages/make-bootstrap.scm and instead replace every occurrence of /bin/sh with `sh`.
>
> I would appreciate help here.

For the new Scheme-only bootstrap, I solved a similar problem for
%bootstrap-mes by replacing the /gnu/store/eee* store-references with
actual bootstrap file names; see `%bootstrap-mes-rewired' in
core-updates http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/commencement.scm?h=core-updates#n251

HTH,
janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: powerpc64[le]-linux port progress
  2020-02-22 12:34 ` Jan Nieuwenhuizen
@ 2020-02-23  1:34   ` dftxbs3e
  2020-02-23  9:01     ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 4+ messages in thread
From: dftxbs3e @ 2020-02-23  1:34 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: Guix Devel


[-- Attachment #1.1: Type: text/plain, Size: 1260 bytes --]

On 2/22/20 1:34 PM, Jan Nieuwenhuizen wrote:
> Have you tried building static gawk standalone and check it for that
> bash?  You could do something like
>
>    grep -ao '/gnu/store/e*-bash' $(./pre-inst-env guix build -e '(@@ (gnu packages make-bootstrap) %static-binaries)')
>
> On my x86_64-linux system, I get
>
>    /gnu/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bash
Yes! I used the strings utility. I get two references to bash-static in
the store with 'eeeee'. Speaking of which, do you know if it's possible
to be spawned into an environment where %static-binaries's gawk package
(and only that one) sources are extracted, patched and configured? So
that I can investigate the inclusion of bash-static comfortably.
> For the new Scheme-only bootstrap, I solved a similar problem for
> %bootstrap-mes by replacing the /gnu/store/eee* store-references with
> actual bootstrap file names; see `%bootstrap-mes-rewired' in
> core-updates http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/commencement.scm?h=core-updates#n251
>
I hear, however that smells like a hack to me, I'd like to avoid
resorting to such unless absolutely necessary. How come it's not
possible to find where that bash-static reference is being inserted?


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: powerpc64[le]-linux port progress
  2020-02-23  1:34   ` dftxbs3e
@ 2020-02-23  9:01     ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Nieuwenhuizen @ 2020-02-23  9:01 UTC (permalink / raw)
  To: dftxbs3e; +Cc: Guix Devel

dftxbs3e writes:

Hi!

> On 2/22/20 1:34 PM, Jan Nieuwenhuizen wrote:
>> Have you tried building static gawk standalone and check it for that
>> bash?  You could do something like
>>
>>    grep -ao '/gnu/store/e*-bash' $(./pre-inst-env guix build -e '(@@ (gnu packages make-bootstrap) %static-binaries)')
>>
>> On my x86_64-linux system, I get
>>
>>    /gnu/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bash
> Yes! I used the strings utility. I get two references to bash-static in
> the store with 'eeeee'.

Ah, "good".

> Speaking of which, do you know if it's possible
> to be spawned into an environment where %static-binaries's gawk package
> (and only that one) sources are extracted, patched and configured? So
> that I can investigate the inclusion of bash-static comfortably.

You can either do something like

    ./pre-inst-env guix build -e '(@@ (gnu packages bootstrap) %static-binaries)' --keep-failed --no-offload

and edit the #:builder to return #f, or copy %static-binaries into a
%static-gawk where you strip out other stuff.

>> For the new Scheme-only bootstrap, I solved a similar problem for
>> %bootstrap-mes by replacing the /gnu/store/eee* store-references with
>> actual bootstrap file names; see `%bootstrap-mes-rewired' in
>> core-updates http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/commencement.scm?h=core-updates#n251
>>
> I hear, however that smells like a hack to me, I'd like to avoid
> resorting to such unless absolutely necessary.

I'm not entirely sure which is better; but we chose this in order not
having to touch the bootstrap binary for mes.  Also, I don't know "where
you are"; when trying to get "it to work", cutting corners initially
works for me :-)

> How come it's not
> possible to find where that bash-static reference is being inserted?

Computers are hard?  It's probably easy to find when you see it...

Greetings,
janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-23  9:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-22 11:39 powerpc64[le]-linux port progress dftxbs3e
2020-02-22 12:34 ` Jan Nieuwenhuizen
2020-02-23  1:34   ` dftxbs3e
2020-02-23  9:01     ` Jan Nieuwenhuizen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).