Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 740446 - CentOS 7.8.2003 - bootstrap-prefix.sh fails at stage3.
Summary: CentOS 7.8.2003 - bootstrap-prefix.sh fails at stage3.
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 Linux
: Normal blocker (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-05 08:00 UTC by Diagon
Modified: 2021-01-24 16:13 UTC (History)
1 user (show)

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


Attachments
stage3.log (stage3.log.xz,616.14 KB, application/x-xz)
2020-09-05 08:00 UTC, Diagon
Details
Attaching /home/user/.local/gentoo/var/tmp/portage/dev-lang/perl-5.30.3-r1/temp/build.log (build.log.xz,15.76 KB, application/octet-stream)
2020-09-05 08:02 UTC, Diagon
Details
stage3.log.xz (stage3.log.xz,65.72 KB, application/x-xz)
2020-12-02 22:03 UTC, Diagon
Details
coreutils-8.32-r1.build.log.xz (coreutils-8.32-r1.build.log.xz,27.43 KB, application/x-xz)
2020-12-02 22:04 UTC, Diagon
Details
perl-5.30.3-r1.build.log.xz (perl-5.30.3-r1.build.log.xz,16.02 KB, application/x-xz)
2020-12-02 22:05 UTC, Diagon
Details
stage3.log.xz (stage3.log.xz,713.96 KB, application/x-xz)
2021-01-13 03:10 UTC, Diagon
Details
build.log.xz (build.log.xz,15.45 KB, application/x-xz)
2021-01-13 03:13 UTC, Diagon
Details
emerge.perl.info.xz (emerge.perl.info.xz,2.48 KB, application/x-xz)
2021-01-13 03:13 UTC, Diagon
Details
emerge.perl.pqv.xz (emerge.perl.pqv.xz,3.32 KB, application/x-xz)
2021-01-13 03:14 UTC, Diagon
Details
environment.xz (environment.xz,22.48 KB, application/x-xz)
2021-01-13 03:38 UTC, Diagon
Details
stage3.log.post-work-around.xz (stage3.log.xz,715.54 KB, application/x-xz)
2021-01-13 03:41 UTC, Diagon
Details
build.log.post-work-around.xz (build.log.xz,15.46 KB, application/x-xz)
2021-01-13 03:41 UTC, Diagon
Details
emerge.perl.info.post-work-around.xz (emerge.perl.info.xz,2.48 KB, application/x-xz)
2021-01-13 03:42 UTC, Diagon
Details
emerge.perl.pqv.post-work-around.xz (emerge.perl.pqv.xz,3.07 KB, application/x-xz)
2021-01-13 03:43 UTC, Diagon
Details
environment.post-work-around.xz (environment.xz,22.48 KB, application/x-xz)
2021-01-13 03:43 UTC, Diagon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diagon 2020-09-05 08:00:53 UTC
Created attachment 658510 [details]
stage3.log

* Error: circular dependencies:

(virtual/libcrypt-1-r1:0/1::gentoo, ebuild scheduled for merge) depends on
 (sys-libs/glibc-2.32-r1:2.2/2.2::gentoo, ebuild scheduled for merge) (runtime)
  (dev-lang/python-3.7.9:3.7/3.7m::gentoo, ebuild scheduled for merge) (buildtime)
   (virtual/libcrypt-1-r1:0/1::gentoo, ebuild scheduled for merge) (buildtime_slot_op)

 * Note that circular dependencies can often be avoided by temporarily
 * disabling USE flags that trigger optional dependencies.

Hmmmm, I was already afraid of this to happen.  Running
  /home/user/.local/gentoo/bin/bash ./bootstrap-prefix.sh "/home/user/.local/gentoo" stage3
somewhere failed :(  Details might be found in the build log:
  /home/user/.local/gentoo/var/tmp/portage/dev-lang/perl-5.30.3-r1/temp/build.log


In build.log

Processing VerticalOrientation.txt
/home/user/.local/gentoo/bin/pwd: cannot open directory '../../../../../../../../../../../..': Permission denied
Can't figure out your cwd! at /home/user/.local/gentoo/var/tmp/portage/dev-lang/perl-5.30.3-r1/work/perl-5.30.3/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm line 237.
Processing EquivalentUnifiedIdeograph.txt
Unsuccessful Makefile.PL(cpan/Encode): code=256 at make_ext.pl line 518.
make: *** [makefile:575: lib/auto/Encode/Encode.so] Error 2
make: *** Waiting for unfinished jobs....
Processing EmojiData.txt
Finishing processing Unicode properties
Compiling Perl properties
Creating Perl synonyms
Writing tables
Making pod file
Making test script
Updating 'mktables.lst'
 * ERROR: dev-lang/perl-5.30.3-r1::gentoo failed (compile phase):
 *   emake failed


When I try to run emerge, I get

$tmp/bin/emerge --info '=dev-lang/perl-5.30.3-r1::gentoo'

!!! Section 'gentoo' in repos.conf has location attribute set to nonexistent directory: '/home/user/.local/gentoo/tmp/var/db/repos/gentoo'
!!! Invalid Repository Location (not a dir): '/home/user/.local/gentoo/tmp/var/db/repos/gentoo'
!!! BINPKG_COMPRESS unsupported zstd. Missing package: app-arch/zstd
Comment 1 Diagon 2020-09-05 08:02:49 UTC
Created attachment 658512 [details]
Attaching    /home/user/.local/gentoo/var/tmp/portage/dev-lang/perl-5.30.3-r1/temp/build.log
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-12-01 13:15:47 UTC Comment hidden (obsolete)
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-12-01 13:15:57 UTC
Have a look at the workaround here? https://bugs.gentoo.org/755551#c16
Comment 4 Diagon 2020-12-02 06:22:50 UTC
Thanks Sam.  If I understand correctly, I am to create a file 

$PREFIX/etc/portage/profile/package.provided

containing:

sys-libs/glibc-2.32-r1 

I did that and it has no effect on the error produced.

I'm having my own bootstrapping problem here.  Both my attempts to install gentoo, -prefix on this server and basically vanilla gentoo on my thinkpad, are failing.  I can't install gentoo, so that I can learn about gentoo, which is needed to install gentoo.  :/
Comment 5 Diagon 2020-12-02 06:43:14 UTC
I also tried putting it in:

$PREFIX/etc/portage/package.provided

as it was described here, in opposition to the wiki:
https://bugs.gentoo.org/755551#c14
https://wiki.gentoo.org/wiki//etc/portage/profile/package.provided

That produced the same result.  I am simply leaving all files from the first runs in place, and then running the bootstrap script again.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-12-02 17:24:11 UTC
(In reply to Diagon from comment #5)
> I also tried putting it in:
> 
> $PREFIX/etc/portage/package.provided
> 
> as it was described here, in opposition to the wiki:
> https://bugs.gentoo.org/755551#c14
> https://wiki.gentoo.org/wiki//etc/portage/profile/package.provided
> 
> That produced the same result.  I am simply leaving all files from the first
> runs in place, and then running the bootstrap script again.

Can you try $PREFIX/tmp/etc/portage/... too?
Comment 7 Diagon 2020-12-02 22:03:35 UTC
Created attachment 676345 [details]
stage3.log.xz
Comment 8 Diagon 2020-12-02 22:04:36 UTC
Created attachment 676348 [details]
coreutils-8.32-r1.build.log.xz
Comment 9 Diagon 2020-12-02 22:05:34 UTC
Created attachment 676351 [details]
perl-5.30.3-r1.build.log.xz
Comment 10 Diagon 2020-12-02 22:08:57 UTC
Alright, I put it in:

$PREFIX/tmp/etc/portage/profile/package.provided

It got substantially further, but again failed at:

 Package 'sys-apps/coreutils-8.32-r1' NOT merged due to internal collisions between non-identical files.

Relevant logs attached: stage3, coreutils & perl build logs.
Comment 11 Benda Xu gentoo-dev 2020-12-11 12:04:18 UTC
Hi Diagon, what is your host system? I would like to set up an environment to reproduce it.
Comment 12 Benda Xu gentoo-dev 2020-12-13 15:35:43 UTC
(In reply to Benda Xu from comment #11)
> Hi Diagon, what is your host system? I would like to set up an environment
> to reproduce it.

Sorry, read the title to know it's CentOS 7.8.2003.
Comment 13 Diagon 2021-01-11 00:48:09 UTC
Ya, thanks.  I'm still interested, but there's been a lot of gentoo email of late.  Let me know if you want me to try anything out.
Comment 14 Fabian Groffen gentoo-dev 2021-01-11 07:22:00 UTC
if you would be so kind to re-start a bootstrap using the latest script?
Comment 15 Diagon 2021-01-12 23:51:30 UTC
@Fabian - am I restarting or starting from scratch?
Comment 16 Diagon 2021-01-13 03:08:06 UTC
Ok, attempting to restart failed right away, so I ran the install over from the beginning.  It also fails:

ERROR: dev-lang/perl-5.32.0-r1::gentoo failed (compile phase):
 *   emake failed

I am attaching multiple logs.
Comment 17 Diagon 2021-01-13 03:10:40 UTC
Created attachment 682591 [details]
stage3.log.xz
Comment 18 Diagon 2021-01-13 03:13:08 UTC
Created attachment 682594 [details]
build.log.xz
Comment 19 Diagon 2021-01-13 03:13:48 UTC
Created attachment 682597 [details]
emerge.perl.info.xz
Comment 20 Diagon 2021-01-13 03:14:31 UTC
Created attachment 682600 [details]
emerge.perl.pqv.xz
Comment 21 Diagon 2021-01-13 03:38:52 UTC
Created attachment 682603 [details]
environment.xz
Comment 22 Diagon 2021-01-13 03:40:13 UTC
Since the failure appeared to my untrained eye to be at a similar point to the previous, I tried the same work-around.  I created the file:

$PREFIX/tmp/etc/portage/profile/package.provided

containing:

sys-libs/glibc-2.32-r1

It still fails: `Failed to emerge dev-lang/perl-5.32.0-r1`

I am posting logs also post-work-around.
Comment 23 Diagon 2021-01-13 03:41:04 UTC
Created attachment 682606 [details]
stage3.log.post-work-around.xz
Comment 24 Diagon 2021-01-13 03:41:50 UTC
Created attachment 682609 [details]
build.log.post-work-around.xz
Comment 25 Diagon 2021-01-13 03:42:26 UTC
Created attachment 682612 [details]
emerge.perl.info.post-work-around.xz
Comment 26 Diagon 2021-01-13 03:43:00 UTC
Created attachment 682615 [details]
emerge.perl.pqv.post-work-around.xz
Comment 27 Diagon 2021-01-13 03:43:57 UTC
Created attachment 682618 [details]
environment.post-work-around.xz
Comment 28 Fabian Groffen gentoo-dev 2021-01-13 07:14:59 UTC
Ok, from the stage3 log:
* Triggering Linux RAP bootstrap
that should pull in glibc for you
>>> Emerging (1 of 1) sys-libs/glibc-2.32-r7::gentoo
which it does

then later, with perl, I see this happening a few times:

/home/dev/.local/gentoo/bin/pwd: cannot open directory '../../../../../../../../../../../..': Permission denied

at least for the Encode module this appears to be a problem:

LD_LIBRARY_PATH=/home/dev/.local/gentoo/var/tmp/portage/dev-lang/perl-5.32.0-r1/
work/perl-5.32.0 ./miniperl -Ilib make_ext.pl lib/auto/Encode/Encode.so  MAKE="m
ake" LIBPERL_A=libperl.so.5.32.0 LINKTYPE=dynamic
/home/dev/.local/gentoo/bin/pwd: cannot open directory '../../../../../../../../
../../../..': Permission denied
Can't figure out your cwd! at /home/dev/.local/gentoo/var/tmp/portage/dev-lang/p
erl-5.32.0-r1/work/perl-5.32.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
 line 237.
Unsuccessful Makefile.PL(cpan/Encode): code=256 at make_ext.pl line 536.
make: *** [makefile:575: lib/auto/Encode/Encode.so] Error 2
make: *** Waiting for unfinished jobs....

So I think we need to figure out why pwd runs into permission denied, because that's upsetting Perl in this case.
Comment 29 Diagon 2021-01-13 08:24:06 UTC
So what is the base directory that we are moving up (I count) 12 levels from?
Comment 30 Fabian Groffen gentoo-dev 2021-01-13 08:27:23 UTC
don't know, but what does pwd do for you from the perl build dir? does it give the same error?
Comment 31 Diagon 2021-01-13 09:43:06 UTC
$ pwd
/home/dev/.local/gentoo/bin

$ ./pwd
./pwd: cannot open directory '../../../..': Permission denied

Hm.

$ pwd
/home/dev

$ /home/dev/.local/gentoo/bin/pwd
/home/dev/.local/gentoo/bin/pwd: cannot open directory '..': Permission denied

ok....

$ pwd
/home

$ /home/dev/.local/gentoo/bin/pwd
/home

$ ls
ls: cannot open directory .: Permission denied
Comment 32 Fabian Groffen gentoo-dev 2021-01-13 09:47:33 UTC
does your system (filesystem your Prefix is in) rely on xattr or something?
Comment 33 Diagon 2021-01-13 10:19:02 UTC
I doubt it, but if you tell me something to check, I will.  All I can tell you is that the output of mount is:

/dev/vda2 on / type ext4 (rw,noatime,seclabel,data=ordered)

It seems to me that when not located in /home, prefix's pwd is trying to access the /home directory in order to generate any response.  Isn't this a bug in pwd?
Comment 34 Fabian Groffen gentoo-dev 2021-01-13 10:20:48 UTC
https://unix.stackexchange.com/questions/191183/what-does-the-seclabel-mount-option-do

There you go, seems we don't handle this for we need to disable xattr during bootstrap, as it gives us other issues we cannot handle.
Comment 35 Benda Xu gentoo-dev 2021-01-20 01:38:08 UTC
I think this is a good source of our FAQ on the wiki.