Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 921535 - Prefix bash-5.1 bootstrap fails with bashline.c:65:10: fatal error: builtins/builtext.h: No such file or directory
Summary: Prefix bash-5.1 bootstrap fails with bashline.c:65:10: fatal error: builtins/...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: parallel-make
  Show dependency tree
 
Reported: 2024-01-07 02:56 UTC by Yiyang Wu
Modified: 2024-01-14 05:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Stage 2 log (stage2.log,4.19 KB, text/x-log)
2024-01-07 02:57 UTC, Yiyang Wu
Details
Compressed stage 1 log (stage1.log.zst,107.72 KB, application/zstd)
2024-01-07 02:59 UTC, Yiyang Wu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yiyang Wu 2024-01-07 02:56:21 UTC
>>> Emerging (1 of 1) sys-devel/gnuconfig-20230731::gentoo
 * ERROR: sys-devel/gnuconfig-20230731::gentoo failed (clean phase):
 *   EAPI="8" requires >=bash-5.0, but bash-4.3.0(1)-release found
 * 
 * Call stack:
 *   ebuild.sh, line 68:  Called __check_bash_version
 *   ebuild.sh, line 36:  Called die
 * The specific snippet of code:
 *              die "EAPI=\"${EAPI}\" requires >=bash-${maj}.${min}, but bash-${BASH_VERSION} found"
 * 
 * If you need support, post the output of `emerge --info '=sys-devel/gnuconfig-20230731::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/gnuconfig-20230731::gentoo'`.
/fast/prefix_bootstrap_test/gentoo/tmp/usr/lib/portage/bin/isolated-functions.sh: line 207: /fast/prefix_bootstrap_test/gentoo/tmp/var/tmp/portage/sys-devel/gnuconfig-20230731/.die_hooks: No such file or directory
 * Working directory: '/fast/prefix_bootstrap_test'
 * The ebuild phase 'die_hooks' has been aborted since PORTAGE_BUILDDIR
 * does not exist:
 * '/fast/prefix_bootstrap_test/gentoo/tmp/var/tmp/portage/sys-
 * devel/gnuconfig-20230731'

Reproducible: Always

Steps to Reproduce:
Running bootstrap-prefix.sh
Comment 1 Yiyang Wu 2024-01-07 02:57:16 UTC
Created attachment 881582 [details]
Stage 2 log
Comment 2 Yiyang Wu 2024-01-07 02:59:24 UTC
Created attachment 881583 [details]
Compressed stage 1 log
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-07 08:01:38 UTC
This usually means a previous attempt to merge a newer bash failed.
Comment 4 Larry the Git Cow gentoo-dev 2024-01-07 08:05:23 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=8b37896eb6da6ab9e87104926752a8f8af2476b5

commit 8b37896eb6da6ab9e87104926752a8f8af2476b5
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-07 08:05:06 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-07 08:05:06 +0000

    scripts/bootstrap-prefix.sh: try bootstrap bash 5.2 as well
    
    Bug: https://bugs.gentoo.org/921535
    Signed-off-by: Sam James <sam@gentoo.org>

 scripts/bootstrap-prefix.sh | 1 +
 1 file changed, 1 insertion(+)
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-07 08:06:18 UTC
(In reply to Sam James from comment #3)
> This usually means a previous attempt to merge a newer bash failed.

It fails for you with:
```
bashline.c:65:10: fatal error: builtins/builtext.h: No such file or directory
   65 | #include "builtins/builtext.h"          /* for read_builtin */
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gcc  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"x86_64"' -DCONF_OSTYPE='"linux-gnu"' -DCONF_MACHTYPE='"x86_64-pc-linux-gnu"' -DCONF_VENDOR='"pc"' -DLOCALEDIR='"/fast/prefix_bootstrap_test/gentoo/tmp/usr/share/local
e"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -DSYS_BASHRC=\"/fast/prefix_bootstrap_test/gentoo/etc/bash/bashrc\"                     -DSYS_BASH_LOGOUT=\"/fast/prefix_bootstr
ap_test/gentoo/etc/bash/bash_logout\"            -g -O2 -Wno-parentheses -Wno-format-security -c locale.c
make: *** [Makefile:100: bashline.o] Error 1
make: *** Waiting for unfinished jobs....
```
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-07 08:06:53 UTC
Looks like it's fixed in 5.2: https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00000.html.
Comment 7 Larry the Git Cow gentoo-dev 2024-01-07 08:08:55 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=dc7f7d0ea3dd0128b69cb034fa68372f6376327a

commit dc7f7d0ea3dd0128b69cb034fa68372f6376327a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-07 08:08:15 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-07 08:08:15 +0000

    scripts/bootstrap-prefix.sh: add bash-5.0 as well
    
    Why not?
    
    Bug: https://bugs.gentoo.org/921535
    Signed-off-by: Sam James <sam@gentoo.org>

 scripts/bootstrap-prefix.sh | 1 +
 1 file changed, 1 insertion(+)
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-07 08:11:45 UTC
This should be fixed now.
Comment 9 Yiyang Wu 2024-01-07 08:17:34 UTC
Thank you for finding the real issue so quickly!

Since all versions (actually only one) of gnuconfig use EAPI 8 now, should we only allow bash-5 to be bootstrapped in stage 1?
Comment 10 Yiyang Wu 2024-01-07 08:18:27 UTC
May I ask why it blocks parallel build https://bugs.gentoo.org/351559?
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-07 08:28:45 UTC
(In reply to Yiyang Wu from comment #10)
> May I ask why it blocks parallel build https://bugs.gentoo.org/351559?

Becuase the failure in bash was a parallel build problem (missing makefile dependency).

(In reply to Yiyang Wu from comment #9)
> Thank you for finding the real issue so quickly!
> 
> Since all versions (actually only one) of gnuconfig use EAPI 8 now, should
> we only allow bash-5 to be bootstrapped in stage 1?

Yeah, fair point.
Comment 12 Larry the Git Cow gentoo-dev 2024-01-07 08:29:36 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=ebbc3ad0433d3a2595df0c7d10cc1b988ce30346

commit ebbc3ad0433d3a2595df0c7d10cc1b988ce30346
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-07 08:29:14 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-07 08:29:14 +0000

    scripts/bootstrap-prefix.sh: try to bootstrap only >=bash-5.0
    
    EAPI 8 needs bash 5.0 as a minimum.
    
    Bug: https://bugs.gentoo.org/921535
    Signed-off-by: Sam James <sam@gentoo.org>

 scripts/bootstrap-prefix.sh | 2 --
 1 file changed, 2 deletions(-)
Comment 13 Larry the Git Cow gentoo-dev 2024-01-07 08:29:57 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=e1a7bd326d826028ed21a5db177d869cd21d1040

commit e1a7bd326d826028ed21a5db177d869cd21d1040
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-07 08:29:45 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-07 08:29:45 +0000

    scripts/bootstrap-prefix.sh: fix typo
    
    Bug: https://bugs.gentoo.org/921535
    Signed-off-by: Sam James <sam@gentoo.org>

 scripts/bootstrap-prefix.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)