Created attachment 566648 [details] patches to bootstrap-prefix.sh on opensuse gentoo prefix (the non-rap variant) is in use at my site on top of opensuse linux (leap 42.3 and 15.0), and i want to share the tweaks i have to make to bootstrap-prefix.sh to get it run in this environment. please see the attached patches to bootstrap-prefix.sh. explanation: bootstrap-prefix.sh does not work unmodified on opensuse, as opensuse sets the CONFIG_SITE env var in /etc/profile.d/site.[c]sh, and so some shell snippets are loaded on running "configure" that try to automagically set libdir, resulting in ..../lib64 on a 64bit system. (and libexecdir is set to ..../lib, which seems not to hurt here.) this affects bootstrap_python(), where i have to add --libdir="${ROOT}"/tmp/usr/lib \ to the econf call. and it affects each build of gcc in stage2, stage3, and the final "emerge -e system". i found it difficult to get the right --libdir, and possibly more options, added to the respective configure calls, so i just added CONFIG_SITE= in front of the emerge commands that trigger a gcc build. this may or may not be a clean solution, but it worked for me :-) without these changes, bootstrap-prefix.sh fails on opensuse: the bootstrapped python triggers errors, and the built gcc packages fail to work, as all these would get partly installed into lib64 subdirectories. see opensuse_config_site.patch. btw.: bootstrap_libffi() (i.e. bootstrap_gnu libffi 3.2.1) in my case installs libffi into prefix/tmp/usr/lib64. due to commit 94a0ab4f, which adds -L${ROOT}/tmp/usr/lib64 to LDFLAGS in bootstrap_python(), the python bootstrap build sees libffi.so and succeeds. but there is no -Wl,-rpath,${ROOT}/tmp/usr/lib64, and the built _ctypes.so is unusable as the run time loader does not find libffi. this seems not to matter in my case, but to fix the libffi install one could revert 94a0ab4f and add to bootstrap_gnu(): [[ ${PN} == "libffi" ]] && myconf="${myconf} --libdir=${ROOT}/tmp/usr/lib" && sed -i -e '/toolexeclibdir =/s/=.*/= $(libdir)/' Makefile.in with libffi-3.3 this could be [[ ${PN} == "libffi" ]] && myconf="${myconf} --libdir=${ROOT}/tmp/usr/lib --disable-multi-os-directory" see libffi_install.patch.
I wonder why this isn't fixed post stage1 after bug #650284
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=3874c263e5eaa15cd376fb4fb7583443f1772c54 commit 3874c263e5eaa15cd376fb4fb7583443f1772c54 Author: hsk17 <hsk17@mail.de> AuthorDate: 2019-03-06 12:33:58 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2019-03-06 12:33:58 +0000 scripts/bootstrap-prefix: set libdir for python install Bug: https://bugs.gentoo.org/678900 Signed-off-by: Fabian Groffen <grobian@gentoo.org> scripts/bootstrap-prefix.sh | 1 + 1 file changed, 1 insertion(+)
Does it work now? Shall we close this bug?
you may close this bug, thank you
(In reply to hsk17 from comment #4) > you may close this bug, thank you Glad that it finally works. Thanks for reporting.