bug#50212: Several tests fail, Bash fails often. Was: Tests fail while building Guix

2021-08-30 Thread Maxim Cournoyer
Hello Simon,

Simon Streit  writes:

> Maxim Cournoyer  writes:
>> I'm guessing the i386 does something bogus?  Your x86_64 is already able
>> to run i386 code natively, AFAIK.
>
> Alright, this was my interpretation from the manual and available
> architectures that I just plugged it all together like that.  I wasn't
> aware that x86_64 can run i386 natively.
>
>> The binfmt service type registers binary formats of non-native
>> architectures with interpreters to run them [0]; this way, when an ARM
>> binary is encountered on a x86_64 system, the kernel Linux knows to
>> launch it via QEMU, for example.  Since commit
>> 77c2f4e2068ebec3f384c826c5a99785125ff72c, this is in effect for any
>> container (it used to be possible to enable it with (guix-support? #t)
>> on only for the container spawned by guix-daemon.
>
> I reenabled the service without it mentioning i386.  Building Guix
> passes as expected.  Thank you.

No worries.  Thank you for the update.

Closing.

Maxim





bug#50212: Several tests fail, Bash fails often. Was: Tests fail while building Guix

2021-08-30 Thread Simon Streit
Maxim Cournoyer  writes:
> I'm guessing the i386 does something bogus?  Your x86_64 is already able
> to run i386 code natively, AFAIK.

Alright, this was my interpretation from the manual and available
architectures that I just plugged it all together like that.  I wasn't
aware that x86_64 can run i386 natively.

> The binfmt service type registers binary formats of non-native
> architectures with interpreters to run them [0]; this way, when an ARM
> binary is encountered on a x86_64 system, the kernel Linux knows to
> launch it via QEMU, for example.  Since commit
> 77c2f4e2068ebec3f384c826c5a99785125ff72c, this is in effect for any
> container (it used to be possible to enable it with (guix-support? #t)
> on only for the container spawned by guix-daemon.

I reenabled the service without it mentioning i386.  Building Guix
passes as expected.  Thank you.


Kind regards,
Simon





bug#50212: Several tests fail, Bash fails often. Was: Tests fail while building Guix

2021-08-29 Thread Maxim Cournoyer
Hello Simon,

Simon Streit  writes:

> Simon Streit  writes:
>> So why would my system brake the bootstrap binary?  Has it got to do
>> with a particular package I have in my profile(s)?  I generally build
>> Guix with ‘guix environment --pure guix.’  I have a second Guix build
>> machine running.  The packages used there are quite similar, so these
>> two machines have very similar checkouts and config in general.  Hence,
>> when I build Guix there, the same error occurs.
>
> I figured out why this is happening.  I disabled
>
> (service qemu-binfmt-service-type
>  (qemu-binfmt-configuration
>   (platforms (lookup-qemu-platforms "arm" "aarch64" "i386"
>
> and now all tests pass.
>
> Why would this be a problem?  

I'm guessing the i386 does something bogus?  Your x86_64 is already able
to run i386 code natively, AFAIK.

The binfmt service type registers binary formats of non-native
architectures with interpreters to run them [0]; this way, when an ARM
binary is encountered on a x86_64 system, the kernel Linux knows to
launch it via QEMU, for example.  Since commit
77c2f4e2068ebec3f384c826c5a99785125ff72c, this is in effect for any
container (it used to be possible to enable it with (guix-support? #t)
on only for the container spawned by guix-daemon.

For the record, I use:

--8<---cut here---start->8---
  (service qemu-binfmt-service-type
   (qemu-binfmt-configuration
(platforms (lookup-qemu-platforms "arm" "aarch64" "ppc64le"
--8<---cut here---end--->8---

On my main machine without any issue.

HTH,

[0]  https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html





bug#50212: Several tests fail, Bash fails often. Was: Tests fail while building Guix

2021-08-29 Thread Simon Streit
Simon Streit  writes:
> So why would my system brake the bootstrap binary?  Has it got to do
> with a particular package I have in my profile(s)?  I generally build
> Guix with ‘guix environment --pure guix.’  I have a second Guix build
> machine running.  The packages used there are quite similar, so these
> two machines have very similar checkouts and config in general.  Hence,
> when I build Guix there, the same error occurs.

I figured out why this is happening.  I disabled
--8<---cut here---start->8---
(service qemu-binfmt-service-type
 (qemu-binfmt-configuration
  (platforms (lookup-qemu-platforms "arm" "aarch64" "i386"
--8<---cut here---end--->8---
and now all tests pass.

Why would this be a problem?  


Simon





bug#50212: Several tests fail, Bash fails often. Was: Tests fail while building Guix

2021-08-28 Thread Simon Streit
Hello Maxime,

Maxime Devos  writes:
> Some questions:
>
> * What's the hash of gnu/packages/bootstrap/i686-linux/bash?
>
>   (Run guix hash gnu/packages/bootstrap/i686-linux/bash)
>
>   I have 1ig8a4bhc7fpw8zrnw4l568wmmcb29rlwg4jbih3imb4x6d9l1gd.
>   If you see something different, your copy is probably corrupt.

The hash is: 1ig8a4bhc7fpw8zrnw4l568wmmcb29rlwg4jbih3imb4x6d9l1gd

> * What does ‘objdump -a gnu/packages/bootstrap/i686-linux/bash’ output?
>   On my x86_64 system, it outputs ‘[...] file format elf32-i386’.

Result is:
--8<---cut here---start->8---
./bash: file format elf32-i386
--8<---cut here---end--->8---

> * What architecture are you on?

And: x86_64-linux system.

I just updated my system to a8dd285d5a0670abf124a721e6ba94da045b24ba and
am building 76114232d7c140fb9fee84510b72fcfe6ee27714, which failed again.

Early on I installed Guix into a VM, and built the sources in there
on a pretty much default config from the installer.  All tests passed.

Just to be sure I did another clean clone on my main machine, which
failed again.

So why would my system brake the bootstrap binary?  Has it got to do
with a particular package I have in my profile(s)?  I generally build
Guix with ‘guix environment --pure guix.’  I have a second Guix build
machine running.  The packages used there are quite similar, so these
two machines have very similar checkouts and config in general.  Hence,
when I build Guix there, the same error occurs.


Simon





bug#50212: Several tests fail, Bash fails often. Was: Tests fail while building Guix

2021-08-28 Thread Simon Streit
Hey Mark,

Mark H Weaver  writes:
> Also check the permissions of gnu/packages/bootstrap/i686-linux/bash.
> It should be 0555, i.e. "-r-xr-xr-x", and ditto for 'mkdir' in the same
> directory.  I vaguely recall someone running into a similar problem many
> years ago because the executable bit was missing in their bootstrap
> files, even though the files had the correct contents.  The executable
> bit is effectively included in the hash computation when the file is
> imported to the store, although "guix hash" disregards it when applied
> to a single file.

Contents of bootstrap are as follows:
--8<---cut here---start->8---
  /home/ss2/code/guix/gnu/packages/bootstrap/i686-linux:
  total used in directory 4.1M available 340.5 GiB
  drwxr-xr-x 3 ss2 users 4.0K Aug 28 23:55 .
  drwxr-xr-x 3 ss2 users 4.0K Apr 19 22:13 ..
  -r-xr-xr-x 1 ss2 users 1.3M Mar  7 23:53 bash
  -r-xr-xr-x 1 ss2 users 698K Mar  7 23:54 mkdir
  -r-xr-xr-x 1 ss2 users 1.3M Mar  7 23:57 tar
  -r-xr-xr-x 1 ss2 users 842K Mar  7 23:57 xz
--8<---cut here---end--->8---

Simon





bug#50212: Several tests fail, Bash fails often. Was: Tests fail while building Guix

2021-08-28 Thread Mark H Weaver
Hi,

Maxime Devos  writes:
> * What's the hash of gnu/packages/bootstrap/i686-linux/bash?
>
>   (Run guix hash gnu/packages/bootstrap/i686-linux/bash)
>
>   I have 1ig8a4bhc7fpw8zrnw4l568wmmcb29rlwg4jbih3imb4x6d9l1gd.
>   If you see something different, your copy is probably corrupt.

Also check the permissions of gnu/packages/bootstrap/i686-linux/bash.
It should be 0555, i.e. "-r-xr-xr-x", and ditto for 'mkdir' in the same
directory.  I vaguely recall someone running into a similar problem many
years ago because the executable bit was missing in their bootstrap
files, even though the files had the correct contents.  The executable
bit is effectively included in the hash computation when the file is
imported to the store, although "guix hash" disregards it when applied
to a single file.

   Mark

--
Disinformation flourishes because many people care deeply about injustice
but very few check the facts.  Ask me about .





bug#50212: Several tests fail, Bash fails often. Was: Tests fail while building Guix

2021-08-28 Thread Maxime Devos
Simon Streit schreef op vr 27-08-2021 om 21:53 [+0200]:
> This is another follow up after having actually read the relevant info
> section on how to do proper testing in Guix.
> 
> Checkout is at 5422920b9eaaa0c6bf779588748595c66ca86ba3, and this time I
> prepared a test-suite.log with all errors that happen.  Please find it
> attached.  This time it isn't too big either.

Some questions:

* What's the hash of gnu/packages/bootstrap/i686-linux/bash?

  (Run guix hash gnu/packages/bootstrap/i686-linux/bash)

  I have 1ig8a4bhc7fpw8zrnw4l568wmmcb29rlwg4jbih3imb4x6d9l1gd.
  If you see something different, your copy is probably corrupt.

* What does ‘objdump -a gnu/packages/bootstrap/i686-linux/bash’ output?
  On my x86_64 system, it outputs ‘[...] file format elf32-i386’.

* What architecture are you on?

  You can test with:

  $ echo '((@ (guix utils) %current-system))' | guix repl

  On my x86_64-linux system, it outputs

  [...]
  $1 = "x86_64-linux"
  scheme@(guix-user)>.

If your system isn't i686-linux or x86_64-linux, something odd is going on.

Greetings,
Maxime.


signature.asc
Description: This is a digitally signed message part