binutils-mesboot0 fails at configure, cannot find lex

  • Open
  • quality assurance status badge
Details
7 participants
  • Carl Dong
  • Jan Nieuwenhuizen
  • kitzman
  • Ludovic Courtès
  • Tobias Geerinckx-Rice
  • Tom Hiller
  • Vincent Legoll
Owner
unassigned
Submitted by
Carl Dong
Severity
important
C
C
Carl Dong wrote on 10 Dec 2020 12:01
(address . bug-guix@gnu.org)
1C1332EB-3389-416F-A8A7-0CF6A469AE29@carldong.me
Hi all,

I’m pulling from quite an old version of Guix here, and binutils-mesboot0 seems to fail at configure. Here’s the tail of the log:

-----

checking lex output file root... @ build-log 1955508 104
./configure: line 4505: lex: command not found
configure: error: cannot find output from lex; giving up
@ build-log 1955508 33
make: *** [configure-ld] Error 1
@ build-log 1955508 36
command "make" failed with status 2
builder for `/gnu/store/plgzgmklaslp8dg5mamnda9wr6zch4gz-binutils-mesboot0-2.14.drv' failed with exit code 1
@ build-failed /gnu/store/plgzgmklaslp8dg5mamnda9wr6zch4gz-binutils-mesboot0-2.14.drv - 1 builder for `/gnu/store/plgzgmklaslp8dg5mamnda9wr6zch4gz-binutils-mesboot0-2.14.drv' failed with exit code 1
cannot build derivation `/gnu/store/04s4qih73dwvpzpvxs299wcg9dam8f0y-bash-mesboot-4.4.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/pdy7jkg1wj76a9f6cbykx7afmg1abd0x-binutils-mesboot1-2.14.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/jgfnwg3j8yz0bhd5kjbsjig47wzqh3c7-coreutils-mesboot0-5.0.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/3947s3bz23f9mn730xkakfifiylkkrrn-gawk-mesboot-3.1.8.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/l7ly0ncga5v6l234bf7ghjdbja3wv8vz-gcc-mesboot0-2.95.3.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/3cizhfk4vni8rs2bayqdp89mkhya4ifx-glibc-mesboot0-2.2.5.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/2k7axk4b6x6312gla49phc4mg0nf0r76-grep-mesboot-2.0.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/gs0qfn92iw5s5pmn84nwbjr6bcmy51vi-make-mesboot-3.82.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/s2qiyyiia81nkb5dd2k0a37xzrbrs1yv-sed-mesboot-4.0.6.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/g7b6giy5lgqc5jwrjn4har77qhxfpd8b-tar-mesboot-1.22.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/84aj95pxsxshh6kpcl0s1w6l9cfjfzj9-bash-minimal-5.0.16.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/95w8r81sn34fl2d64c8rkp76v9d9zai5-binutils-2.34.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/axivv7qsbckqv2yyqmgkvps5wv9zmpm7-bzip2-1.0.8.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/9gd8mfg44r39wca5s7cm44ykwcym1kb3-coreutils-8.32.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/pnja3bqzzkml1pwnmg8xal4dqrpzhrvd-diffutils-3.7.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/kr17fb10wfdp95ws0ldbl1pprx7fyy8h-file-5.38.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/70gapv7ssbkcww91rw5y958bfgp44gw9-findutils-4.7.0.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/wkrgrjfkpqdzdvv81nbra7bvskfl9i57-gawk-5.0.1.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/3d4xggdls9cmvr5j2qd57p6z1pavd7pg-gcc-7.5.0.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/0j6gi10v9hz2s2413nhwbzihrydafgvj-glibc-2.31.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/31c3393sbak5vplnjcqjggssjap4pswa-gmp-6.2.0.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/55m53jfhazxzkhrlm9razvw1r0mzxah0-grep-3.4.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/jaipnrrbphwy9ikzd9b2fd2bxg9z1sf7-guile-3.0.2.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/jicfpg84bxqdrmmapcybz7dzcx7d3sdb-gzip-1.10.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/qfb37lardni78naczldb1ia33n9ffvc7-gzip-1.10.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/w52ybvgf1iqjp9wbj93sf05irzsp2wf8-libgc-8.0.4.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/416gi1543sgyi8rqmpx40xvl7q5r9h05-libltdl-2.4.6.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/l0wvk570gzbnmq9ik1hsmnbkyhnf4mib-libunistring-0.9.10.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/d2fr7ijbw7hg5xz8s8ff24zypmqxc09h-linux-libre-headers-5.4.20.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/577y712c4lqzarml9x5a20x5kmlvwcz0-make-4.3.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/rlf3y96hkbl7akl7w23q351rrqan1xxp-patch-2.7.6.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/0zmcam9sdiag9s1qx3xvlf8a3jnm53x2-sed-4.8.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/jjkv2zvx1s8qk47nx6mnz5n5iqhq5q9b-tar-1.32.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/7avrcww5ag0d1zbidi8awrarqvd8bb29-xz-5.2.4.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/9mf1r6xzp10gcxks4dbr2iiqn2imm1bi-glibc-utf8-locales-2.31.drv': 1 dependencies couldn't be built
Backtrace:
11 (primitive-load "/gnu/store/1q0np6cpqjj6180qwxglxm2xf7dsvqlx-compute-guix-derivation")
In ice-9/eval.scm:
155:9 10 (_ _)
159:9 9 (_ #(#(#(#(#(#(#(#(#(#(#(#(#(#<directory (guile-user) 7f6fa14ea1?> ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?))
In ./guix/store.scm:
2049:24 8 (run-with-store #<store-connection 256.99 7f6f9f8e16c0> _ #:guile-for-build _ #:system _ #:target _)
1883:8 7 (_ _)
In ./guix/gexp.scm:
258:18 6 (_ _)
1123:2 5 (_ _)
982:2 4 (_ _)
843:4 3 (_ _)
In ./guix/store.scm:
1931:12 2 (_ #<store-connection 256.99 7f6f9f8e16c0>)
1358:5 1 (map/accumulate-builds #<store-connection 256.99 7f6f9f8e16c0> _ _)
1369:15 0 (_ #<store-connection 256.99 7f6f9f8e16c0> _ _)

./guix/store.scm:1369:15: Throw to key `srfi-34' with args `(#<condition &store-protocol-error [message: "build of `/gnu/store/9mf1r6xzp10gcxks4dbr2iiqn2imm1bi-glibc-utf8-locales-2.31.drv' failed" status: 100] 7f6f93e47b10>)'.
guix pull: error: You found a bug: the program '/gnu/store/1q0np6cpqjj6180qwxglxm2xf7dsvqlx-compute-guix-derivation'
failed to compute the derivation for Guix (version: "64098437081d8752d95ca9d065bf8367bd5ffb08"; system: "x86_64-linux";
host version: "bf8dfe3df025e4ac80cccb87497b4f072ba10e2a"; pull-version: 1).
Please report it by email to <bug-guix@gnu.org>.

-----

Cheers,
Carl Dong
C
C
Carl Dong wrote on 10 Dec 2020 14:28
(address . 45165@debbugs.gnu.org)
3FFC3D46-B961-479D-BCA9-273C150BF9CC@carldong.me
Some more information from my debugging:

1. This error is reproducible even when I specify --cores=1, which is very strange
2. I have attached the full log to this email
3. I have uploaded the --keep-failed directory here: https://nextcloud.carl.homeserver.net/s/MtDYCwsSSdd7JW3

Looking at that directory, and doing some googling, I see that this is most likely the cause: https://lists.gnu.org/archive/html/bug-binutils/2016-01/msg00076.html


Not sure how best to apply the fix in Guix, should we patch override.m4 and regenerate? Patch everything and not regenerate? Patch automake itself and regenerate?

Also, some lingering mysteries:
1. Ludovic mentioned that there were substitutes for this particular derivation, and I did not disable substitutes (other packages in this pull even used substitutes). Why did substitution fail?
2. Ludovic and others mentioned that they were able to build successfully. Why did it fail on my machine even with --cores=1?

Cheers,
Carl Dong
J
J
Jan Nieuwenhuizen wrote on 10 Dec 2020 22:33
Re: bug#45165: binutils-mesboot0 fails at configure, cannot find lex
(name . Carl Dong)(address . contact@carldong.me)(address . 45165@debbugs.gnu.org)
87a6ukkg1r.fsf@gnu.org
Carl Dong writes:

Hello!

Toggle quote (5 lines)
> Some more information from my debugging:
>
> 1. This error is reproducible even when I specify --cores=1, which is very strange
> 2. I have attached the full log to this email

Diffing this with the build log from

Toggle snippet (26 lines)
guix build -e '(@@ (gnu packages commencement) binutils-mesboot0)' --log-file
wget https://ci.guix.gnu.org/log/jfa9b78rdniyw7qilsmw3bh02x8x68ly-binutils-mesboot0-2.14 -O jfa9b78rdniyw7qilsmw3bh02x8x68ly-binutils-mesboot0-2.14.gz
gunzip jfa9b78rdniyw7qilsmw3bh02x8x68ly-binutils-mesboot0-2.14.gz
diff -u jfa9b78rdniyw7qilsmw3bh02x8x68ly-binutils-mesboot0-2.14 2020-10-10-binutils-mesboot0.log
[..]

@@ -5538,16 +5537,16 @@
checking for i386-unknown-linux-windres... no
checking for windres... windres
checking whether to enable maintainer-specific portions of Makefiles... no
-updating cache ./config.cache
+not updating unwritable cache ./config.cache
creating ./config.status
creating Makefile
[..]
@@ -5558,7 +5557,7 @@
checking whether the C compiler (tcc -D __GLIBC_MINOR__=6 -g ) works... yes
checking whether the C compiler (tcc -D __GLIBC_MINOR__=6 -g ) is a cross-compiler... no
checking whether we are using GNU C... no
-checking for ranlib... (cached) true
+checking for ranlib... true
checking for POSIXized ISC... no
checking for ANSI C header files... yes
checking for working const... yes

config values do not get cached (why is config.cache
unwritable?)...which seems to lead to a misdectected presence of lex:

Toggle snippet (16 lines)
-@ build-succeeded /gnu/store/bz6xjpzlwf57m4bg3w5ihlq638sscx54-binutils-mesboot0-2.14.drv -
-checking for flex... (cached) /tmp/guix-build-binutils-mesboot0-2.14.drv-0/binutils-2.14/missing flex
-checking for flex... (cached) /tmp/guix-build-binutils-mesboot0-2.14.drv-0/binutils-2.14/missing flex
-checking for yywrap in -ll... (cached) no
-checking lex output file root... (cached) lex.yy
[..]
+checking for flex... no
+checking for lex... no
+./configure: line 4417: flex: command not found
+checking for flex... lex
+checking for yywrap in -ll... no
+checking lex output file root... ./configure: line 4505: lex: command not found
+configure: error: cannot find output from lex; giving up
+make: *** [configure-ld] Error 1

What is your build environment/version of guix you're using? It looks
like some unreproducible bit is leaking in somewhere??

Greetings,
Janneke

--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com| Avatar® http://AvatarAcademy.com
L
L
Ludovic Courtès wrote on 11 Dec 2020 06:15
control message for bug #45165
(address . control@debbugs.gnu.org)
87im9877jo.fsf@gnu.org
severity 45165 important
quit
C
C
Carl Dong wrote on 11 Dec 2020 08:37
Re: bug#45165: binutils-mesboot0 fails at configure, cannot find lex
(name . Jan Nieuwenhuizen)(address . janneke@gnu.org)(address . 45165@debbugs.gnu.org)
B61BFE51-F26C-45D1-84F6-76F75D43A25B@carldong.me
Hi Janneke!

Oh, that’s a very good find! I have no idea why config.cache is not writable… This is most strange!

I checked that my mountpoints have enough free space… Not sure what else to check?

Looking at `guix describe`, I’m on bf8dfe3df025e4ac80cccb87497b4f072ba10e2a

Cheers,
Carl Dong

Toggle quote (69 lines)
> On Dec 11, 2020, at 1:33 AM, Jan Nieuwenhuizen <janneke@gnu.org> wrote:
>
> Carl Dong writes:
>
> Hello!
>
>> Some more information from my debugging:
>>
>> 1. This error is reproducible even when I specify --cores=1, which is very strange
>> 2. I have attached the full log to this email
>
> Diffing this with the build log from
>
> --8<---------------cut here---------------start------------->8---
> guix build -e '(@@ (gnu packages commencement) binutils-mesboot0)' --log-file
> wget https://ci.guix.gnu.org/log/jfa9b78rdniyw7qilsmw3bh02x8x68ly-binutils-mesboot0-2.14 -O jfa9b78rdniyw7qilsmw3bh02x8x68ly-binutils-mesboot0-2.14.gz
> gunzip jfa9b78rdniyw7qilsmw3bh02x8x68ly-binutils-mesboot0-2.14.gz
> diff -u jfa9b78rdniyw7qilsmw3bh02x8x68ly-binutils-mesboot0-2.14 2020-10-10-binutils-mesboot0.log
> [..]
>
> @@ -5538,16 +5537,16 @@
> checking for i386-unknown-linux-windres... no
> checking for windres... windres
> checking whether to enable maintainer-specific portions of Makefiles... no
> -updating cache ./config.cache
> +not updating unwritable cache ./config.cache
> creating ./config.status
> creating Makefile
> [..]
> @@ -5558,7 +5557,7 @@
> checking whether the C compiler (tcc -D __GLIBC_MINOR__=6 -g ) works... yes
> checking whether the C compiler (tcc -D __GLIBC_MINOR__=6 -g ) is a cross-compiler... no
> checking whether we are using GNU C... no
> -checking for ranlib... (cached) true
> +checking for ranlib... true
> checking for POSIXized ISC... no
> checking for ANSI C header files... yes
> checking for working const... yes
> --8<---------------cut here---------------end--------------->8---
>
> config values do not get cached (why is config.cache
> unwritable?)...which seems to lead to a misdectected presence of lex:
>
> --8<---------------cut here---------------start------------->8---
> -@ build-succeeded /gnu/store/bz6xjpzlwf57m4bg3w5ihlq638sscx54-binutils-mesboot0-2.14.drv -
> -checking for flex... (cached) /tmp/guix-build-binutils-mesboot0-2.14.drv-0/binutils-2.14/missing flex
> -checking for flex... (cached) /tmp/guix-build-binutils-mesboot0-2.14.drv-0/binutils-2.14/missing flex
> -checking for yywrap in -ll... (cached) no
> -checking lex output file root... (cached) lex.yy
> [..]
> +checking for flex... no
> +checking for lex... no
> +./configure: line 4417: flex: command not found
> +checking for flex... lex
> +checking for yywrap in -ll... no
> +checking lex output file root... ./configure: line 4505: lex: command not found
> +configure: error: cannot find output from lex; giving up
> +make: *** [configure-ld] Error 1
> --8<---------------cut here---------------end--------------->8---
>
> What is your build environment/version of guix you're using? It looks
> like some unreproducible bit is leaking in somewhere??
>
> Greetings,
> Janneke
>
> --
> Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
> Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
C
C
Carl Dong wrote on 15 Dec 2020 10:50
(address . 45165@debbugs.gnu.org)
58F8D6E0-B15D-47D2-A468-8620B9DBD90D@carldong.me
Hi all,

Let me know if there’s anything at all I can do here to help debug :-)

Cheers,
Carl Dong
C
C
Carl Dong wrote on 15 Dec 2020 16:46
(address . 45165@debbugs.gnu.org)
1CB66010-F81E-447B-9715-B1A79415EAA6@carldong.me
Hi all,

I think I have a new lead!

Here’s what I did:
1. cd /tmp/guix-build-binutils-mesboot0-2.14.drv-0/binutils-2.14
2. env -i bash --rcfile environment-variables
3. Ran the configure command from the log, just to check:
./configure --disable-nls --disable-shared --disable-werror --build=i386-unknown-linux --host=i386-unknown-linux --target=i386-unknown-linux --with-sysroot=/ --prefix=/gnu/store/jfa9b78rdniyw7qilsmw3bh02x8x68ly-binutils-mesboot0-2.14

Indeed it did still output "not updating unwritable cache ./config.cache”

However, when I tried `test -w config.cache`, there was no status code…

This led me to look at ./configure’s shebang, which is:
/gnu/store/m89p469fxwn4hj7an9givd1ry9vk7j2l-bash-mesboot0-2.05b/bin/sh

Then I did:
/gnu/store/m89p469fxwn4hj7an9givd1ry9vk7j2l-bash-mesboot0-2.05b/bin/sh -c "test -w config.cache”

Which _did_ exit with status=1 !

So I believe that this is a problem with the “test” builtin in /gnu/store/m89p469fxwn4hj7an9givd1ry9vk7j2l-bash-mesboot0-2.05b

So I ran:
env -i bash --rcfile environment-variables -c 'strace -v -e trace=file /gnu/store/m89p469fxwn4hj7an9givd1ry 9vk7j2l-bash-mesboot0-2.05b/bin/sh -c "test -w config.cache”'

And the output:
execve("/gnu/store/m89p469fxwn4hj7an9givd1ry9vk7j2l-bash-mesboot0-2.05b/bin/sh", ["/gnu/store/m89p469fxwn4hj7an9giv"..., "-c", "test -w config.cache"], ["PWD=/tmp/guix-build-binutils-mes"..., "SHLVL=0", "_=/usr/bin/strace"]) = 0
[ Process PID=2049037 runs in 32 bit mode. ]
open("/dev/tty", O_RDWR) = 3
stat("/tmp/guix-build-binutils-mesboot0-2.14.drv-0", {st_dev=makedev(0, 0x2f), st_ino=2546749, st_mode=S_IFDIR|0755, st_nlink=3, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=0, st_size=80, st_atime=1608079054 /* 2020-12-15T19:37:34.095396729-0500 */, st_atime_nsec=95396729, st_mtime=1607635957 /* 2020-12-10T16:32:37.842047431-0500 */, st_mtime_nsec=842047431, st_ctime=1607636165 /* 2020-12-10T16:36:05.793930344-0500 */, st_ctime_nsec=793930344}) = 0
stat(".", {st_dev=makedev(0, 0x2f), st_ino=2546749, st_mode=S_IFDIR|0755, st_nlink=3, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=0, st_size=80, st_atime=1608079054 /* 2020-12-15T19:37:34.095396729-0500 */, st_atime_nsec=95396729, st_mtime=1607635957 /* 2020-12-10T16:32:37.842047431-0500 */, st_mtime_nsec=842047431, st_ctime=1607636165 /* 2020-12-10T16:36:05.793930344-0500 */, st_ctime_nsec=793930344}) = 0
stat("config.cache", 0xfff9affc) = -1 ENOENT (No such file or directory)
+++ exited with 1 +++

I had a hunch that the mode is most likely the problem. So I tried the following:

chmod 664 config.cache -> status is still 1
chmod 646 config.cache -> status is now 0!!

So somehow the “test” builtin for my bash-mesboot0 doesn’t think that it has owner or group permissions to write to a file that itself created?

Let me know what you guys think could be the case!

Cheers,
Carl Dong
C
C
Carl Dong wrote on 16 Dec 2020 09:49
(address . 45165@debbugs.gnu.org)
F0D8AC89-B52F-49B1-A0D3-A76F17635A84@carldong.me
More clues:

I ran the following one-liner:

for i in $(seq 0 65535); do sudo chown $i:$i /tmp/guix-build-binutils-mesboot0-2.14.drv-0/binutils-2.14/config.cache && /gnu/store/m89p469fxwn4hj7an9givd1ry9vk7j2l-bash-mesboot0-2.05b/bin/sh -c "test -w /tmp/guix-build-binutils-mesboot0-2.14.drv-0/binutils-2.14/config.cache" && echo "Winner: $i" && break; done

This is designed to iterate through all possible uid values, chown the config.cache file, and test if that uid makes the “test” builtin think that it is writable. If there is one, it’ll print “Winner: <uid>” and exit

The result: Nothing was printed and the exit status was 1

Not sure where to go from here.

Cheers,
Carl Dong

Toggle quote (51 lines)
> On Dec 15, 2020, at 7:46 PM, Carl Dong <contact@carldong.me> wrote:
>
> Hi all,
>
> I think I have a new lead!
>
> Here’s what I did:
> 1. cd /tmp/guix-build-binutils-mesboot0-2.14.drv-0/binutils-2.14
> 2. env -i bash --rcfile environment-variables
> 3. Ran the configure command from the log, just to check:
> ./configure --disable-nls --disable-shared --disable-werror --build=i386-unknown-linux --host=i386-unknown-linux --target=i386-unknown-linux --with-sysroot=/ --prefix=/gnu/store/jfa9b78rdniyw7qilsmw3bh02x8x68ly-binutils-mesboot0-2.14
>
> Indeed it did still output "not updating unwritable cache ./config.cache”
>
> However, when I tried `test -w config.cache`, there was no status code…
>
> This led me to look at ./configure’s shebang, which is:
> /gnu/store/m89p469fxwn4hj7an9givd1ry9vk7j2l-bash-mesboot0-2.05b/bin/sh
>
> Then I did:
> /gnu/store/m89p469fxwn4hj7an9givd1ry9vk7j2l-bash-mesboot0-2.05b/bin/sh -c "test -w config.cache”
>
> Which _did_ exit with status=1 !
>
> So I believe that this is a problem with the “test” builtin in /gnu/store/m89p469fxwn4hj7an9givd1ry9vk7j2l-bash-mesboot0-2.05b
>
> So I ran:
> env -i bash --rcfile environment-variables -c 'strace -v -e trace=file /gnu/store/m89p469fxwn4hj7an9givd1ry 9vk7j2l-bash-mesboot0-2.05b/bin/sh -c "test -w config.cache”'
>
> And the output:
> execve("/gnu/store/m89p469fxwn4hj7an9givd1ry9vk7j2l-bash-mesboot0-2.05b/bin/sh", ["/gnu/store/m89p469fxwn4hj7an9giv"..., "-c", "test -w config.cache"], ["PWD=/tmp/guix-build-binutils-mes"..., "SHLVL=0", "_=/usr/bin/strace"]) = 0
> [ Process PID=2049037 runs in 32 bit mode. ]
> open("/dev/tty", O_RDWR) = 3
> stat("/tmp/guix-build-binutils-mesboot0-2.14.drv-0", {st_dev=makedev(0, 0x2f), st_ino=2546749, st_mode=S_IFDIR|0755, st_nlink=3, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=0, st_size=80, st_atime=1608079054 /* 2020-12-15T19:37:34.095396729-0500 */, st_atime_nsec=95396729, st_mtime=1607635957 /* 2020-12-10T16:32:37.842047431-0500 */, st_mtime_nsec=842047431, st_ctime=1607636165 /* 2020-12-10T16:36:05.793930344-0500 */, st_ctime_nsec=793930344}) = 0
> stat(".", {st_dev=makedev(0, 0x2f), st_ino=2546749, st_mode=S_IFDIR|0755, st_nlink=3, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=0, st_size=80, st_atime=1608079054 /* 2020-12-15T19:37:34.095396729-0500 */, st_atime_nsec=95396729, st_mtime=1607635957 /* 2020-12-10T16:32:37.842047431-0500 */, st_mtime_nsec=842047431, st_ctime=1607636165 /* 2020-12-10T16:36:05.793930344-0500 */, st_ctime_nsec=793930344}) = 0
> stat("config.cache", 0xfff9affc) = -1 ENOENT (No such file or directory)
> +++ exited with 1 +++
>
> I had a hunch that the mode is most likely the problem. So I tried the following:
>
> chmod 664 config.cache -> status is still 1
> chmod 646 config.cache -> status is now 0!!
>
> So somehow the “test” builtin for my bash-mesboot0 doesn’t think that it has owner or group permissions to write to a file that itself created?
>
> Let me know what you guys think could be the case!
>
> Cheers,
> Carl Dong
>
>
L
L
Ludovic Courtès wrote on 22 Dec 2020 06:33
(name . Carl Dong)(address . contact@carldong.me)(address . 45165@debbugs.gnu.org)
87a6u529nl.fsf@gnu.org
Hi!

Carl Dong <contact@carldong.me> skribis:

Toggle quote (22 lines)
> This led me to look at ./configure’s shebang, which is:
> /gnu/store/m89p469fxwn4hj7an9givd1ry9vk7j2l-bash-mesboot0-2.05b/bin/sh
>
> Then I did:
> /gnu/store/m89p469fxwn4hj7an9givd1ry9vk7j2l-bash-mesboot0-2.05b/bin/sh -c "test -w config.cache”
>
> Which _did_ exit with status=1 !
>
> So I believe that this is a problem with the “test” builtin in /gnu/store/m89p469fxwn4hj7an9givd1ry9vk7j2l-bash-mesboot0-2.05b
>
> So I ran:
> env -i bash --rcfile environment-variables -c 'strace -v -e trace=file /gnu/store/m89p469fxwn4hj7an9givd1ry 9vk7j2l-bash-mesboot0-2.05b/bin/sh -c "test -w config.cache”'
>
> And the output:
> execve("/gnu/store/m89p469fxwn4hj7an9givd1ry9vk7j2l-bash-mesboot0-2.05b/bin/sh", ["/gnu/store/m89p469fxwn4hj7an9giv"..., "-c", "test -w config.cache"], ["PWD=/tmp/guix-build-binutils-mes"..., "SHLVL=0", "_=/usr/bin/strace"]) = 0
> [ Process PID=2049037 runs in 32 bit mode. ]
> open("/dev/tty", O_RDWR) = 3
> stat("/tmp/guix-build-binutils-mesboot0-2.14.drv-0", {st_dev=makedev(0, 0x2f), st_ino=2546749, st_mode=S_IFDIR|0755, st_nlink=3, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=0, st_size=80, st_atime=1608079054 /* 2020-12-15T19:37:34.095396729-0500 */, st_atime_nsec=95396729, st_mtime=1607635957 /* 2020-12-10T16:32:37.842047431-0500 */, st_mtime_nsec=842047431, st_ctime=1607636165 /* 2020-12-10T16:36:05.793930344-0500 */, st_ctime_nsec=793930344}) = 0
> stat(".", {st_dev=makedev(0, 0x2f), st_ino=2546749, st_mode=S_IFDIR|0755, st_nlink=3, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=0, st_size=80, st_atime=1608079054 /* 2020-12-15T19:37:34.095396729-0500 */, st_atime_nsec=95396729, st_mtime=1607635957 /* 2020-12-10T16:32:37.842047431-0500 */, st_mtime_nsec=842047431, st_ctime=1607636165 /* 2020-12-10T16:36:05.793930344-0500 */, st_ctime_nsec=793930344}) = 0
> stat("config.cache", 0xfff9affc) = -1 ENOENT (No such file or directory)
> +++ exited with 1 +++

Wait, here ‘stat’ returns ENOENT, so it’s no wonder that ‘test -w
config.cache’ returns 1, no? Could you rerun ‘strace’ after making sure
‘config.cache’ exists?

The builtin seems to work for me:

Toggle snippet (12 lines)
$ ls -l config.cache
-rw-r--r-- 1 ludo users 9009 Dec 13 22:49 config.cache
$ strace -e stat /gnu/store/m89p469fxwn4hj7an9givd1ry9vk7j2l-bash-mesboot0-2.05b/bin/sh -c "test -w config.cache"
[ Process PID=9623 runs in 32 bit mode. ]
stat("/home/ludo/src/guix", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("config.cache", {st_mode=S_IFREG|0644, st_size=9009, ...}) = 0
+++ exited with 0 +++
$ echo $?
0

What kernel are you running?

Weird!

Thanks for investigating,
Ludo’.
C
C
Carl Dong wrote on 22 Dec 2020 08:42
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 45165@debbugs.gnu.org)
34D1DBDB-DEBC-4EEE-A8B1-555831DCA712@carldong.me
Toggle quote (3 lines)
> Wait, here ‘stat’ returns ENOENT, so it’s no wonder that ‘test -w
> config.cache’ returns 1, no? Could you rerun ‘strace’ after making sure
> ‘config.cache’ exists?
Oh sorry! That’s my mistake!

Here is:
env -i bash --rcfile environment-variables -c 'strace -v -e trace=file /gnu/store/m89p469fxwn4hj7an9givd1ry9vk7j2l-bash-mesboot0-2.05b/bin/sh -c "test -w binutils-2.14/config.cache"'

Toggle snippet (9 lines)
execve("/gnu/store/m89p469fxwn4hj7an9givd1ry9vk7j2l-bash-mesboot0-2.05b/bin/sh", ["/gnu/store/m89p469fxwn4hj7an9giv"..., "-c", "test -w binutils-2.14/config.cac"...], ["PWD=/tmp/guix-build-binutils-mes"..., "SHLVL=0", "_=/usr/bin/strace"]) = 0
[ Process PID=695840 runs in 32 bit mode. ]
open("/dev/tty", O_RDWR) = 3
stat("/tmp/guix-build-binutils-mesboot0-2.14.drv-1", {st_dev=makedev(0, 0x30), st_ino=368856, st_mode=S_IFDIR|0755, st_nlink=3, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=0, st_size=80, st_atime=1608654756 /* 2020-12-22T11:32:36.146518553-0500 */, st_atime_nsec=146518553, st_mtime=1608654304 /* 2020-12-22T11:25:04.021652128-0500 */, st_mtime_nsec=21652128, st_ctime=1608654512 /* 2020-12-22T11:28:32.356967474-0500 */, st_ctime_nsec=356967474}) = 0
stat(".", {st_dev=makedev(0, 0x30), st_ino=368856, st_mode=S_IFDIR|0755, st_nlink=3, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=0, st_size=80, st_atime=1608654756 /* 2020-12-22T11:32:36.146518553-0500 */, st_atime_nsec=146518553, st_mtime=1608654304 /* 2020-12-22T11:25:04.021652128-0500 */, st_mtime_nsec=21652128, st_ctime=1608654512 /* 2020-12-22T11:28:32.356967474-0500 */, st_ctime_nsec=356967474}) = 0
stat("binutils-2.14/config.cache", {st_dev=makedev(0, 0x30), st_ino=374461, st_mode=S_IFREG|0644, st_nlink=1, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=0, st_size=0, st_atime=1608654315 /* 2020-12-22T11:25:15.211937687-0500 */, st_atime_nsec=211937687, st_mtime=1608654315 /* 2020-12-22T11:25:15.211937687-0500 */, st_mtime_nsec=211937687, st_ctime=1608654512 /* 2020-12-22T11:28:32.356967474-0500 */, st_ctime_nsec=356967474}) = 0
+++ exited with 1 +++

For good measure, here is “id -a":
env -i bash --rcfile environment-variables -c 'strace -v -e trace=file /gnu/store/m89p469fxwn4hj7an9givd1ry9vk7j2l-bash-mesboot0-2.05b/bin/sh -c "id -a” '

Toggle snippet (33 lines)
execve("/gnu/store/m89p469fxwn4hj7an9givd1ry9vk7j2l-bash-mesboot0-2.05b/bin/sh", ["/gnu/store/m89p469fxwn4hj7an9giv"..., "-c", "id -a"], ["PWD=/tmp/guix-build-binutils-mes"..., "SHLVL=0", "_=/usr/bin/strace"]) = 0
[ Process PID=695963 runs in 32 bit mode. ]
open("/dev/tty", O_RDWR) = 3
stat("/tmp/guix-build-binutils-mesboot0-2.14.drv-1", {st_dev=makedev(0, 0x30), st_ino=368856, st_mode=S_IFDIR|0755, st_nlink=3, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=0, st_size=80, st_atime=1608654847 /* 2020-12-22T11:34:07.888857982-0500 */, st_atime_nsec=888857982, st_mtime=1608654304 /* 2020-12-22T11:25:04.021652128-0500 */, st_mtime_nsec=21652128, st_ctime=1608654512 /* 2020-12-22T11:28:32.356967474-0500 */, st_ctime_nsec=356967474}) = 0
stat(".", {st_dev=makedev(0, 0x30), st_ino=368856, st_mode=S_IFDIR|0755, st_nlink=3, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=0, st_size=80, st_atime=1608654847 /* 2020-12-22T11:34:07.888857982-0500 */, st_atime_nsec=888857982, st_mtime=1608654304 /* 2020-12-22T11:25:04.021652128-0500 */, st_mtime_nsec=21652128, st_ctime=1608654512 /* 2020-12-22T11:28:32.356967474-0500 */, st_ctime_nsec=356967474}) = 0
stat(".", {st_dev=makedev(0, 0x30), st_ino=368856, st_mode=S_IFDIR|0755, st_nlink=3, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=0, st_size=80, st_atime=1608654847 /* 2020-12-22T11:34:07.888857982-0500 */, st_atime_nsec=888857982, st_mtime=1608654304 /* 2020-12-22T11:25:04.021652128-0500 */, st_mtime_nsec=21652128, st_ctime=1608654512 /* 2020-12-22T11:28:32.356967474-0500 */, st_ctime_nsec=356967474}) = 0
stat("/usr/gnu/bin/id", 0xff95d16c) = -1 ENOENT (No such file or directory)
stat("/usr/local/bin/id", 0xff95d16c) = -1 ENOENT (No such file or directory)
stat("/usr/ucb/id", 0xff95d16c) = -1 ENOENT (No such file or directory)
stat("/bin/id", {st_dev=makedev(0x9, 0x1), st_ino=406080, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=88, st_size=43176, st_atime=1608653719 /* 2020-12-22T11:15:19.090043475-0500 */, st_atime_nsec=90043475, st_mtime=1583499672 /* 2020-03-06T08:01:12-0500 */, st_mtime_nsec=0, st_ctime=1603815540 /* 2020-10-27T12:19:00.281619589-0400 */, st_ctime_nsec=281619589}) = 0
stat("/bin/id", {st_dev=makedev(0x9, 0x1), st_ino=406080, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=88, st_size=43176, st_atime=1608653719 /* 2020-12-22T11:15:19.090043475-0500 */, st_atime_nsec=90043475, st_mtime=1583499672 /* 2020-03-06T08:01:12-0500 */, st_mtime_nsec=0, st_ctime=1603815540 /* 2020-10-27T12:19:00.281619589-0400 */, st_ctime_nsec=281619589}) = 0
execve("/bin/id", ["id", "-a"], ["_=/bin/id", "PWD=/tmp/guix-build-binutils-mes"..., "SHLVL=1"]) = 0
[ Process PID=695963 runs in 64 bit mode. ]
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/etc/group", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/etc/group", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/etc/group", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/etc/group", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/etc/group", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/etc/group", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/etc/group", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/etc/group", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/etc/group", O_RDONLY|O_CLOEXEC) = 3
uid=1000(dongcarl) gid=1000(dongcarl) groups=1000(dongcarl),926(docker),985(users),987(uucp),998(wheel),999(adm),1001(plugdev)
+++ exited with 0 +++

Toggle quote (1 lines)
> What kernel are you running?
I think you might be right that this is a kernel thing. As I’ve been able to reproduce this when running guix inside an ubuntu 20.04 docker container on the same machine, but not when I run ubuntu 20.04 in a VPS.

1. My "uname -a”: Linux dai 5.9.14-arch1-1 #1 SMP PREEMPT Sat, 12 Dec 2020 14:37:12 +0000 x86_64 GNU/Linux
2. My /proc/config.gz is attached.
3. My “sysctl -a”:

Toggle snippet (445 lines)
abi.vsyscall32 = 1
debug.exception-trace = 1
debug.kprobes-optimization = 1
dev.hpet.max-user-freq = 64
dev.mac_hid.mouse_button2_keycode = 97
dev.mac_hid.mouse_button3_keycode = 100
dev.mac_hid.mouse_button_emulation = 0
dev.raid.speed_limit_max = 200000
dev.raid.speed_limit_min = 1000
dev.scsi.logging_level = 0
dev.tty.ldisc_autoload = 1
fs.aio-max-nr = 1048576
fs.aio-nr = 1536
fs.binfmt_misc.status = enabled
fs.dentry-state = 767414 669546 45 0 191452 0
fs.dir-notify-enable = 1
fs.epoll.max_user_watches = 13475573
fs.file-max = 9223372036854775807
fs.file-nr = 4416 0 9223372036854775807
fs.inode-nr = 667421 292174
fs.inode-state = 667421 292174 0 0 0 0 0
fs.inotify.max_queued_events = 16384
fs.inotify.max_user_instances = 1024
fs.inotify.max_user_watches = 524288
fs.lease-break-time = 45
fs.leases-enable = 1
fs.mount-max = 100000
fs.mqueue.msg_default = 10
fs.mqueue.msg_max = 10
fs.mqueue.msgsize_default = 8192
fs.mqueue.msgsize_max = 8192
fs.mqueue.queues_max = 256
fs.nr_open = 1073741816
fs.overflowgid = 65534
fs.overflowuid = 65534
fs.pipe-max-size = 1048576
fs.pipe-user-pages-hard = 0
fs.pipe-user-pages-soft = 16384
fs.protected_fifos = 1
fs.protected_hardlinks = 1
fs.protected_regular = 1
fs.protected_symlinks = 1
fs.quota.allocated_dquots = 0
fs.quota.cache_hits = 0
fs.quota.drops = 0
fs.quota.free_dquots = 0
fs.quota.lookups = 0
fs.quota.reads = 0
fs.quota.syncs = 62
fs.quota.writes = 0
fs.suid_dumpable = 2
fs.verity.require_signatures = 0
fscache.object_max_active = 128
fscache.operation_max_active = 64
kernel.acct = 4 2 30
kernel.acpi_video_flags = 0
kernel.auto_msgmni = 0
kernel.bootloader_type = 33
kernel.bootloader_version = 1
kernel.bpf_stats_enabled = 0
kernel.cad_pid = 1
kernel.cap_last_cap = 40
kernel.core_pattern = |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h
kernel.core_pipe_limit = 16
kernel.core_uses_pid = 1
kernel.ctrl-alt-del = 0
kernel.dmesg_restrict = 0
kernel.domainname = (none)
kernel.ftrace_dump_on_oops = 0
kernel.ftrace_enabled = 1
kernel.hardlockup_all_cpu_backtrace = 0
kernel.hardlockup_panic = 0
kernel.hostname = dai
kernel.hung_task_all_cpu_backtrace = 0
kernel.hung_task_check_count = 4194304
kernel.hung_task_check_interval_secs = 0
kernel.hung_task_panic = 0
kernel.hung_task_timeout_secs = 120
kernel.hung_task_warnings = 10
kernel.io_delay_type = 0
kernel.kexec_load_disabled = 0
kernel.keys.gc_delay = 300
kernel.keys.maxbytes = 20000
kernel.keys.maxkeys = 200
kernel.keys.persistent_keyring_expiry = 259200
kernel.keys.root_maxbytes = 25000000
kernel.keys.root_maxkeys = 1000000
kernel.kptr_restrict = 0
kernel.latencytop = 0
kernel.max_lock_depth = 1024
kernel.modprobe = /sbin/modprobe
kernel.modules_disabled = 0
kernel.msg_next_id = -1
kernel.msgmax = 8192
kernel.msgmnb = 16384
kernel.msgmni = 32000
kernel.ngroups_max = 65536
kernel.nmi_watchdog = 1
kernel.ns_last_pid = 700080
kernel.numa_balancing = 1
kernel.numa_balancing_scan_delay_ms = 1000
kernel.numa_balancing_scan_period_max_ms = 60000
kernel.numa_balancing_scan_period_min_ms = 1000
kernel.numa_balancing_scan_size_mb = 256
kernel.oops_all_cpu_backtrace = 0
kernel.osrelease = 5.9.14-arch1-1
kernel.ostype = Linux
kernel.overflowgid = 65534
kernel.overflowuid = 65534
kernel.panic = 0
kernel.panic_on_io_nmi = 0
kernel.panic_on_oops = 0
kernel.panic_on_rcu_stall = 0
kernel.panic_on_unrecovered_nmi = 0
kernel.panic_on_warn = 0
kernel.panic_print = 0
kernel.perf_cpu_time_max_percent = 25
kernel.perf_event_max_contexts_per_stack = 8
kernel.perf_event_max_sample_rate = 39300
kernel.perf_event_max_stack = 127
kernel.perf_event_mlock_kb = 516
kernel.perf_event_paranoid = 2
kernel.pid_max = 4194304
kernel.poweroff_cmd = /sbin/poweroff
kernel.print-fatal-signals = 0
kernel.printk = 4 4 1 4
kernel.printk_delay = 0
kernel.printk_devkmsg = on
kernel.printk_ratelimit = 5
kernel.printk_ratelimit_burst = 10
kernel.pty.max = 4096
kernel.pty.nr = 64
kernel.pty.reserve = 1024
kernel.random.boot_id = 3944c8ce-e072-48d6-888c-e47a30824f04
kernel.random.entropy_avail = 3454
kernel.random.poolsize = 4096
kernel.random.urandom_min_reseed_secs = 60
kernel.random.uuid = b0382ead-5fb6-4bf4-89de-c723c8a4a58c
kernel.random.write_wakeup_threshold = 896
kernel.randomize_va_space = 2
kernel.real-root-dev = 0
kernel.sched_autogroup_enabled = 1
kernel.sched_cfs_bandwidth_slice_us = 5000
kernel.sched_child_runs_first = 0
kernel.sched_deadline_period_max_us = 4194304
kernel.sched_deadline_period_min_us = 100
kernel.sched_domain.cpu0.domain0.busy_factor = 32
kernel.sched_domain.cpu0.domain0.cache_nice_tries = 0
kernel.sched_domain.cpu0.domain0.flags = 2391
kernel.sched_domain.cpu0.domain0.imbalance_pct = 110
kernel.sched_domain.cpu0.domain0.max_interval = 4
kernel.sched_domain.cpu0.domain0.max_newidle_lb_cost = 2296
kernel.sched_domain.cpu0.domain0.min_interval = 2
kernel.sched_domain.cpu0.domain0.name = SMT
kernel.sched_domain.cpu0.domain1.busy_factor = 32
kernel.sched_domain.cpu0.domain1.cache_nice_tries = 1
kernel.sched_domain.cpu0.domain1.flags = 2327
kernel.sched_domain.cpu0.domain1.imbalance_pct = 117
kernel.sched_domain.cpu0.domain1.max_interval = 12
kernel.sched_domain.cpu0.domain1.max_newidle_lb_cost = 4855
kernel.sched_domain.cpu0.domain1.min_interval = 6
kernel.sched_domain.cpu0.domain1.name = MC
kernel.sched_domain.cpu0.domain2.busy_factor = 32
kernel.sched_domain.cpu0.domain2.cache_nice_tries = 1
kernel.sched_domain.cpu0.domain2.flags = 2071
kernel.sched_domain.cpu0.domain2.imbalance_pct = 125
kernel.sched_domain.cpu0.domain2.max_interval = 24
kernel.sched_domain.cpu0.domain2.max_newidle_lb_cost = 6746
kernel.sched_domain.cpu0.domain2.min_interval = 12
kernel.sched_domain.cpu0.domain2.name = NODE
kernel.sched_domain.cpu0.domain3.busy_factor = 32
kernel.sched_domain.cpu0.domain3.cache_nice_tries = 2
kernel.sched_domain.cpu0.domain3.flags = 12823
kernel.sched_domain.cpu0.domain3.imbalance_pct = 125
kernel.sched_domain.cpu0.domain3.max_interval = 96
kernel.sched_domain.cpu0.domain3.max_newidle_lb_cost = 39002
kernel.sched_domain.cpu0.domain3.min_interval = 48
kernel.sched_domain.cpu0.domain3.name = NUMA
kernel.sched_domain.cpu1.domain0.busy_factor = 32
kernel.sched_domain.cpu1.domain0.cache_nice_tries = 0
kernel.sched_domain.cpu1.domain0.flags = 2391
kernel.sched_domain.cpu1.domain0.imbalance_pct = 110
kernel.sched_domain.cpu1.domain0.max_interval = 4
kernel.sched_domain.cpu1.domain0.max_newidle_lb_cost = 6014
kernel.sched_domain.cpu1.domain0.min_interval = 2
kernel.sched_domain.cpu1.domain0.name = SMT
kernel.sched_domain.cpu1.domain1.busy_factor = 32
kernel.sched_domain.cpu1.domain1.cache_nice_tries = 1
kernel.sched_domain.cpu1.domain1.flags = 2327
kernel.sched_domain.cpu1.domain1.imbalance_pct = 117
kernel.sched_domain.cpu1.domain1.max_interval = 12
kernel.sched_domain.cpu1.domain1.max_newidle_lb_cost = 6521
kernel.sched_domain.cpu1.domain1.min_interval = 6
kernel.sched_domain.cpu1.domain1.name = MC
kernel.sched_domain.cpu1.domain2.busy_factor = 32
kernel.sched_domain.cpu1.domain2.cache_nice_tries = 1
kernel.sched_domain.cpu1.domain2.flags = 2071
kernel.sched_domain.cpu1.domain2.imbalance_pct = 125
kernel.sched_domain.cpu1.domain2.max_interval = 24
kernel.sched_domain.cpu1.domain2.max_newidle_lb_cost = 11448
kernel.sched_domain.cpu1.domain2.min_interval = 12
kernel.sched_domain.cpu1.domain2.name = NODE
kernel.sched_domain.cpu1.domain3.busy_factor = 32
kernel.sched_domain.cpu1.domain3.cache_nice_tries = 2
kernel.sched_domain.cpu1.domain3.flags = 12823
kernel.sched_domain.cpu1.domain3.imbalance_pct = 125
kernel.sched_domain.cpu1.domain3.max_interval = 96
kernel.sched_domain.cpu1.domain3.max_newidle_lb_cost = 50333
kernel.sched_domain.cpu1.domain3.min_interval = 48
kernel.sched_domain.cpu1.domain3.name = NUMA
kernel.sched_domain.cpu10.domain0.busy_factor = 32
kernel.sched_domain.cpu10.domain0.cache_nice_tries = 0
kernel.sched_domain.cpu10.domain0.flags = 2391
kernel.sched_domain.cpu10.domain0.imbalance_pct = 110
kernel.sched_domain.cpu10.domain0.max_interval = 4
kernel.sched_domain.cpu10.domain0.max_newidle_lb_cost = 2795
kernel.sched_domain.cpu10.domain0.min_interval = 2
kernel.sched_domain.cpu10.domain0.name = SMT
kernel.sched_domain.cpu10.domain1.busy_factor = 32
kernel.sched_domain.cpu10.domain1.cache_nice_tries = 1
kernel.sched_domain.cpu10.domain1.flags = 2327
kernel.sched_domain.cpu10.domain1.imbalance_pct = 117
kernel.sched_domain.cpu10.domain1.max_interval = 12
kernel.sched_domain.cpu10.domain1.max_newidle_lb_cost = 5905
kernel.sched_domain.cpu10.domain1.min_interval = 6
kernel.sched_domain.cpu10.domain1.name = MC
kernel.sched_domain.cpu10.domain2.busy_factor = 32
kernel.sched_domain.cpu10.domain2.cache_nice_tries = 1
kernel.sched_domain.cpu10.domain2.flags = 2071
kernel.sched_domain.cpu10.domain2.imbalance_pct = 125
kernel.sched_domain.cpu10.domain2.max_interval = 24
kernel.sched_domain.cpu10.domain2.max_newidle_lb_cost = 8355
kernel.sched_domain.cpu10.domain2.min_interval = 12
kernel.sched_domain.cpu10.domain2.name = NODE
kernel.sched_domain.cpu10.domain3.busy_factor = 32
kernel.sched_domain.cpu10.domain3.cache_nice_tries = 2
kernel.sched_domain.cpu10.domain3.flags = 12823
kernel.sched_domain.cpu10.domain3.imbalance_pct = 125
kernel.sched_domain.cpu10.domain3.max_interval = 96
kernel.sched_domain.cpu10.domain3.max_newidle_lb_cost = 27172
kernel.sched_domain.cpu10.domain3.min_interval = 48
kernel.sched_domain.cpu10.domain3.name = NUMA
kernel.sched_domain.cpu11.domain0.busy_factor = 32
kernel.sched_domain.cpu11.domain0.cache_nice_tries = 0
kernel.sched_domain.cpu11.domain0.flags = 2391
kernel.sched_domain.cpu11.domain0.imbalance_pct = 110
kernel.sched_domain.cpu11.domain0.max_interval = 4
kernel.sched_domain.cpu11.domain0.max_newidle_lb_cost = 3958
kernel.sched_domain.cpu11.domain0.min_interval = 2
kernel.sched_domain.cpu11.domain0.name = SMT
kernel.sched_domain.cpu11.domain1.busy_factor = 32
kernel.sched_domain.cpu11.domain1.cache_nice_tries = 1
kernel.sched_domain.cpu11.domain1.flags = 2327
kernel.sched_domain.cpu11.domain1.imbalance_pct = 117
kernel.sched_domain.cpu11.domain1.max_interval = 12
kernel.sched_domain.cpu11.domain1.max_newidle_lb_cost = 4285
kernel.sched_domain.cpu11.domain1.min_interval = 6
kernel.sched_domain.cpu11.domain1.name = MC
kernel.sched_domain.cpu11.domain2.busy_factor = 32
kernel.sched_domain.cpu11.domain2.cache_nice_tries = 1
kernel.sched_domain.cpu11.domain2.flags = 2071
kernel.sched_domain.cpu11.domain2.imbalance_pct = 125
kernel.sched_domain.cpu11.domain2.max_interval = 24
kernel.sched_domain.cpu11.domain2.max_newidle_lb_cost = 6912
kernel.sched_domain.cpu11.domain2.min_interval = 12
kernel.sched_domain.cpu11.domain2.name = NODE
kernel.sched_domain.cpu11.domain3.busy_factor = 32
kernel.sched_domain.cpu11.domain3.cache_nice_tries = 2
kernel.sched_domain.cpu11.domain3.flags = 12823
kernel.sched_domain.cpu11.domain3.imbalance_pct = 125
kernel.sched_domain.cpu11.domain3.max_interval = 96
kernel.sched_domain.cpu11.domain3.max_newidle_lb_cost = 23555
kernel.sched_domain.cpu11.domain3.min_interval = 48
kernel.sched_domain.cpu11.domain3.name = NUMA
kernel.sched_domain.cpu12.domain0.busy_factor = 32
kernel.sched_domain.cpu12.domain0.cache_nice_tries = 0
kernel.sched_domain.cpu12.domain0.flags = 2391
kernel.sched_domain.cpu12.domain0.imbalance_pct = 110
kernel.sched_domain.cpu12.domain0.max_interval = 4
kernel.sched_domain.cpu12.domain0.max_newidle_lb_cost = 1918
kernel.sched_domain.cpu12.domain0.min_interval = 2
kernel.sched_domain.cpu12.domain0.name = SMT
kernel.sched_domain.cpu12.domain1.busy_factor = 32
kernel.sched_domain.cpu12.domain1.cache_nice_tries = 1
kernel.sched_domain.cpu12.domain1.flags = 2327
kernel.sched_domain.cpu12.domain1.imbalance_pct = 117
kernel.sched_domain.cpu12.domain1.max_interval = 12
kernel.sched_domain.cpu12.domain1.max_newidle_lb_cost = 3344
kernel.sched_domain.cpu12.domain1.min_interval = 6
kernel.sched_domain.cpu12.domain1.name = MC
kernel.sched_domain.cpu12.domain2.busy_factor = 32
kernel.sched_domain.cpu12.domain2.cache_nice_tries = 1
kernel.sched_domain.cpu12.domain2.flags = 2071
kernel.sched_domain.cpu12.domain2.imbalance_pct = 125
kernel.sched_domain.cpu12.domain2.max_interval = 24
kernel.sched_domain.cpu12.domain2.max_newidle_lb_cost = 3570
kernel.sched_domain.cpu12.domain2.min_interval = 12
kernel.sched_domain.cpu12.domain2.name = NODE
kernel.sched_domain.cpu12.domain3.busy_factor = 32
kernel.sched_domain.cpu12.domain3.cache_nice_tries = 2
kernel.sched_domain.cpu12.domain3.flags = 12823
kernel.sched_domain.cpu12.domain3.imbalance_pct = 125
kernel.sched_domain.cpu12.domain3.max_interval = 96
kernel.sched_domain.cpu12.domain3.max_newidle_lb_cost = 51842
kernel.sched_domain.cpu12.domain3.min_interval = 48
kernel.sched_domain.cpu12.domain3.name = NUMA
kernel.sched_domain.cpu13.domain0.busy_factor = 32
kernel.sched_domain.cpu13.domain0.cache_nice_tries = 0
kernel.sched_domain.cpu13.domain0.flags = 2391
kernel.sched_domain.cpu13.domain0.imbalance_pct = 110
kernel.sched_domain.cpu13.domain0.max_interval = 4
kernel.sched_domain.cpu13.domain0.max_newidle_lb_cost = 6515
kernel.sched_domain.cpu13.domain0.min_interval = 2
kernel.sched_domain.cpu13.domain0.name = SMT
kernel.sched_domain.cpu13.domain1.busy_factor = 32
kernel.sched_domain.cpu13.domain1.cache_nice_tries = 1
kernel.sched_domain.cpu13.domain1.flags = 2327
kernel.sched_domain.cpu13.domain1.imbalance_pct = 117
kernel.sched_domain.cpu13.domain1.max_interval = 12
kernel.sched_domain.cpu13.domain1.max_newidle_lb_cost = 9473
kernel.sched_domain.cpu13.domain1.min_interval = 6
kernel.sched_domain.cpu13.domain1.name = MC
kernel.sched_domain.cpu13.domain2.busy_factor = 32
kernel.sched_domain.cpu13.domain2.cache_nice_tries = 1
kernel.sched_domain.cpu13.domain2.flags = 2071
kernel.sched_domain.cpu13.domain2.imbalance_pct = 125
kernel.sched_domain.cpu13.domain2.max_interval = 24
kernel.sched_domain.cpu13.domain2.max_newidle_lb_cost = 10683
kernel.sched_domain.cpu13.domain2.min_interval = 12
kernel.sched_domain.cpu13.domain2.name = NODE
kernel.sched_domain.cpu13.domain3.busy_factor = 32
kernel.sched_domain.cpu13.domain3.cache_nice_tries = 2
kernel.sched_domain.cpu13.domain3.flags = 12823
kernel.sched_domain.cpu13.domain3.imbalance_pct = 125
kernel.sched_domain.cpu13.domain3.max_interval = 96
kernel.sched_domain.cpu13.domain3.max_newidle_lb_cost = 50423
kernel.sched_domain.cpu13.domain3.min_interval = 48
kernel.sched_domain.cpu13.domain3.name = NUMA
kernel.sched_domain.cpu14.domain0.busy_factor = 32
kernel.sched_domain.cpu14.domain0.cache_nice_tries = 0
kernel.sched_domain.cpu14.domain0.flags = 2391
kernel.sched_domain.cpu14.domain0.imbalance_pct = 110
kernel.sched_domain.cpu14.domain0.max_interval = 4
kernel.sched_domain.cpu14.domain0.max_newidle_lb_cost = 7569
kernel.sched_domain.cpu14.domain0.min_interval = 2
kernel.sched_domain.cpu14.domain0.name = SMT
kernel.sched_domain.cpu14.domain1.busy_factor = 32
kernel.sched_domain.cpu14.domain1.cache_nice_tries = 1
kernel.sched_domain.cpu14.domain1.flags = 2327
kernel.sched_domain.cpu14.domain1.imbalance_pct = 117
kernel.sched_domain.cpu14.domain1.max_interval = 12
kernel.sched_domain.cpu14.domain1.max_newidle_lb_cost = 4108
kernel.sched_domain.cpu14.domain1.min_interval = 6
kernel.sched_domain.cpu14.domain1.name = MC
kernel.sched_domain.cpu14.domain2.busy_factor = 32
kernel.sched_domain.cpu14.domain2.cache_nice_tries = 1
kernel.sched_domain.cpu14.domain2.flags = 2071
kernel.sched_domain.cpu14.domain2.imbalance_pct = 125
kernel.sched_domain.cpu14.domain2.max_interval = 24
kernel.sched_domain.cpu14.domain2.max_newidle_lb_cost = 5183
kernel.sched_domain.cpu14.domain2.min_interval = 12
kernel.sched_domain.cpu14.domain2.name = NODE
kernel.sched_domain.cpu14.domain3.busy_factor = 32
kernel.sched_domain.cpu14.domain3.cache_nice_tries = 2
kernel.sched_domain.cpu14.domain3.flags = 12823
kernel.sched_domain.cpu14.domain3.imbalance_pct = 125
kernel.sched_domain.cpu14.domain3.max_interval = 96
kernel.sched_domain.cpu14.domain3.max_newidle_lb_cost = 57471
kernel.sched_domain.cpu14.domain3.min_interval = 48
kernel.sched_domain.cpu14.domain3.name = NUMA
kernel.sched_domain.cpu15.domain0.busy_factor = 32
kernel.sched_domain.cpu15.domain0.cache_nice_tries = 0
kernel.sched_domain.cpu15.domain0.flags = 2391
kernel.sched_domain.cpu15.domain0.imbalance_pct = 110
kernel.sched_domain.cpu15.domain0.max_interval = 4
kernel.sched_domain.cpu15.domain0.max_newidle_lb_cost = 4898
kernel.sched_domain.cpu15.domain0.min_interval = 2
kernel.sched_domain.cpu15.domain0.name = SMT
kernel.sched_domain.cpu15.domain1.busy_factor = 32
kernel.sched_domain.cpu15.domain1.cache_nice_tries = 1
kernel.sched_domain.cpu15.domain1.flags = 2327
kernel.sched_domain.cpu15.domain1.imbalance_pct = 117
kernel.sched_domain.cpu15.domain1.max_interval = 12
kernel.sched_domain.cpu15.domain1.max_newidle_lb_cost = 12251
kernel.sched_domain.cpu15.domain1.min_interval = 6
kernel.sched_domain.cpu15.domain1.name = MC
kernel.sched_domain.cpu15.domain2.busy_factor = 32
kernel.sched_domain.cpu15.domain2.cache_nice_tries = 1
kernel.sched_domain.cpu15.domain2.flags = 2071
kernel.sched_domain.cpu15.domain2.imbalance_pct = 125
kernel.sched_domain.cpu15.domain2.max_interval = 24
kernel.sched_domain.cpu15.domain2.max_newidle_lb_cost = 13268
kernel.sched_domain.cpu15.domain2.min_interval = 12
kernel.sched_domain.cpu15.domain2.name = NODE
kernel.sched_domain.cpu15.domain3.busy_factor = 32
kernel.sched_domain.cpu15.domain3.cache_nice_tries = 2
kernel.sched_domain.cpu15.domain3.flags = 12823
kernel.sched_domain.cpu15.domain3.imbalance_pct = 125
kernel.sched_domain.cpu15.domain3.max_interval = 96
kernel.sched_domain.cpu15.domain3.max_newidle_lb_cost = 52772
kernel.sched_domain.cpu15.domain3.min_interval = 48
kernel.sched_domain.cpu15.domain3.name = NUMA
kernel.sched_domain.cpu16.domain0.busy_factor = 32
kernel.sched_domain.cpu16.domain0.cache_nice_tries = 0
kernel.sched_domain.cpu16.domain0.flags = 2391
kernel.sched_domain.cpu16.domain0.imbalance_pct = 110
kernel.sched_domain.cpu16.domain0.max_interval = 4
kernel.sched_domain.cpu16.domain0.max_newidle_lb_cost = 3924
kernel.sched_domain.cpu16.domain0.min_interval = 2
kernel.sched_domain.cpu16.domain0.name = SMT
kernel.sched_domain.cpu16.domain1.busy_factor = 32
kernel.sched_domain.cpu16.domain1.cache_nice_tries = 1
kernel.sched_domain.cpu16.domain1.flags = 2327
kernel.sched_domain.cpu16.domain1.imbalance_pct = 117
kernel.sched_domain.cpu16.domain1.max_interval = 12
kernel.sched_domain.cpu16.domain1.max_newidle_lb_cost = 7970
kernel.sched_domain.cpu16.domain1.min_interval = 6
kernel.sched_domain.cpu16.domain1.name = MC
kernel.sched_domain.cpu16.domain2.busy_factor = 32
kernel.sched_domain.cpu16.domain2.cache_nice_tries = 1
kernel.sched_domain.cpu16.domain2.flags = 2071
kernel.sched_domain.cpu16.domain2.imbalance_pct = 125
kernel.sched_domain.cpu16.domain2.max_interval = 24
kernel.sched_domain.cpu16.domain2.max_newidle_lb_cost = 10989
kernel.sched_domain.cpu16.domain2.min_interval = 12
kernel.sched_domain.cpu16.domain2.name = NODE
kernel.sched_domain.cpu16.domain3.busy_factor = 32
kernel.sched_domain.cpu16.domain3.cache_nice_tries = 2
kernel.sched_domain.cpu16.domain3.flags = 12823
kernel.sched_domain.cpu16.domain3.imbalance_pct = 125
kernel.sched_domain.cpu16.domain3.max_interval = 96
kernel.sched_domain.cpu16.domain3.max_newidle_lb_cost = 47488
kernel.sched_domain.cpu16.domain3.min_interval = 48
kernel.sched_domain.cpu16.domain3.name = NUMA
kernel.sched_domain.cpu17.domain0.busy_factor = 32
kernel.sched_domain.cpu17.domain0.cache_nice_tries = 0
kernel.sched_domain.cpu17.domain0.flags = 2391
kernel.sched_domain.cpu17.domain0.imbalance_pct = 110
kernel.sched_domain.cpu17.domain0.max_interval = 4
kernel.sched_domain.cpu17.domain0.max_newidle_lb_cost = 6350
kernel.sched_domain.cpu17.domain0.min_interval = 2
kernel.sched_domain.cpu17.domain0.name = SMT
kernel.sched_domain.cpu17.domain1.busy_factor = 32
kernel.sched_domain.cpu17.domain1.cache_ni
This message was truncated. Download the full message here.
T
T
Tom Hiller wrote on 25 Dec 2020 07:57
binutils-mesboot0 fails at configure, cannot find lex
(address . 45165@debbugs.gnu.org)
c47725a0-79b0-edfe-ae50-9120acabc7f6@gmail.com
I also started to see this issue a few days ago.  The host is currently
running a variant of Linux 5.9.14-arch1-1 and the docker image is
Alpine:3.12.  I am not sure if this is helpful but if I remember
correctly, I rebooted my machine in between the times I was last able to
binutils-mesboot0 which probably loaded  Linux 5.9.14-arch1-1 into
memory.  Before it would have been using Linux 5.9.11-arch2
configuration.  Given the timeline, a change in Linux 5.9.12 or Linux
5.9.13 may be the cause.
C
C
Carl Dong wrote on 18 Jan 2021 14:48
(address . 45165@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
5846BC15-6BDE-4ACB-9194-AFC76ABBBCE3@carldong.me
Hi all,

I was able to bisect this down to a few kernel configuration options, so perhaps those with more kernel experience can help me track down what’s going on.

The two Kconfig options which seem to influence the behavior are:
1. CONFIG_EXPERT
2. CONFIG_UID16

CONFIG_EXPERT=y, CONFIG_UID16=y -> status code = 0
CONFIG_EXPERT=y, CONFIG_UID16=n -> status code = 1
CONFIG_EXPERT=y, CONFIG_UID16 not set -> status code = 1
CONFIG_EXPERT=n, any CONFIG_UID16 -> status code = 0

This is somewhat perplexing to me, as looking at the entry for CONFIG_UID16, I see that the default value is “y”, so I would expect there not to be a difference between CONFIG_UID16=y and CONFIG_UID16 not being set when CONFIG_EXPERT=y.

This configuration option investigation originated from when I bisected across Arch Linux’s kernel configuration and found that this recent commit fixed our problem: https://github.com/archlinux/svntogit-packages/commit/1b26b3445354ccdb92b4361e772fb9f246143d0b#diff-3e341d2d9c67be01819b25b25d5e53ea3cdf3a38d28846cda85a195eb9b7203a

Note that this above config has CONFIG_HAVE_UID16=y and CONFIG_MULTIUSER=y

Let me know how best to approach this!

Cheers,
Carl Dong
C
C
Carl Dong wrote on 19 Jan 2021 15:03
(address . 45165@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
FC28BF63-95CC-4D7C-99B7-9BD2513D0E21@carldong.me
Regardless of how Kconfig options interact with each other, it seems that this bug is only triggered when the effective kernel config (/proc/config.gz) contains the following:

CONFIG_EXPERT=y
# CONFIG_UID16 is not set

Cheers,
Carl Dong
C
C
Carl Dong wrote on 3 Feb 2021 11:18
(address . 45165@debbugs.gnu.org)
9F85A050-2C47-422D-840C-EFD0EBA7B06B@carldong.me
New observation! On my Arch machine which has

5.10.11-arch1-1

And

# CONFIG_EXPERT is not set
CONFIG_UID16=y

(So according to my previous email it not trigger the bug)

I’m getting the following strace:

$ strace -v -e trace=file ~/sh -c "test -w /home/dongcarl/.bash_profile”
execve(<blahblah>) = 0
[ Process PID=404360 runs in 32 bit mode. ]
open("/dev/tty", O_RDWR) = 3
stat("/home/dongcarl", 0xffdcd738) = -1 EOVERFLOW (Value too large for defined data type)
getcwd("/home/dongcarl", 1024) = 15
stat("/home/dongcarl/.bash_profile", 0xffdcd6bc) = -1 EOVERFLOW (Value too large for defined data type)
+++ exited with 1 +++

Not sure hot to interpret this...
L
L
Ludovic Courtès wrote on 6 Feb 2021 13:04
(name . Carl Dong)(address . contact@carldong.me)(address . 45165@debbugs.gnu.org)
875z3429ht.fsf@gnu.org
Hi,

Carl Dong <contact@carldong.me> skribis:

Toggle quote (24 lines)
> New observation! On my Arch machine which has
>
> 5.10.11-arch1-1
>
> And
>
> # CONFIG_EXPERT is not set
> CONFIG_UID16=y
>
> (So according to my previous email it not trigger the bug)
>
> I’m getting the following strace:
>
> $ strace -v -e trace=file ~/sh -c "test -w /home/dongcarl/.bash_profile”
> execve(<blahblah>) = 0
> [ Process PID=404360 runs in 32 bit mode. ]
> open("/dev/tty", O_RDWR) = 3
> stat("/home/dongcarl", 0xffdcd738) = -1 EOVERFLOW (Value too large for defined data type)
> getcwd("/home/dongcarl", 1024) = 15
> stat("/home/dongcarl/.bash_profile", 0xffdcd6bc) = -1 EOVERFLOW (Value too large for defined data type)
> +++ exited with 1 +++
>
> Not sure hot to interpret this...

It would seem that CONFIG_UID16=y is the culprit after all, no?

Is there a way we can detect kernel misconfiguration and that does not
involve /proc/config.gz?

If not, perhaps we could do precisely the test above in one of the early
derivations in commencement.scm: run “sh -c 'test -w /'” and fail right
away if that doesn’t work.

WDYT?

Ludo’.
V
V
Vincent Legoll wrote on 27 Feb 2021 02:33
binutils-mesboot0 fails at configure, cannot find lex
(address . 45165@debbugs.gnu.org)
CAEwRq=q9kcjHRDyUhD-V4B765rnb7+i8K2_aGkXfPpJN=V8wWw@mail.gmail.com
Hello,

a test in commencement.scm will be run by guixbuild user, no ?

$ ls -ld /
drwxr-xr-x 17 root root 4096 Feb 27 10:43 /

won't that always fail ?

--
Vincent Legoll
K
K
kitzman wrote on 9 Jun 2021 06:36
(address . 45165@debbugs.gnu.org)
87bl8fkvmi.fsf@disroot.org
Dear all,

I have ran into the exact same issue (I will assume it's the same
source).

I suppose this is only relevant for certain forks of the kernel, not the
mainline one - I also assume that my train thought might prove
useful... hopefully.

* Syscalls *

The stat syscall works - but then bash tries to getuid (so it knows if
it's checking for the owner or for others), and returns -1 (not implemented).

The returned mode by "stat" is checked in "test_eaccess", line 221,
"test.c" of bash 2.05b.

There, it checks the euid (to see if it either checks for o+w or u+w). The
get[e]?[ug]id functions return -1 in my case - thus making bash believe it's
not the same user, thus checking if others can write, and failing.

Upon further inspection, the syscall happening to get the ids is
actually a 32-bit one - which makes sense considering bash-mesboot0 is
built only for i686.

Take for example (taken from strace):
- syscall 199 (getuid32)
- syscall 102 (getuid, for x86_64)
- syscall 24 (getuid for 32-bit)

The first two work (for me). At the stage of gcc-mesboot1, these are the ones
used. For binutils-mesboot0, the last one is used, and on my system,
gives an error.

Patching binutils-mesboot0, gawk-mesboot, gnu-make-mesboot was easy:
test -w and test -x bash builtins were replaced by their
coreutils-mesboot0 counterpart inside the build .

Currently I have stumbled upon problems making gcc-mesboot1, which
uses make-mesboot, which, when you do a "$(call ...)", internally it
tries to do an "execve" syscall (weirdly enough, it does the right
syscalls for getuid etc)

- syscall 59 (execve) works (my normal make's syscall ALSO
bash-mesboot's syscall at this point)
- syscall 11 (execve) doesn't (the one used by make), gives ENOMEM

Sure, if "test" commands were the only things to be patched I would be
contempt with this upload: https://0x0.st/-_5w.scm. But I didn't
manage to bootstrap my system only using my kernel.

* Kernel *

I'm not using a mainline kernel, let alone options. But the standard
kernel supplied with my distro works.

Referring to kernel's configuration:

---
Mine Carl's Libre ✓ Arch ✓ Option

not set not set y y CONFIG_UID16 (obsolete?)
not set y y not set CONFIG_EXPERT
y y y y CONFIG_X86_64
y y y y CONFIG_X86 (32 + 64, according to docs)
not set not set y not set CONFIG_X86_X32
y y y y CONFIG_X86_VSYSCALL_EMULATION
y not set y not set CONFIG_LEGACY_VSYSCALL_NONE
y y y y CONFIG_IA32_EMULATION
---

I'm not even a sub-mediocre when it comes to kernel code:

Checking the kernel file arch/x86/entry/syscalls/syscall_32.tbl, that
one contains the emulation functions - however, the kernel that I'm
using -doesn't- have the IA32 functions defined in the table, but the
mainline one does.

A quick way to check this is to cat "/proc/kallsyms", look for
"__ia32_sys_getuid", and see where (and if) it's mapped in memory.
For me, it's not, ergo, the syscalls are not implemented, thus it
returns -1. (or so I think)

Might this be the issue?

**
My solution:
**

At this point, the chosen solution for me - build the packages in a VM,
and wait for mesboot's x86_64 support.

I don't think this is a problem with Guix - I find it normal if IA32
emulation is enabled, to have the syscalls.

Kind regards,
kitzman
K
K
kitzman wrote on 9 Jun 2021 08:12
(address . 45165@debbugs.gnu.org)
87o8cfjcn2.fsf@disroot.org
Please ignore the following. A function appearing there can still return ENOSYS.

kitzman <kitzman@disroot.org> writes:
Toggle quote (4 lines)
> A quick way to check this is to cat "/proc/kallsyms", look for
> "__ia32_sys_getuid", and see where (and if) it's mapped in memory.
> For me, it's not, ergo, the syscalls are not implemented, thus it
> returns -1. (or so I think)
T
T
Tobias Geerinckx-Rice wrote on 23 Dec 2021 21:58
binutils-mesboot0 fails at configure, cannot find lex
(address . 45165@debbugs.gnu.org)
87pmpmttar.fsf@nckx
Morning Guix,

I'm unable to ‘guix pull’ because of this bug. Log attached.

Here are my kernel options from kitzman's list:

not set CONFIG_UID16 (obsolete)
y CONFIG_EXPERT
y CONFIG_X86_64 (obvs)
y CONFIG_X86
not set CONFIG_X86_X32
not set CONFIG_X86_VSYSCALL_EMULATION
y CONFIG_LEGACY_VSYSCALL_NONE
y CONFIG_IA32_EMULATION

Seems like Carl, kitzman, & I have in common:

not set CONFIG_UID16 (obsolete)
y CONFIG_X86_64 (obvs)
y CONFIG_X86
not set CONFIG_X86_X32
y CONFIG_LEGACY_VSYSCALL_NONE
y CONFIG_IA32_EMULATION

My diff from linux-libre, which sure seems to tell a story:

y -> not set CONFIG_UID16 (obsolete)
y -> not set CONFIG_X86_X32
y -> not set CONFIG_X86_VSYSCALL_EMULATION

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYcVnbA0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15eJ4BAJIjeRyUaMGFU7fZnKbmjqtF0uQO5eBZwiQDc6cL
qKAVAP9192vn9vzTDZmuobIapr6q8hqWsnAkbF2zU8qK9NCaAQ==
=X4DV
-----END PGP SIGNATURE-----

T
T
Tobias Geerinckx-Rice wrote on 24 Dec 2021 00:11
8735mih0r6.fsf@nckx
Tobias Geerinckx-Rice via Bug reports for GNU Guix 写道:
Toggle quote (4 lines)
> My diff from linux-libre, which sure seems to tell a story:
>
> y -> not set CONFIG_UID16 (obsolete)

As expected upthread, this and this alone was indeed the culprit.
I don't see any evidence of interaction with other options though.

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYcWC7Q0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15d+kBAMrREDkUlJYpvgCsTMz/PlcGrwlWAzgeXEjNh+7P
/gqMAP0YyAcyMOst3glk6TVxgq0jViI4o8fwr4RNL+IjyalsDA==
=A0FF
-----END PGP SIGNATURE-----

K
K
kitzman wrote on 24 Feb 2022 05:09
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)(address . 45165@debbugs.gnu.org)
874k4opg2b.fsf@disroot.org
Tobias Geerinckx-Rice <me@tobias.gr> writes:

Toggle quote (8 lines)
>> My diff from linux-libre, which sure seems to tell a story:
>>
>> y -> not set CONFIG_UID16 (obsolete)
>
> As expected upthread, this and this alone was indeed the culprit. I
> don't see any evidence of interaction with other options though.
>

I tried working around the issue by patching stuff (either the shell, or
using the "test" utility), but I gave up after too many things to patch.

I guess the most appropriate would be to wait for the full x86_64
support from GNU mes, and if it persists, to open bugs to binutils,
gash, or whatever else uses the inbuilt "test" functionality of the shell.
?