Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 647144 - bootstrap-prefix.sh fails to bootstrap when emerging sys-libs/zlib-1.2.11-r1
Summary: bootstrap-prefix.sh fails to bootstrap when emerging sys-libs/zlib-1.2.11-r1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-02-09 17:49 UTC by yangsheng6810
Modified: 2018-02-20 08:00 UTC (History)
0 users

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


Attachments
bootstrap log when failed to emerge sys-libs/glibc (stage3_glibc.7z,86.11 KB, application/x-7z)
2018-02-09 17:52 UTC, yangsheng6810
Details
bootstrap log when failed to emerge sys-libs/zlib (stage3.7z,262.88 KB, application/x-7z)
2018-02-09 17:53 UTC, yangsheng6810
Details
the patch applied to fix sys-libs/glibc problem (1.patch,760 bytes, patch)
2018-02-09 17:55 UTC, yangsheng6810
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description yangsheng6810 2018-02-09 17:49:27 UTC
bootstrap-prefix.sh fails to bootstrap at stage 3 when emerging sys-libs/zlib-1.2.11-r1. A linking error of undefined reference was raised. Bootstraping actually failed at an earlier stage when emerging sys-libs/glibc, but I managed to fix it and continue. I will include the detalis in case there is some relationship (see Steps to Reproduce).

Reproducible: Always

Steps to Reproduce:
1. Bootstrap bash with bootstrap-bash.sh
2. Run bootstrap-prefix.sh till it stops for sys-libs/glibc-2.33-r4 with linking error
==========================
        {standard input}: Error: `loc1@GLIBC_2.2.5' can't be versioned
to common symbol 'loc1'
        {standard input}: Error: `loc2@GLIBC_2.2.5' can't be versioned
to common symbol 'loc2'
        {standard input}: Error: `locs@GLIBC_2.2.5' can't be versioned
to common symbol 'locs'
        make[2]: ***
[/fs/optimizer/styang/gentoo/var/tmp/portage/sys-libs/glibc-2.23-r4/work/build-amd64-x86_64-pc-linux-gnu-nptl/misc/regexp.os]
Error 1
        make[2]: *** Waiting for unfinished jobs....
        make[2]: Leaving directory
`/fs/optimizer/styang/gentoo/var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/misc'
        make[1]: *** [misc/subdir_lib] Error 2
        make[1]: Leaving directory
`/fs/optimizer/styang/gentoo/var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23'
        make: *** [all] Error 2
        make: Leaving directory
`/fs/optimizer/styang/gentoo/var/tmp/portage/sys-libs/glibc-2.23-r4/work/build-amd64-x86_64-pc-linux-gnu-nptl'
        * ERROR: sys-libs/glibc-2.23-r4::gentoo failed (compile phase):
        *   emake failed
=============================
3. Fixing the glibc problem by adding a patch (available from upstream https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=869717) or force it to use a higer version (2.34 or higher, where the patch is already included in gentoo official portage), and continue bootstrap
Actual Results:  
Bootstrap stops at sys-libs/zlib, with a linking error:

        libz.so.1.2.11: undefined reference to `memcpy@GLIBC_2.14'
        collect2: error: ld returned 1 exit status
        make: *** [examplesh] Error 1
        make: *** Waiting for unfinished jobs....
        libz.so.1.2.11: undefined reference to `memcpy@GLIBC_2.14'
        collect2: error: ld returned 1 exit status
        make: *** [minigzipsh] Error 1
        * ERROR: sys-libs/zlib-1.2.11-r1::gentoo failed (compile phase):
        *   emake failed

Expected Results:  
Successfully bootstrap

Red Hat Enterprise Linux Server release 6.9 (Santiago),
Kernel: 2.6.32-696.10.2.el6.x86_64
Host packages version:
    bash: 4.1.2
    glibc: 2.12
    gcc: 4.4.7

Problem might be related to nptl, as my old gentoo-prefix on the same machine complains about kernel version too low when upgrading sys-libs/glibc because of the nptl feature.
Comment 1 yangsheng6810 2018-02-09 17:52:25 UTC
Created attachment 518754 [details]
bootstrap log when failed to emerge sys-libs/glibc
Comment 2 yangsheng6810 2018-02-09 17:53:51 UTC
Created attachment 518756 [details]
bootstrap log when failed to emerge sys-libs/zlib

After fixing the glibc problem, bootstrap was continued and stops at sys-libs/zlib
Comment 3 yangsheng6810 2018-02-09 17:55:10 UTC
Created attachment 518758 [details, diff]
the patch applied to fix sys-libs/glibc problem

This patch is available on upstream https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=869717, or in gentoo official portage since sys-libs/glibc-2.24
Comment 4 Benda Xu gentoo-dev 2018-02-09 20:24:07 UTC
Thanks for the report!  I will look into it.
Comment 5 Larry the Git Cow gentoo-dev 2018-02-20 08:00:46 UTC
The bug has been closed via the following commit(s):

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

commit 396a93ce5cbb65602468a35849df558443a59ebe
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2018-02-20 07:57:03 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2018-02-20 08:00:37 +0000

    tandalonebootstrap-prefix.sh: Add back BOOTSTRAP_RAP for zlib.
    
      By default zlib builds several example executables, even if what we
      want is a library.  It does not matter usually.  But during stage3,
      after glibc and before binutils, we cannot build executable
      reliably.  These should be disabled.
    
    Closes: https://bugs.gentoo.org/647144

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