Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 681742

Summary: cross-aarch64-unknown-linux-android/gcc-7.3.0-r3 - cc1: error: no include path in which to search for stdc-predef.h
Product: Gentoo Linux Reporter: MJ <mjaoune55>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: cross-aarch64-unknown-linux-android-info.log
GCC build log
GNU aarch64 build log
GNU aarch64 GLIBC

Description MJ 2019-03-25 17:25:28 UTC
Created attachment 570722 [details]
cross-aarch64-unknown-linux-android-info.log

When trying to install "aarch64-unknown-linux-android" or "aarch64-hardfloat-linux-gnueabi" (And some other AARCH64 toolkits), I get the following message while "Emerging cross-gcc-stage1": "error: gcc failed :("

Tried using latest upstream version (Not GIT) of crossdev, also not working.
Comment 1 MJ 2019-03-25 17:26:12 UTC
Created attachment 570724 [details]
GCC build log
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2019-03-25 19:51:16 UTC
I suspect '*-android' tuples would need special libc (bionic?). I don't think gentoo packages it today.

aarch64-hardfloat-linux-gnueabi is a bit unusual tuple. I suggest using 'aarch64-unknown-linux-gnu'. Can you attach build failure for that?
Comment 3 MJ 2019-03-25 20:08:47 UTC
(In reply to Sergei Trofimovich from comment #2)
> I suspect '*-android' tuples would need special libc (bionic?). I don't
> think gentoo packages it today.
> 
> aarch64-hardfloat-linux-gnueabi is a bit unusual tuple. I suggest using
> 'aarch64-unknown-linux-gnu'. Can you attach build failure for that?

"aarch64-unknown-linux-gnu" fails when building "glibc": error: glibc failed :(

I am not building the "stable" toolkit.

Attached build log.
Comment 4 MJ 2019-03-25 20:10:08 UTC
Created attachment 570810 [details]
GNU aarch64 build log
Comment 5 MJ 2019-03-25 20:10:46 UTC
Created attachment 570812 [details]
GNU aarch64 GLIBC
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2019-03-25 20:56:58 UTC
> (cross-aarch64-unknown-linux-gnu-glibc.log.xz,800 bytes, application/x-xz) 

> [ebuild     U ~] net-dns/libidn2-2.1.1a [2.0.4]
> [ebuild   R   ~] cross-aarch64-unknown-linux-gnu/glibc-2.28-r5  USE="-headers-only*" 
> 
> The following keyword changes are necessary to proceed:
>  (see "package.accept_keywords" in the portage(5) man page for more details)
> =net-dns/libidn2-2.1.1a ~amd64

yeah, it's a bug in glibc's dependencies. We should not pull in net-dns/libidn2 into BUILD for HOST glibc. I'll tweak the dependencies.
Comment 7 Larry the Git Cow gentoo-dev 2019-03-25 21:16:51 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00a8e87b3afc16af56632d08884263623800bd99

commit 00a8e87b3afc16af56632d08884263623800bd99
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-03-25 21:16:14 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-03-25 21:16:43 +0000

    sys-libs/glibc: avoid libidn2 in bootstrap, bug #681742
    
    When bootstrapping a cross-toolchain don't pull in libidn2 into
    the host as it's not stable yet everywhere (requires KEYWORDS
    fiddling) and is not needed on host (it's cross-glibc).
    
    Reported-by: Mahmoud Jaoune
    Bug: https://bugs.gentoo.org/681742
    Package-Manager: Portage-2.3.62, Repoman-2.3.12
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 sys-libs/glibc/glibc-2.28-r5.ebuild | 6 ++++--
 sys-libs/glibc/glibc-2.29-r1.ebuild | 6 ++++--
 sys-libs/glibc/glibc-2.29.ebuild    | 6 ++++--
 sys-libs/glibc/glibc-9999.ebuild    | 6 ++++--
 4 files changed, 16 insertions(+), 8 deletions(-)
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2019-03-26 07:29:23 UTC
Please check if commit in comment7 resolves the failure.
Comment 9 MJ 2019-03-26 10:23:40 UTC
(In reply to Sergei Trofimovich from comment #8)
> Please check if commit in comment7 resolves the failure.

Works flawlessly.

So no chance of the "android-" toolkits working?
Comment 10 Sergei Trofimovich (RETIRED) gentoo-dev 2019-03-26 23:11:09 UTC
(In reply to Mahmoud Jaoune from comment #9)
> So no chance of the "android-" toolkits working?

Not today perhaps. But if you know what is needed (packages and build order) to bootstrap android toolchain we can certainly add it to crossdev and gentoo.
Comment 11 Andreas K. Hüttel archtester gentoo-dev 2023-08-22 21:37:56 UTC
Is this still relevant?