AdaCore / AdaCore/ada_language_server

Ada Extension cannot find compiler chain in WSL2 (22.04 Ubuntu)

Open
#1,146 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ada
Stars
304
Forks
70
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in WSL2 on Ubuntu Jammy with VS Code, using the hello_world example and the installed gnatls and gprbuild commands. Compare the tools visible in the terminal with what the Ada language server detects; done means the language server recognizes the installed compiler chain and provides language-server behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
ubuntu, vscode
Domain
compilers, devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.