Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 473728 (prefix-glibc) - sys-libs/glibc Prefix support
Summary: sys-libs/glibc Prefix support
Status: RESOLVED FIXED
Alias: prefix-glibc
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal enhancement with 1 vote (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 495996 511816 513434 (view as bug list)
Depends on: 464916 473484
Blocks: prefix-gx86 384167 519080
  Show dependency tree
 
Reported: 2013-06-18 18:10 UTC by Benda Xu
Modified: 2017-01-07 13:50 UTC (History)
13 users (show)

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


Attachments
glibc.patch (glibc.patch,12.88 KB, patch)
2013-06-18 18:12 UTC, Benda Xu
Details | Diff
glibc.patch (glibc.patch,12.94 KB, patch)
2013-06-19 13:24 UTC, Benda Xu
Details | Diff
glibc.patch (glibc.patch,13.75 KB, patch)
2013-06-19 13:27 UTC, Benda Xu
Details | Diff
glibc.patch (glibc.patch,13.48 KB, patch)
2013-06-19 16:18 UTC, Benda Xu
Details | Diff
glibc.patch (glibc.patch,13.52 KB, patch)
2013-06-20 03:59 UTC, Benda Xu
Details | Diff
glibc-1.patch (glibc-1.patch,4.76 KB, patch)
2013-06-29 03:25 UTC, Benda Xu
Details | Diff
Prefix patch for glibc eblits (glibc-prefix.patch,7.43 KB, patch)
2014-12-01 08:27 UTC, Benda Xu
Details | Diff
glibc-eblit.patch (g.patch,5.44 KB, patch)
2016-05-27 02:46 UTC, Benda Xu
Details | Diff
glibc-eblit.patch (g.patch,5.19 KB, patch)
2016-05-27 02:55 UTC, Benda Xu
Details | Diff
glibc-eblit-pkg_preinst.patch (glibc-eblit-pkg_preinst.patch,364 bytes, patch)
2016-06-02 08:20 UTC, Benda Xu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benda Xu gentoo-dev 2013-06-18 18:10:07 UTC
The interest of using glibc directly grows[1] besides the use of crosscompiling.

1. https://wiki.gentoo.org/wiki/Prefix/libc

Reproducible: Always
Comment 1 Benda Xu gentoo-dev 2013-06-18 18:12:48 UTC
Created attachment 351336 [details, diff]
glibc.patch

1. add prefix support
2. side effect of bug 464916. Mike, if you do not want to put multilib-env inside is_crosscompile, then condition it against use prefix. (no multilib in Prefix and everything is lib)
3. side effect of bug 473484
Comment 2 SpanKY gentoo-dev 2013-06-18 19:36:03 UTC
Comment on attachment 351336 [details, diff]
glibc.patch

>-alt_prefix() {
>+alt_arch_prefix() {
> 	is_crosscompile && echo /usr/${CTARGET}
> }
>
>+alt_prefix() {
>+	is_crosscompile && echo "${EPREFIX}/usr/${CTARGET}"
>+}

do you really need to keep alt_arch_prefix sep ?  seems like every place that gets called, you actually want alt_prefix.

>-	pushd "${D}"/$(get_libdir) >/dev/null
>+	pushd "${ED}"/$(get_libdir) >/dev/null

these ebuilds are EAPI=0, so you have to initialize ED and EROOT somewhere

>-	glibc_sanity_check
>+	use prefix || glibc_sanity_check

put that check in the sanity check func itself

>+		--with-headers="$(alt_eprefix)"$(alt_build_headers)
>+		--prefix="$(alt_eprefix)"/usr
>+		--libdir="$(alt_eprefix)"/usr/$(get_libdir)
>+		--mandir="$(alt_eprefix)"/usr/share/man
>+		--infodir="$(alt_eprefix)"/usr/share/info
>+		--libexecdir="$(alt_eprefix)"/usr/$(get_libdir)/misc/glibc
>+		--sysconfdir="$(alt_eprefix)"/etc
>+		--localstatedir="$(alt_eprefix)"/var

put the quotes around the whole RHS of the =

>+	export libc_cv_slibdir="$(alt_eprefix)"/$(get_libdir)

same here

>+		--with-headers=$(alt_eprefix)$(alt_build_headers)
>+		--prefix="$(alt_eprefix)"/usr

and here

> get_kheader_version() {
> 	printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \
>-	$(tc-getCPP ${CTARGET}) -I "$(alt_build_headers)" | \
>+	$(tc-getCPP ${CTARGET}) -I "${EPREFIX}/$(alt_build_headers)" | \

seems to me that you should include $EPREFIX in the output of alt_build_headers.  everywhere you call that func, you manually add the prefix (and not consistently at that).

>+	epatch "${FILESDIR}"/2.17/locale-gen_prefix.patch

we're not patching the file.  keep unrelated (to this bug) changes out.

> inherit eutils versionator toolchain-funcs flag-o-matic gnuconfig multilib unpacker multiprocessing
>+inherit prefix

keep it all on one line
Comment 3 Benda Xu gentoo-dev 2013-06-19 13:24:43 UTC
Created attachment 351386 [details, diff]
glibc.patch

updated with nice explanation of offsets.

The assignment of EROOT / ED in pkg_setup phase is forbidden somehow, saying ED/EROOT is readonly variable.
Comment 4 Benda Xu gentoo-dev 2013-06-19 13:27:14 UTC
Created attachment 351388 [details, diff]
glibc.patch
Comment 5 Benda Xu gentoo-dev 2013-06-19 16:18:09 UTC
Created attachment 351402 [details, diff]
glibc.patch

1. ED EROOT are protected variables, assigning them gets failed.
2. without explicit definition of ED/EROOT in Gentoo vanilla, it emerges without problem.

Not sure about the reason here for EAPI 0.

Tested environments are:

Portage 2.2.01.22013-prefix (!../../../home/benda/art/hack/tauon/profiles/prefix/linux/amd64/with-libc, gcc-4.7.2, unavailable, 2.6.35-14.1.el5.elrepo x86_64)
=================================================================
System uname: Linux-2.6.35-14.1.el5.elrepo-x86_64-Intel-R-_Xeon-R-_CPU_E5606_@_2.13GHz-with-redhat-5.8-Final
KiB Mem:    33007992 total,   1011332 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Wed, 19 Jun 2013 05:41:34 +0000
ld GNU ld (GNU Binutils) 2.23
distcc 3.1 x86_64-pc-linux-gnu [enabled]
app-shells/bash:          4.2_p39-r1
dev-lang/python:          2.7.5
dev-util/pkgconfig:       0.28
sys-devel/autoconf:       2.69
sys-devel/automake:       1.12.4
sys-devel/binutils:       2.23
sys-devel/gcc:            4.7.2-r1
sys-devel/gcc-config:     1.8-r00.1::heroxbd
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17::heroxbd
Repositories: gentoo_prefix heroxbd
ACCEPT_KEYWORDS="~amd64-linux"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=corei7"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=corei7"
DISTDIR="/opt/gentoo/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distcc distlocks ebuild-locks fixlafiles force-prefix merge-sync news parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j40"

and 

Portage 2.1.12.4 (default/linux/amd64/13.0, gcc-4.6.3, glibc-2.15-r3, 3.9-1-amd64 x86_64)
=================================================================
System uname: Linux-3.9-1-amd64-x86_64-Intel-R-_Xeon-R-_CPU_E5606_@_2.13GHz-with-gentoo-2.2
KiB Mem:    16471224 total,   6688796 free
KiB Swap:    1354748 total,   1354748 free
Timestamp of tree: Sun, 16 Jun 2013 02:00:01 +0000
ld GNU ld (GNU Binutils) 2.22
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.69
sys-devel/automake:       1.12.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo heroxbd
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j16"
PKGDIR="/usr/portage/packages"
Comment 6 Zac Medico gentoo-dev 2013-06-19 17:52:18 UTC
(In reply to Benda Xu from comment #5)
> 2. without explicit definition of ED/EROOT in Gentoo vanilla, it emerges
> without problem.

Portage behavior does not match PMS for EAPI {0..2} when FEATURES=force-prefix is enabled. It's documented in the make.conf man page.
Comment 7 SpanKY gentoo-dev 2013-06-19 22:05:12 UTC
(In reply to Zac Medico from comment #6)

yeah, relying on that behavior isn't going to fly.  i thought in the past we did things like:
  : ${ED:=${D}}
  : ${EROOT:=${ROOT}}

does that not work ?  or did we just do:
  [[ -z ${ED} ]] && ED=${D}
  [[ -z ${EROOT ]] && EROOT=${ROOT}
Comment 8 Benda Xu gentoo-dev 2013-06-20 03:59:20 UTC
Created attachment 351436 [details, diff]
glibc.patch

Using vapier's suggestion

  : ${ED:=${D}}
  : ${EROOT:=${ROOT}}
Comment 9 SpanKY gentoo-dev 2013-06-28 05:21:52 UTC
Comment on attachment 351436 [details, diff]
glibc.patch

i think you should commit just the $ED & $EROOT changes.  those all look fine and it'll make it easier to focus on the rest.
Comment 10 Benda Xu gentoo-dev 2013-06-29 03:25:35 UTC
Created attachment 352204 [details, diff]
glibc-1.patch

Applied ED/EROOT patch to cvs. This the remaining patch.
Comment 11 Benda Xu gentoo-dev 2013-07-27 09:25:40 UTC
Hey Mike, this is a friendly ping on this bug. Prefix support for glibc is also needed for crossdev on Prefix.
Comment 12 mike@marineau.org 2013-10-31 21:57:14 UTC
Greetings!

Setting EROOT in the ebuild is breaks installing binary packages with different values for ROOT than they were built with. Now with ${EROOT:=${ROOT}} the value of EROOT is preserved in the package's environment and re-used by pkg_preinst() resulting in this strange situation:

emerge --root=/tmp/root1 --buildpkg sys-libs/glibc
rm -rf /tmp/root1
emerge --root=/tmp/root2 --usepkg sys-libs/glibc
find /tmp/root1
/tmp/root1
/tmp/root1/etc
/tmp/root1/etc/ld.so.conf.d

etc/ld.so.conf.d is being created in the wrong root! This specific bug then causes other issues later on because tools like gcc-config will gracefully skip writing etc/ld.so.conf.d/05gcc-x86_64-pc-linux-gnu.conf and similar if etc/ld.so.conf.d doesn't already exist and as far as I can tell (so far) the pkg_preinst step in glibc is the only thing in Gentoo that will actually create that directory.
Comment 13 Benda Xu gentoo-dev 2013-11-01 02:27:17 UTC
(In reply to Michael Marineau from comment #12)
> Greetings!
> 
> Setting EROOT in the ebuild is breaks installing binary packages with
> different values for ROOT than they were built with. Now with
> ${EROOT:=${ROOT}} the value of EROOT is preserved in the package's
> environment and re-used by pkg_preinst() resulting in this strange situation:
> 
> emerge --root=/tmp/root1 --buildpkg sys-libs/glibc
> rm -rf /tmp/root1
> emerge --root=/tmp/root2 --usepkg sys-libs/glibc
> find /tmp/root1
> /tmp/root1
> /tmp/root1/etc
> /tmp/root1/etc/ld.so.conf.d
> 
> etc/ld.so.conf.d is being created in the wrong root! This specific bug then
> causes other issues later on because tools like gcc-config will gracefully
> skip writing etc/ld.so.conf.d/05gcc-x86_64-pc-linux-gnu.conf and similar if
> etc/ld.so.conf.d doesn't already exist and as far as I can tell (so far) the
> pkg_preinst step in glibc is the only thing in Gentoo that will actually
> create that directory.

Thanks, Michael. It feels like a bug in portage to me. ROOT is not preserved in environment, neither should EROOT. I'll let bug 490014 track this issue instead.
Comment 14 mike@marineau.org 2013-11-01 20:59:26 UTC
(In reply to Benda Xu from comment #13)
> 
> Thanks, Michael. It feels like a bug in portage to me. ROOT is not preserved
> in environment, neither should EROOT. I'll let bug 490014 track this issue
> instead.

Yeah, I was debating where the bug really was but decided to give portage a pass since EROOT technically isn't special in EAPI=0 but perhaps it should be even if it isn't strictly defined to be so. :)
Comment 15 SpanKY gentoo-dev 2014-06-01 00:36:53 UTC
*** Bug 511816 has been marked as a duplicate of this bug. ***
Comment 16 SpanKY gentoo-dev 2014-06-14 22:51:12 UTC
*** Bug 495996 has been marked as a duplicate of this bug. ***
Comment 17 SpanKY gentoo-dev 2014-09-09 20:30:51 UTC
*** Bug 513434 has been marked as a duplicate of this bug. ***
Comment 20 SpanKY gentoo-dev 2014-09-10 18:58:00 UTC
Commit message: Upgrade EAPI to 4
http://sources.gentoo.org/sys-libs/glibc/glibc-2.20.ebuild?r1=1.1&r2=1.2
Comment 21 SpanKY gentoo-dev 2014-09-10 19:15:46 UTC
Commit message: Use SYSROOT when looking for source rather than ROOT
http://sources.gentoo.org/sys-libs/glibc/files/eblits/common.eblit?r1=1.40&r2=1.41
Comment 22 SpanKY gentoo-dev 2014-09-10 19:25:02 UTC
Comment on attachment 352204 [details, diff]
glibc-1.patch

this will need refreshing, but seems like it'd be pretty straight forward to port to the latest code.

i think alt_build_headers should handle $EPREFIX logic itself since it is tasked with finding the full path.  the fallback logic that probes the location will return a fully qualified path, so inserting $EPREFIX in front of that is actually wrong.

in the headers compile/configure paths, i don't think you need $TPREFIX (or $EPREFIX).  it's only used when bootstrapping the toolchain in the cross compile scenario which means $TPREFIX is always going to be empty.
Comment 23 Joakim Tjernlund 2014-09-10 20:14:03 UTC
(In reply to SpanKY from comment #21)
> Commit message: Use SYSROOT when looking for source rather than ROOT
> http://sources.gentoo.org/sys-libs/glibc/files/eblits/common.eblit?r1=1.
> 40&r2=1.41

I don't understand how one can depend on SYSROOT in ebuilds. To me SYSROOT
is just an env. variable currently set by cross-emerge but I as far as
I can tell SYSROOT is in no way an official variable like ROOT etc. is.
Comment 24 Joakim Tjernlund 2014-09-10 20:18:34 UTC
(In reply to SpanKY from comment #22)
> Comment on attachment 352204 [details, diff] [details, diff]
> glibc-1.patch
> 
> this will need refreshing, but seems like it'd be pretty straight forward to
> port to the latest code.
> 
> i think alt_build_headers should handle $EPREFIX logic itself since it is
> tasked with finding the full path.  the fallback logic that probes the
> location will return a fully qualified path, so inserting $EPREFIX in front
> of that is actually wrong.
> 
> in the headers compile/configure paths, i don't think you need $TPREFIX (or
> $EPREFIX).  it's only used when bootstrapping the toolchain in the cross
> compile scenario which means $TPREFIX is always going to be empty.

Now that glibc is at EAPI=4, perhaps timezone-data can move to PDEPEND?
Comment 25 SpanKY gentoo-dev 2014-09-10 22:12:39 UTC
(In reply to Joakim Tjernlund from comment #23)

SYSROOT is the way to get at source code.  ROOT is never used in src_* for source related things.

(In reply to Joakim Tjernlund from comment #24)

PDEPEND is in EAPI 0, and the topic of timezone data doesn't apply to this bug
Comment 26 Joakim Tjernlund 2014-09-11 12:43:18 UTC
(In reply to SpanKY from comment #25)
> (In reply to Joakim Tjernlund from comment #23)
> 
> SYSROOT is the way to get at source code.  ROOT is never used in src_* for
> source related things.

But were is this stated? Never seen this descibed 

> 
> (In reply to Joakim Tjernlund from comment #24)
> 
> PDEPEND is in EAPI 0, and the topic of timezone data doesn't apply to this
> bug

oh, I thought that it was in an later EAPI, my bad.
Then I can play with this when I get some time :)
Comment 27 Sebastian 2014-09-15 10:12:12 UTC
Hello all,

I'm not 100% sure this happened due to recent changes in the eblits directory. But on my no-multilib amd64 box I wasn't able to compile glibc 2.19-r1. It failed with the same message you can find here:

http://permalink.gmane.org/gmane.linux.gentoo.releng.autobuilds/736

 * Messages for package sys-libs/glibc-2.19-r1:
 * Defaulting /etc/host.conf:multi to on
 * ERROR: sys-libs/glibc-2.19-r1::gentoo failed (preinst phase):
 *   simple run test (/usr/bin/cal) failed
 * 
 * Call stack:
 *           ebuild.sh, line   93:  Called pkg_preinst
 *         environment, line 2910:  Called eblit-run 'pkg_preinst'
 *         environment, line 1029:  Called eblit-glibc-pkg_preinst
 *   pkg_preinst.eblit, line   54:  Called glibc_sanity_check
 *   pkg_preinst.eblit, line   33:  Called die
 * The specific snippet of code:
 *   		./ld-*.so --library-path . ${x} > /dev/null \
 *   			|| die "simple run test (${x}) failed"
 * 
 * If you need support, post the output of `emerge --info '=sys-libs/glibc-2.19-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.19-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-libs/glibc-2.19-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-libs/glibc-2.19-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-libs/glibc-2.19-r1/image/lib64'
 * S: '/var/tmp/portage/sys-libs/glibc-2.19-r1/work/glibc-2.19'

Basically it went into /var/tmp/portage/sys-libs/glibc-2.19-r1/image/lib64 and tried to run ./ld-*.so. But there was just nothing in that dir except a broken symlink (ld-linux-x86-64.so.2).

I did an emerge-webrsync --revert=20140908 (so a snapshot a few days older than recent changes) and was able to install glibc without issues.

Sorry I don't have anything more definitive, but I thought I should bring it up.

Kind regards,
Sebastian
Comment 28 SpanKY gentoo-dev 2014-09-18 20:50:25 UTC
(In reply to Sebastian from comment #27)

that was reported & fixed in a diff bug
Comment 29 Benda Xu gentoo-dev 2014-12-01 08:27:12 UTC
Created attachment 390684 [details, diff]
Prefix patch for glibc eblits

Dear Mike,

Thank you very much for your time!  It is so exciting to see eblits supports the newest EAPI.

I have refreshed the patch.

(In reply to SpanKY from comment #22)
> Comment on attachment 352204 [details, diff] [details, diff]
> glibc-1.patch
> 
> this will need refreshing, but seems like it'd be pretty straight forward to
> port to the latest code.

Yup.
 
> i think alt_build_headers should handle $EPREFIX logic itself since it is
> tasked with finding the full path.  the fallback logic that probes the
> location will return a fully qualified path, so inserting $EPREFIX in front
> of that is actually wrong.

Yes, you are right.  I refactorized the code as you said.

> in the headers compile/configure paths, i don't think you need $TPREFIX (or
> $EPREFIX).  it's only used when bootstrapping the toolchain in the cross
> compile scenario which means $TPREFIX is always going to be empty.

$TPREFIX is needed.  It is used not only in "bootstrapping the toolchain in the cross compile scenario" but also in native compiling of Prefix (where TPREFIX=EPREFIX) and in cross-triplet-prefix (cross compiling and TPREFIX!="").

For example, --mandir="${TPREFIX}"/usr/share/man.   The man pages of glibc in a Prefix system must go to "${TPREFIX}"/usr/share/man.

During my consideration of your point here, I discovered a more elegant way to handle the complexity of the prefixes, as shown in the updated patch.

Thanks again.  Looking forward to hearing from you.

Cheers,
Benda
Comment 30 Benda Xu gentoo-dev 2016-05-27 02:46:09 UTC
Created attachment 435510 [details, diff]
glibc-eblit.patch

Hi, Mike.  I have cleaned up the patch and rebased it to the newest eblits.  Please have a look.
Comment 31 Benda Xu gentoo-dev 2016-05-27 02:55:31 UTC
Created attachment 435512 [details, diff]
glibc-eblit.patch
Comment 32 SpanKY gentoo-dev 2016-05-27 18:05:20 UTC
all but the configure/econf changes are fine, so feel free to land those

seems like --libexecdir could be set to '$(libdir)/misc/glibc' instead

otherwise, i think the econf change needs to be reviewed in fuller detail as to all the flags it might be adding here.  we want to make sure --libdir is always passed, as is --prefix (glibc will abort if it isn't).  the --host/--build flags should also get checked.
Comment 33 Benda Xu gentoo-dev 2016-06-02 08:12:08 UTC
(In reply to SpanKY from comment #32)
> all but the configure/econf changes are fine, so feel free to land those
> 
> seems like --libexecdir could be set to '$(libdir)/misc/glibc' instead
> 
> otherwise, i think the econf change needs to be reviewed in fuller detail as
> to all the flags it might be adding here.  we want to make sure --libdir is
> always passed, as is --prefix (glibc will abort if it isn't).  the
> --host/--build flags should also get checked.

Thanks Mike.  I have pushed commit a0b8f3652b5a1aa4.  No configure -> econf was used.
Comment 34 Benda Xu gentoo-dev 2016-06-02 08:20:57 UTC
Created attachment 436150 [details, diff]
glibc-eblit-pkg_preinst.patch

The final Prefix patch is to support Prefix bootstrap.

The bootstrap of Prefix installs helper binaries (ls, date, etc.) inside EPREFIX/tmp before glibc.  They are linked against host libraries Prefix glibc does not know, and they might have symbol conflicts because of different versions of glibc.

Besides, it is not a big deal if glibc breaks during bootstrap, before a usable system is in use.

Therefore we need a switch to skip sanity check.
Comment 35 Benda Xu gentoo-dev 2016-06-13 01:36:10 UTC
(In reply to Benda Xu from comment #34)
> Created attachment 436150 [details, diff] [details, diff]
> glibc-eblit-pkg_preinst.patch
> 
> The final Prefix patch is to support Prefix bootstrap.
> 
> The bootstrap of Prefix installs helper binaries (ls, date, etc.) inside
> EPREFIX/tmp before glibc.  They are linked against host libraries Prefix
> glibc does not know, and they might have symbol conflicts because of
> different versions of glibc.
> 
> Besides, it is not a big deal if glibc breaks during bootstrap, before a
> usable system is in use.
> 
> Therefore we need a switch to skip sanity check.
Hi, Mike.  Does it look good to land?  I think catalyst can also make use of it, if you prefer another variable name.
Comment 36 Benda Xu gentoo-dev 2016-06-23 00:44:14 UTC
*** Bug 583216 has been marked as a duplicate of this bug. ***
Comment 37 Benda Xu gentoo-dev 2016-08-01 01:47:35 UTC
Ping Mike.
Comment 38 Benda Xu gentoo-dev 2017-01-07 13:50:08 UTC
No objection was raised in the past 7 months.  Landed the patch in tree.  Thanks.

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63c6df1a0ce38bb72792aef3ced98f3ccba8c684