-
Notifications
You must be signed in to change notification settings - Fork 55
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
Can't find a toolchain for the following configuration #1160
Comments
Hello @Joebeazelman ! How can I reproduce this? What is the build command? I tried to reproduce and it works for me. My steps:
|
Not sure what happened, but I tried to set the GNAT version inside the project toml file and the issue started. |
The issue started up again. I can build the project without issue if I execute alr build outside of VSC or directly from its terminal. It consistently complains it cannot find the imported file and that it can't locate the runtime. It only works when I launch VSCode using Is there a way of outputting what the LSP extension sees as Alire's environment variables? Usually when you get this error it means it's not seeing Alire's environment's toolchain variables. I suspect it may be confused by my Path. |
@Joebeazelman I suggest you to create
Then ALS starts to write log files in that directory. You should see environment variables in the corresponding log file. |
I examined the dump file and the gprpath is blank. I also didn't see any Alire configured paths. So how is LSP retrieving the paths? Apparently, it's obtaining enough configuration to perform a compile. For what it's worth, this is occurring on a fresh MacOS install. I will investigate some more. |
Below please see the included dump file. As you can see, GPR PATH is blank also there's an exception with a message it can't find the toolchain for the project. Interestingly, LSP is using a toolchain to perform the compilation, although it's unclear which one it's using. This may be related to another issue I opened where it ALS reports more errors than the compiler does. With the recent new issue opened, I suspect the issue is either unique to MacOS or you may already have a toolchain configured outside of ALR, but it's only a guess. There's a On_SetTrace_Notification: OFF, would it be helpful to you if I turn this setting on? If so, how do I do it?
|
Do you have Which is
|
/usr/local/bin |
I have the same problem or a similar one. When opening the repository with "code .", I get this error: "can't find a toolchain for the following configuration: language 'Ada', target 'x86_64-linux', default runtime", and navigation to predefined library is not working. The build task works fine invoking My trace file:
|
|
Also affected without Alire. The same error message following the tutorial just before point Explore Intellisense, and then Intellisense for Nevertheless, pressing the Run button in the main, the program is built and run without problem.
I see in the output two possible causes:
|
alr can't use grpbuild from the Ubuntu. Could you execute the following command to setup gnat & gprbuild from alr itself:
|
As I said in my previous comment, the problem is reproducible without Alire. See this screenshot, just after creating the Nevertheless, I tried selecting the toolchain as indicated, but it didn't change the problem in Alire crates opened in vscode. In fact, Alire by itself didn't have any problem when called from the command line and even when called by the vscode extension to build the crate, so my impression this problem is not really related to Alire, but just a problem between the vscode extension and the |
ALS can't find Ubuntu/Debian GNAT if its version doesn't match GCC. (in your case gcc 11.2 and gnat 12.3). That is because Ubuntu/Debian maintainers rename |
Thanks, @reznikmm. After aligning versions of Ubuntu's packages for |
I get a strange error message when I try to compile my file. If I build using the build command in Visual Studio, I get the following error:
can't find a toolchain for the following configuration
I also get an error message in the problems tab area:
imported project file "pico_bsp.gpr" not found
However, it compiles successfully when I build from VS Code's terminal using alr build. If I go back and execute the build command again, I get:
The text was updated successfully, but these errors were encountered: