AdaCore / ada_language_server

Server implementing the Microsoft Language Protocol for Ada and SPARK
GNU General Public License v3.0
226 stars 54 forks source link

Project loaded but no runtime found. Can't find toolchain. #1164

Closed oscarrutt closed 10 months ago

oscarrutt commented 10 months ago

It looks like I'm having a similar problem to #1160 and #1161.

This problem possibly started after restarting VScode after not quitting for a long time (weeks??).

The Problems panel shows problems with each Ada file, but only when I click on the tab to display the file contents. The problem report for each file remains until I close the file. Also, a problem is reported when my gpr file tab is clicked but using a different theme color to indicate the error.

The problem text for Ada sources, when the tab is clicked, is: The project was loaded, but no Ada runtime found. Please check the installation of the Ada compiler.

The problem for the gpr is reported as can't find a toolchain for the following configuration: language 'Ada', target 'x86_64-darwin', default runtime

I have started logging as suggested in #1160 and the two files created are attached to this post.

Some unordered points:

oscarrutt commented 10 months ago

I guess nobody is ever going to fix the awkward file uploader for this site. I hope my two log files made it.

AnthonyLeonardoGracio commented 10 months ago

Hello @oscarrutt,

Possibly during the extended period that VScode was running, I deleted an old (2015) GNAT for x86-64-darwin which I had not used since getting the M1 Mac.

That probably explains it: you are running an extension built for x86-64-darwin with Rosetta (we don't build it for aarch64 yet), that's why it complains about the missing toolchain.

You may solve this by specifying the Target attribute in your GPR project file, so that it actually targets aarch64.

Regards,

oscarrutt commented 10 months ago

Thanks. That seems to have fixed it! For reference, the full line in my .gpr file is for Target use "aarch64-darwin";

AnthonyLeonardoGracio commented 10 months ago

Thanks. That seems to have fixed it! For reference, the full line in my .gpr file is for Target use "aarch64-darwin";

Glad to hear that! Closing the issue for now. We'll see what we can do to have native support for aarch64-darwin internally though, but no promises here.

Regards,