-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ada Extension cannot find compiler chain in WSL2 (22.04 Ubuntu) #1146
Comments
I eventually get this message as well: I should reinforce, from a VS code terminal window, I can gprbuild the file as well as execute the resulting binary. |
Yes I have. VS Code works properly for other language servers (C++ as an example). I also, walked through the steps here: After several minutes it complains about no ada toolchain. Screen shots attached. ![]() ![]() |
This is likely due to a version mismatch between the GNAT and GCC versions you have installed. I had pretty much the same problem recently on Ubuntu. By default, |
Could you try to install |
I will try both suggestions. I'm not sure about the gcc version, I thought on my clean install gnat forced a load of a matching gcc, but I'll check. I'll also try Alire, but unfortunately on WSL2 anyway when I tried Alire before I gave up as the performance was horrible. A hello world app took 4 minutes to build. The same code with gprbuild took a second. But I will try the combination as well. |
Bingo. I think we have a winner. @brownts nailed it. apt removed everything and did gcc with gnat-11 and it works on ec2. I'll try WSL2 next. |
Also verified that it fixes WSL2. Should this get added to the Ada language server front page? |
We have added more diagnostic messages in the extension 23.0.18. While we seek to better support Debian/Ubuntu Ada toolchains, I think, it worth to mention this bug on Ada language server front page, indeed. |
Environment is WSL2 on Windows 11 2H22. Distro is Ubuntu Jammy.
I did a sudo apt install gnat gprbuild
Both completed with success.
I have the ALS installed with version 23.0.17.
I can manually compile with gprbuild the hello_world example from the ALS tutorial.
However, I'm getting no language server behavior and it is complaining that it cannot find a toolchain. If I open a terminal from VS Code and do gnatls, I see the expected output. I can also do a gprbuild for the .gpr file from the hello_world example and it compiles correctly and the program runs normally. However, the language server insists that there is no tool chain.
Suggestions? Or is this a bug?
The text was updated successfully, but these errors were encountered: