dev-lang/gnat-gpl-2020 and dev-lang/gnat-gpl-2021-r4 fail to compile when one of them is already installed AND the bootstrap flag is removed. both include a line like: ``` if ! use bootstrap && [[ -z "$(type ${GNATMAKE} 2>/dev/null)" ]] ; then ``` However neither inherit ada, which means GNATMAKE is unset. This makes it difficult to use them on archs that are not x86 or amd64 (the two arch that have bootstrap binaries), even if an external bootstrap is provided. Reproducible: Always Steps to Reproduce: 1. built gnat-gpl (with USE"+bootstrap") 2. build gnat-gpl (with USE"-bootstrap") 3. Actual Results: errors with: ``` * You need a gcc compiler that provides the Ada Compiler: * 1) use gcc-config to select the right compiler or * 2) set the bootstrap use flag * ERROR: dev-lang/gnat-gpl-2020::gentoo failed (unpack phase): * ada compiler not available ``` Expected Results: a successful build.
Created attachment 827087 [details, diff] Example patch/work-around No clue if this is a good solution, but it does seem to make it compile (however it would probably break bootstrap, so probably not usable as-is)
To build gnat-gpl either: use +bootstrap or gcc-config (at least temporarily) a gcc with ada (maybe the just bootstrapped gnat-gpl) Building the gcc ada compiler with a newer gcc/ada compiler is not supported If you followed this lines, and it does not build, post your log
Created attachment 828123 [details] Console log of failure
Created attachment 828125 [details] emerge's build enviorment
Created attachment 828127 [details] emerge --info '=dev-lang/gnat-gpl-2020::gentoo'
Created attachment 828129 [details] emerge's build.log
As per the attachements I just added: it seems building with -bootstrap is broken. for example: having dev-lang/gnat-gpl-2020[bootstrap] installed will not allow you to build dev-lang/gnat-gpl-2020[-bootstrap] (even if you set the gcc-config to point to the gnat-gpl toolchain)
did you try the same with 2021-r4 ?
another thing you should check: is ADA defined in the environment? Is it pointing to a working compiler?
It seems I made a mistake. I thought I originally tested on 2021-r4, however an additional check shows 2021-r4 does not exhibit this behavior, I have removed it from the title. For clarity: I can only confirm the issue is present for dev-lang/gnat-gpl-2020
(In reply to Tupone Alfredo from comment #9) > another thing you should check: > > is ADA defined in the environment? Is it pointing to a working compiler? just "ADA"? I've not seen that used before. However it's neither in my shell's environment nor the portage build environment (which is attached).
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b0d126e52f60b0dea062c6a811f4de646d627bc commit 3b0d126e52f60b0dea062c6a811f4de646d627bc Author: Alfredo Tupone <tupone@gentoo.org> AuthorDate: 2022-11-07 17:48:23 +0000 Commit: Alfredo Tupone <tupone@gentoo.org> CommitDate: 2022-11-07 17:49:44 +0000 dev-lang/gnat-gpl: move error diagnostics Closes: https://bugs.gentoo.org/879563 Signed-off-by: Alfredo Tupone <tupone@gentoo.org> dev-lang/gnat-gpl/gnat-gpl-2020.ebuild | 20 +++++++++----------- dev-lang/gnat-gpl/gnat-gpl-2021-r4.ebuild | 3 ++- 2 files changed, 11 insertions(+), 12 deletions(-)
Confirmed this fixed it. Thanks a lot (also now that I know about the ADA even, bootstrapping other !x86 archs should be a tiny bit easier).