AdaCore / gnatstudio

GNAT Studio is a powerful and lightweight IDE for Ada and SPARK.
399 stars 52 forks source link

Installing newer version of GNATSTUDIO, now I cannot build anything #170

Closed MrAda closed 7 months ago

MrAda commented 7 months ago

I installed GNAT Studio 24.0w (20230501) hosted on x86_64-w64-mingw32 GNAT targeting x86_64-w64-mingw32

GNAT Studio (c) 2001-2023 AdaCore

And when I try to clean or build I get error messages like: ... Could not locate executable on path: gprclean or gprbuild

I see those files aren't in the GNATSTUDIO folder. How does one now compile and build stuff?

kevlar700 commented 7 months ago

And when I try to clean or build I get error messages like: ... Could not locate executable on path: gprclean or gprbuild

One way would be to use "https://alire.ada.dev". The alr tool should download gprbuild and a gnat compiler when it asks you to select a toolchain or when selected with. alr toolchain --select

A project can be created with

alr init --bin my_project
cd my_project

The following can be used to launch gnat studio from within a project (atleast on Linux).

alr edit

Edit: though perhaps you know all of this?

MrAda commented 7 months ago

For the most part I have done those. Still not getting what I need. I would like to have my GNATSTUDIO like it was when AdaCore gave us a single executable. Now I have to build every part it seems. Luckily I have Community version from which I can find exe files so my new GNATSTUDIO can run. I am trying to build the missing parts for GNATSTUDIO and I first am not sure how to start, but I saw libadalang needs to be first then the tools. So when I do the first command it only sees my old gnatstudio, not the native compiler. So my question, since I want the new tools, are these available to just download into my GNATSTUDIO area without all the fuss of trying to rebuild something?

MrAda commented 7 months ago

When I do the alr first command you specified I get this: Welcome to the toolchain selection assistant

In this assistant you can set up the default toolchain to be used with any crate that does not specify its own top-level dependency on a version of gnat or gprbuild.

If you choose "None", Alire will use whatever version is found in the environment.

Note: Currently configured: gnat_external=2021.0.0

Please select the gnat version for use with this configuration

  1. gnat_native=13.2.1
  2. None
  3. gnat_external=2021.0.0 [Detected at C:\GNATSTUDIO_old\bin\gnat.exe]
  4. gnat_arm_elf=13.2.1
  5. gnat_avr_elf=13.2.1
  6. gnat_riscv64_elf=13.2.1
  7. gnat_arm_elf=13.1.0
  8. gnat_avr_elf=13.1.0
  9. gnat_native=13.1.0
  10. gnat_riscv64_elf=13.1.0 a. (See more choices...) Enter your choice index (first is default):

    1 Note: Selected tool version gnat_native=13.2.1

Note: Choices for the following tool are narrowed down to releases compatible with just selected gnat_native=13.2.1

Note: Currently configured: gprbuild=2021.0.0

Please select the gprbuild version for use with this configuration

  1. gprbuild=22.0.1
  2. None
  3. gprbuild=21.0.2
  4. gprbuild=21.0.1 Enter your choice index (first is default):

    1 Note: Selected tool version gprbuild=22.0.1 Note: Deploying gprbuild=22.0.1... curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.

File not found - C:\Users\Chris.config\alire\cache\dependencies\alr-rmpi.tmp* File not found - C:\Users\Chris.config\alire\cache\dependencies\alr-rmpi.tmp* ERROR: Command ["curl", "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gprbuild-22.0.0-1/gprbuild-x86_64-windows64-22.0.0-1.tar.gz", "--location", "--progress-bar", "--output", "C:\Users\Chris.config\alire\cache\dependencies\alr-rmpi.tmp\gprbuild-x86_64-windows64-22.0.0-1.tar.gz"] exited with code 35

MrAda commented 7 months ago

so I see it isn't doing anything, not downloading the necessary tools

MrAda commented 7 months ago

Update: I saw that tar ball and all I did is untarballed it and placed the files in my GNATSTUDIO folder in the proper place. Voila! I have those as new for my GNATSTUDIO! Now to get gnatpp and the other things....

Fabien-Chouteau commented 7 months ago

Hello @MrAda ,

What you are calling single executable GNATSTUDIO was in fact the GNAT Community release, which indeed provided GNAT Studio, but also other tools like GNAT (the compiler), GPRbuild, GDB, etc.

GNAT Community was discontinued one an half years ago (see annoucement here) in favor of an ecosystem based on the Alire package manager.

The error messages that you are showing here come from Alire, or at least some tool executed by Alire, so I suggest reporting that to the Alire project: https://github.com/alire-project/alire

Note that if you want to use GNAT Studio with an Alire project you can use the command alr edit inside your Alire project.

Regards,