GNAT Studio is less than informative

I attempt to Compile a .adS file with this output barf:

gnatmake -ws -c -f -u -PC:\GNAT\2021\bin\m8vl4.gpr StrF_000.ads
Compile
[Ada] strf_000.ads
cannot generate code for file strf_000.ads (package spec)
gprbuild: *** compilation phase failed
[2024-09-06 21:55:05] process exited with status 5, elapsed time: 01.13s

Q1: How to fix this?
Q2: What is command line to generate only Ada 95 code, please, and where to instruct GNAT Studio to do that command line?

Especially on Windows you should lower case all of your path and filenames.

Try project settings. There is a setting for Ada 95

On case-insensitive filesystems (Windows, standard macOS) it may not matter so much. On Linux it does.

1 Like

If a spec doesn’t need a body (typically, no subprogram specs) the compiler can generate code. If it does need a body, you need to compile that.

It there had been any actual errors in the spec, the compiler would have said.
I’m afraid the only “fix” is to train yourself not to worry.

2 Likes

For GNAT Community, such as it is: Build => Project [no go]; Build => Settings => Toolchain [no go]. I don’t see a tab for which to apply -gnat95.

The “compilation phase failed” for an .adS file which requires no body, ending in an exit code of status 5.
Would someone else please explain this.

You can add the -gnat95 flag here (not tested) :

Maybe I have a different GNAT Studio for 2021 Community release than you are displaying. From Help tab, I search on properties, on default, and no luck (help file was not written by professional educators).

You can get the last GNATStudio version here : Releases · AdaCore/gnatstudio · GitHub

Maybe I have a different GNAT Studio for 2021 Community release than you are displaying. From Help tab, I search on properties, on default, and no luck (help file was not written by professional educators).

In the screen capture, “Default” is the name of the project.
The “Properties” menu is accessible from the “Edit” menu.

Yes, I agree. That is where I got GNAT Studio Community 2021 (20210423) hosted on x86_64-w64-mingw32
GNAT Community 2021 (20210519-103) targeting x86_64-w64-mingw32
which has a different interface than the one proffered above and, to my understanding, was the last free GNAT Studio rendition.

For example, it goes:
Project [Default, as now assumed] => General => Sources, Build, GNATdoc, Embedded, Version Control, Library, GNATemulator, GNATtest

There is no => Project Properties.

This is probably because AdaCore keeps changing the interfaces willy-nilly, for which Microsoft is most notorious with a profit motive. In other words, there is no generic menu tree for reusable portability.

Why aren’t you using 20240506? There is an ada95 check box for sure.

(a) I’m not a moderator
(b) what are you on about?
(c) OK, goodbye

1 Like

What is content of the strf_000.ads file? GNAT doesn’t support separate complication of the specification and the body, you should compile body file if it is required, and it seems the case.

Why do you need Ada 95?

It is also highy recommended to use GNAT Studio release from GitHub, and lets Alire to manage compiler toolchains. It is a bit more work to setup environment, but much less issues related to old software.

1 Like

or from here, if you’e on macOS

Because 2021 is the last free GNAT Studio / Ada compiler. Subsequent renditions are advertized as pay to play.

The strf_000.adS spec file it is a listing of FUNCTIONS and one PROCEDURE needed in my True BASIC to Ada 95 code translation to [unnamed transliterator for Ada 95 at third party vendor] to VHDL to model any Altec, TI, or Xilinx chip for military requirement. In other words, Ada is a medium to get to VHDL most simply and directly.

The corresponding strf_000.adB body file contains the implementation bodies. The separate compilation is required by Janus/Ada 95, but apparently GNAT is brain dead to that particular traditional process.

The reason for even entertaining GNAT on my laptop for remote work is that the Windows 10 Updates munged the OS to render Jaws II inoperable. Jaws II is far simpler and easier to use than the Gov’t funded NYU generated GNAT family of gcc compilers to support non useful main stream languages but ignoring some such as COBOL.

Ada 95 is needed because it is a relatively perfect vanilla, non controversial version for this conversion and transport without bells and whistles such as present in versions cooked up 30 years later.

Dunno about GitHub or Alire, sounds like something more to learn with academic switches from programmers not professional educators.

This project consists of a mainline with six libraries: Ada.text_io; global variables file; array declarations; user functions (only one); string handling functions (30 with certified test harness); and procedures (147 already tested, so in process of tedious translation). Therefore compilier chains is not a familiar term, at least as yet, since the project is so straight forward.

Community edition was for educational use (and possibly open source use). The community releases have less of what comes with Pro but are free for all to use.