Gentoo Archives: gentoo-alt

From: Matthias Gerstner <mgerstner@××××.de>
To: gentoo-alt@l.g.o
Subject: [gentoo-alt] bootstrap-prefix.sh / bootstrap-rap.sh failing on OpenSUSE Leap
Date: Tue, 15 Nov 2016 16:37:21
Message-Id: 20161115163712.GD12852@f195.suse.de
1 Hi,
2
3 I'm attempting to a install a Prefixed Portage on my openSUSE Leap 42.2.
4 Trying this I've ended up in three different error situations.
5
6 Using the current bootstrap-prefix.sh script this fails early in stage1
7 during "Compiling prefix-portage", because of this:
8
9 ------------------------------------------------------------------------
10 checking for python... /gentoo/tmp/usr/bin/python
11 Could not find platform dependent libraries <exec_prefix>
12 [...]
13 IOError: invalid Python installation: unable to open /gentoo/tmp/usr/lib/python2.7/config/Makefile (No such file or directory)
14 ------------------------------------------------------------------------
15
16 The missing file(s) are found in /gentoo/tmp/usr/lib64 instead. openSUSE
17 installs 64-bit binaries in lib64 and "the rest" beneath lib. May have
18 to do with settings in /usr/share/site/x86_64-unknown-linux-gnu.
19
20 I can fix this error by manually moving the files to the expected
21 location. Then the script progresses to stage3, builds gcc and just
22 after that tries to build sys-apps/sed, which fails, because configure
23 fails:
24
25 ------------------------------------------------------------------------
26 configure:4243: error: C compiler cannot create executables
27
28 configure:4172: checking whether the C compiler works
29 configure:4194: x86_64-pc-linux-gnu-gcc -O2 -pipe -O2 -pipe -I/gentoo/usr/include -L/gentoo/usr/lib conftest.c >&5
30 ld: cppannot find -lgcc_s
31 collect2: error: ld returned 1 exit status
32 ------------------------------------------------------------------------
33
34 Due to this I tried the RAP variant using the current bootstrap-rap.sh.
35 This went through nearly to the end but fails during stage3, because
36 emerge is suddenly coping with permission problems. It happens during
37 emerge of virtual/os-headers:
38
39 ------------------------------------------------------------------------
40 >>> No outdated packages were found on your system.
41
42 * IMPORTANT: config file '/portage/etc/hosts' needs updating.
43 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
44 * sections of the emerge man page to learn how to update config files.
45 setlocale: unsupported locale setting
46 !!! Directory initialization failed: '/portage/var/lib/portage'
47 !!! chown('/portage/var/lib/portage', -1, 0)
48 !!! Directory initialization failed: '/portage/var/cache/edb'
49 !!! chown('/portage/var/cache/edb', -1, 0)
50 Traceback (most recent call last):
51 File "/portage/usr/lib64/python3.4/site-packages/portage/util/__init__.py", line 1084, in apply_permissions
52 os.chown(filename, uid, gid)
53 File "/portage/usr/lib64/python3.4/site-packages/portage/__init__.py", line 250, in __call__
54 rval = self._func(*wrapped_args, **wrapped_kwargs)
55 PermissionError: [Errno 1] Operation not permitted: b'/portage/var/cache/edb/dep/portage'
56
57 During handling of the above exception, another exception occurred:
58
59 Traceback (most recent call last):
60 File "/portage/usr/lib/python-exec/python3.4/emerge", line 50, in <module>
61 retval = emerge_main()
62 File "/portage/usr/lib64/python3.4/site-packages/_emerge/main.py", line 1196, in emerge_main
63 action=myaction, args=myfiles, opts=myopts)
64 File "/portage/usr/lib64/python3.4/site-packages/portage/proxy/objectproxy.py", line 31, in __call__
65 return result(*args, **kwargs)
66 File "/portage/usr/lib64/python3.4/site-packages/_emerge/actions.py", line 2408, in load_emerge_config
67 setconfig = load_default_config(settings, root_trees)
68 File "/portage/usr/lib64/python3.4/site-packages/portage/_sets/__init__.py", line 302, in load_default_config
69 return SetConfig(_getfiles(), settings, trees)
70 File "/portage/usr/lib64/python3.4/site-packages/portage/_sets/__init__.py", line 53, in __init__
71 read_configs(self._parser, paths)
72 File "/portage/usr/lib64/python3.4/site-packages/portage/util/configparser.py", line 52, in read_configs
73 for p in paths:
74 File "/portage/usr/lib64/python3.4/site-packages/portage/_sets/__init__.py", line 294, in _getfiles
75 dbapi = trees["porttree"].dbapi
76 File "/portage/usr/lib64/python3.4/site-packages/portage/util/__init__.py", line 1505, in __getitem__
77 result = lazy_item.func(*pargs, **kwargs)
78 File "/portage/usr/lib64/python3.4/site-packages/portage/dbapi/porttree.py", line 1096, in __init__
79 self.dbapi = portdbapi(mysettings=settings)
80 File "/portage/usr/lib64/python3.4/site-packages/portage/dbapi/porttree.py", line 240, in __init__
81 self.depcachedir, x, self._known_keys, **cache_kwargs)
82 File "/portage/usr/lib64/python3.4/site-packages/portage/cache/flat_hash.py", line 38, in __init__
83 self._ensure_dirs()
84 File "/portage/usr/lib64/python3.4/site-packages/portage/cache/fs_template.py", line 72, in _ensure_dirs
85 apply_permissions(base, mode=mode, gid=self._gid)
86 File "/portage/usr/lib64/python3.4/site-packages/portage/util/__init__.py", line 1091, in apply_permissions
87 raise OperationNotPermitted(func_call)
88 portage.exception.OperationNotPermitted: chown('/portage/var/cache/edb/dep/portage', -1, 0)
89 ------------------------------------------------------------------------
90
91 It seems to have to do with the group ID used for the portage
92 directories. The global variable portage_gid seems to evaluate to 0,
93 thus emerge tries to chown to -1:0 on directories like /var/lib/portage,
94 which isn't possible, of course, as a non-root user.
95
96 From this point onward the emerge within the prefix is broken with this
97 error.
98
99 Any ideas on this? Any help is appreciated.
100
101 Regards
102
103 Matthias

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies