commit: b522ecb1078aad753b3970d91699053974440e2f Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sun Mar 20 21:13:16 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Mar 20 21:13:16 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b522ecb1
sys-libs/glibc: add safety check for /usr/lib/include This directory isn't used by anything legitimate but it breaks the build in a confusing way. Add a check for it & bail out if it exists. If you do have this directory on your system, back up its contents, then move it away/delete it. Closes: https://bugs.gentoo.org/643302 Closes: https://bugs.gentoo.org/833620 Signed-off-by: Sam James <sam <AT> gentoo.org> sys-libs/glibc/glibc-2.34-r10.ebuild | 8 ++++++++ sys-libs/glibc/glibc-2.35.ebuild | 8 ++++++++ sys-libs/glibc/glibc-9999.ebuild | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/sys-libs/glibc/glibc-2.34-r10.ebuild b/sys-libs/glibc/glibc-2.34-r10.ebuild index 4dea22b5ab39..2ec1d7e98e09 100644 --- a/sys-libs/glibc/glibc-2.34-r10.ebuild +++ b/sys-libs/glibc/glibc-2.34-r10.ebuild @@ -760,6 +760,14 @@ sanity_prechecks() { # When we actually have to compile something... if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then + if [[ -d "${ESYSROOT}"/usr/lib/include ]] ; then + # bug #833620, bug #643302 + eerror "Found ${ESYSROOT}/usr/lib/include directory!" + eerror "This is known to break glibc's build." + eerror "Please backup its contents then remove the directory." + die "Found directory (${ESYSROOT}/usr/lib/include) which will break build (bug #833620)!" + fi + if [[ ${CTARGET} == *-linux* ]] ; then local run_kv build_kv want_kv diff --git a/sys-libs/glibc/glibc-2.35.ebuild b/sys-libs/glibc/glibc-2.35.ebuild index d656aea8f10a..430062880001 100644 --- a/sys-libs/glibc/glibc-2.35.ebuild +++ b/sys-libs/glibc/glibc-2.35.ebuild @@ -750,6 +750,14 @@ sanity_prechecks() { # When we actually have to compile something... if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then + if [[ -d "${ESYSROOT}"/usr/lib/include ]] ; then + # bug #833620, bug #643302 + eerror "Found ${ESYSROOT}/usr/lib/include directory!" + eerror "This is known to break glibc's build." + eerror "Please backup its contents then remove the directory." + die "Found directory (${ESYSROOT}/usr/lib/include) which will break build (bug #833620)!" + fi + if [[ ${CTARGET} == *-linux* ]] ; then local run_kv build_kv want_kv diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index ffc7af277618..2a26162f17d2 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -750,6 +750,14 @@ sanity_prechecks() { # When we actually have to compile something... if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then + if [[ -d "${ESYSROOT}"/usr/lib/include ]] ; then + # bug #833620, bug #643302 + eerror "Found ${ESYSROOT}/usr/lib/include directory!" + eerror "This is known to break glibc's build." + eerror "Please backup its contents then remove the directory." + die "Found directory (${ESYSROOT}/usr/lib/include) which will break build (bug #833620)!" + fi + if [[ ${CTARGET} == *-linux* ]] ; then local run_kv build_kv want_kv
