Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 788334 - bootstrap-prefix.sh: stage 1 zlib configure fails when run in interactive mode due to non-functional gcc wrapper
Summary: bootstrap-prefix.sh: stage 1 zlib configure fails when run in interactive mod...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-05 12:53 UTC by Alfred Wingate
Modified: 2021-06-08 07:34 UTC (History)
3 users (show)

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


Attachments
Stage 1 log (stage1.log,778.25 KB, text/x-log)
2021-05-05 12:54 UTC, Alfred Wingate
Details
Configure log for zlib (configure.log,623 bytes, text/x-log)
2021-05-05 12:54 UTC, Alfred Wingate
Details
Patch that fixes it (move_original_path.patch,614 bytes, patch)
2021-05-05 12:55 UTC, Alfred Wingate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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