Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 879563 - dev-lang/gnat-gpl 2020 can't be used to build itselves
Summary: dev-lang/gnat-gpl 2020 can't be used to build itselves
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux ADA team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2022-11-04 12:52 UTC by dullfire
Modified: 2022-11-09 14:04 UTC (History)
1 user (show)

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


Attachments
Example patch/work-around (gnat-gpl.patch,350 bytes, patch)
2022-11-04 12:54 UTC, dullfire
Details | Diff
Console log of failure (cmds.log,4.58 KB, text/x-log)
2022-11-06 17:04 UTC, dullfire
Details
emerge's build enviorment (environment,141.43 KB, text/plain)
2022-11-06 17:05 UTC, dullfire
Details
emerge --info '=dev-lang/gnat-gpl-2020::gentoo' (emerge-info.log,7.67 KB, text/x-log)
2022-11-06 17:06 UTC, dullfire
Details
emerge's build.log (build.log,1.55 KB, text/x-log)
2022-11-06 17:06 UTC, dullfire
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dullfire 2022-11-04 12:52:30 UTC
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.
Comment 1 dullfire 2022-11-04 12:54:54 UTC
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)
Comment 2 Tupone Alfredo gentoo-dev 2022-11-06 15:41:41 UTC
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
Comment 3 dullfire 2022-11-06 17:04:42 UTC
Created attachment 828123 [details]
Console log of failure
Comment 4 dullfire 2022-11-06 17:05:05 UTC
Created attachment 828125 [details]
emerge's build enviorment
Comment 5 dullfire 2022-11-06 17:06:17 UTC
Created attachment 828127 [details]
emerge --info '=dev-lang/gnat-gpl-2020::gentoo'
Comment 6 dullfire 2022-11-06 17:06:43 UTC
Created attachment 828129 [details]
emerge's build.log
Comment 7 dullfire 2022-11-06 17:23:09 UTC
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)
Comment 8 Tupone Alfredo gentoo-dev 2022-11-06 17:57:55 UTC
did you try the same with 2021-r4 ?
Comment 9 Tupone Alfredo gentoo-dev 2022-11-07 06:07:01 UTC
another thing you should check:

is ADA defined in the environment? Is it pointing to a working compiler?
Comment 10 dullfire 2022-11-07 13:51:21 UTC
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
Comment 11 dullfire 2022-11-07 13:54:08 UTC
(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).
Comment 12 Larry the Git Cow gentoo-dev 2022-11-07 17:50:11 UTC
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(-)
Comment 13 dullfire 2022-11-09 14:04:52 UTC
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).