Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 678900 - bootstrap-prefix.sh problems on opensuse due to CONFIG_SITE env var
Summary: bootstrap-prefix.sh problems on opensuse due to CONFIG_SITE env var
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-27 08:13 UTC by hsk17
Modified: 2020-05-14 00:08 UTC (History)
0 users

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


Attachments
patches to bootstrap-prefix.sh on opensuse (bootstrap-prefix.sh.patches.tar,10.00 KB, application/x-tar)
2019-02-27 08:13 UTC, hsk17
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hsk17 2019-02-27 08:13:14 UTC
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.
Comment 1 Fabian Groffen gentoo-dev 2019-03-06 12:31:41 UTC
I wonder why this isn't fixed post stage1 after bug #650284
Comment 2 Larry the Git Cow gentoo-dev 2019-03-06 12:34:29 UTC
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(+)
Comment 3 Benda Xu gentoo-dev 2020-05-13 07:34:55 UTC
Does it work now?  Shall we close this bug?
Comment 4 hsk17 2020-05-13 14:38:54 UTC
you may close this bug, thank you
Comment 5 Benda Xu gentoo-dev 2020-05-14 00:08:25 UTC
(In reply to hsk17 from comment #4)
> you may close this bug, thank you

Glad that it finally works.  Thanks for reporting.