Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 788334

Summary: bootstrap-prefix.sh: stage 1 zlib configure fails when run in interactive mode due to non-functional gcc wrapper
Product: Gentoo/Alt Reporter: Alfred Wingate <parona>
Component: Prefix SupportAssignee: Gentoo Prefix <prefix>
Status: RESOLVED FIXED    
Severity: major CC: gentoo.org, parona, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=794709
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Stage 1 log
Configure log for zlib
Patch that fixes it

Description Alfred Wingate 2021-05-05 12:53:16 UTC
Stage 1 zlib fails in configure due to the GCC wrapper being nonfunctional. This is due the wrapper using the variable ORIGINAL_PATH that is set after bootstrap_interactive is started.

The change to this behavior happened in 7ca9acf145b59b0efb129a52788308e7764971bf and can fixed by moving the declaration of ORIGINAL_PATH.


Reproducible: Always

Steps to Reproduce:
1. Follow instruction for creating prefix in https://wiki.gentoo.org/wiki/Project:Prefix/Bootstrap
Actual Results:  
Fails due to being able download an old version of zlib, but if read logs further you see that a newer version zlib was downloaded and failed in its configure step, and if you read configure.log for this you see that its due a failed `exec gcc`.

Expected Results:  
Script should work without failures.
Comment 1 Alfred Wingate 2021-05-05 12:54:01 UTC
Created attachment 706182 [details]
Stage 1 log
Comment 2 Alfred Wingate 2021-05-05 12:54:26 UTC
Created attachment 706185 [details]
Configure log for zlib
Comment 3 Alfred Wingate 2021-05-05 12:55:10 UTC
Created attachment 706188 [details, diff]
Patch that fixes it
Comment 4 Alfred Wingate 2021-05-05 12:56:10 UTC
(In reply to Alfred Wingate from comment #0)
> Stage 1 zlib fails in configure due to the GCC wrapper being nonfunctional.
> This is due the wrapper using the variable ORIGINAL_PATH that is set after
> bootstrap_interactive is started.
> 
> The change to this behavior happened in
> 7ca9acf145b59b0efb129a52788308e7764971bf and can fixed by moving the
> declaration of ORIGINAL_PATH.
> 
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1. Follow instruction for creating prefix in
> https://wiki.gentoo.org/wiki/Project:Prefix/Bootstrap
> Actual Results:  
> Fails due to being able download an old version of zlib, but if read logs
> further you see that a newer version zlib was downloaded and failed in its
> configure step, and if you read configure.log for this you see that its due
> a failed `exec gcc`.
> 
> Expected Results:  
> Script should work without failures.

's/Fails due to being able/Fails due to not being able/'
Comment 5 Alfred Wingate 2021-05-05 22:16:58 UTC
As forgot to mention, this was in an x86-64 ubuntu-20.10 system.
Comment 6 OzTiram 2021-05-23 23:23:28 UTC
I can confirm this issue with Ubuntu 18.04.
The patch did not fix the issue, however, checking out the commit mentioned, I was able to get past the zlib issues (failed to compile GCC though ...)
Comment 7 Starbeamrainbowlabs 2021-05-24 18:58:00 UTC
I can confirm this is also the case on CentOS Linux release 7.2.1511 (Core), with GCC versions 4.9.3, 6.3.0, 7.3.0, 8.2.0, and 10.2.0. Perhaps the script could have an option to download a temporary pre-compiled version of gcc?
Comment 8 Pim Vullers 2021-06-02 11:39:08 UTC
I can confirm as well for elementaryOS (ubuntu 18.04.1 LTS based).
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-06-08 07:26:34 UTC
Please test if https://bugs.gentoo.org/794709#c13 solves your issue?
Comment 10 Larry the Git Cow gentoo-dev 2021-06-08 07:33:11 UTC
The bug has been closed via the following commit(s):

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

commit a24caba8b099b2425307b738a88768abbdc7b724
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2021-06-08 07:31:22 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2021-06-08 07:31:22 +0000

    scripts/bootstrap-prefix: ensure ORIGINAL_PATH is truely original
    
    Thanks to suggestion of Alfred Wingate in bug 788334.  The value of
    ORIGINAL_PATH wasn't quite that original.  Move setting the var before
    we tamper with PATH.
    
    Closes: https://bugs.gentoo.org/788334
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 scripts/bootstrap-prefix.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Comment 11 Fabian Groffen gentoo-dev 2021-06-08 07:34:12 UTC
(In reply to OzTiram from comment #6)
> I can confirm this issue with Ubuntu 18.04.
> The patch did not fix the issue, however, checking out the commit mentioned,
> I was able to get past the zlib issues (failed to compile GCC though ...)

that is likely bug #788613, thanks