-
Notifications
You must be signed in to change notification settings - Fork 460
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
Linux: Add support for snaps of CMake #838
Comments
A link should be ok. In your case the extension is running The "unhandled exception" error is unrelated to this and should be gone in 1.2.0 (unreleased). |
Ubuntu Terminal:
VSCode Terminal:
I removed the PC name |
This command also appears to execute properly: /snap/bin/cmake -E server --experimental |
@bobbrow Will version 1.2 be released soon? |
Yes. Should be early next week. We're doing some final testing. |
OK. Thanks! I'll wait to see how version 1.2 will behave as the currently released doesn't work for me neither on latest Ubuntu nor Windows with the latest MSVC, CMake, GCC, etc. All of which worked before. |
It works when you use |
@hheld Thank you for the advice. I'll try that. I tried setting this manually before but maybe I didn't set the proper path. |
There are two entries related to CMake Path. Which one is the correct one:
@hheld Setting I also have the twxs's extension (which I hope will be absorbed into CMake Tools) but I don't think that it is causing that duplication. |
@bobbrow Maybe this issue's title should be changed and filed as a bug: "CMake Tools" don't work with symbolic links on Linux? |
I don't think this issue has anything to do with symbolic links. I don't really know the mechanics of how snap apps work, but I guess something must transform a call to |
In regard to this: #685 (comment)
The story so far... The
cmake.cmakePath
I wonder how did the extension decide to use the path |
This fixed for me |
This also worked for me. Thank you much! |
@hheld |
This also works for me. Many thanks! But it would be nice if this issue can really be fixed (i.e. |
@TianyiShi2001 Yesterday I setup a new Linux development environment and it is still The Way. I had the intention to fix this but Microsoft stopped reviewing and merging new PRs for nearly a year and I also stopped using VSCode, so I lost the motivation. Now I am back to using it but I doubt that I'll have the time. Unfortunately even the simplest features require a lot of iterations and thus a lot of time. |
same problem |
The same on Ubuntu 20.04. $ which cmake
/snap/bin/cmake The
CMake works by that link:
but VS Code doesn't support it. Solution is to use |
Another solution:
|
It seems that @H-G-Hristov 's solution is more suitable for me.
First of all, my laptop has a dual-boot setup with both Windows and Kubuntu installed. Moreover, the vscode installations on both systems share a If I adopt solution 1, by setting On the other hand, if I adopt solution 2, by creating a new symbolic link Click to expand demo logs for solution 2hwhsu1231@vb-kubuntu:~$ /snap/cmake/current/bin/cmake --version
cmake version 3.28.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
hwhsu1231@vb-kubuntu:~$ sudo ln -s /snap/cmake/current/bin/cmake /usr/bin/cmake
[sudo] password for hwhsu1231:
hwhsu1231@vb-kubuntu:~$ which -a cmake
/usr/bin/cmake
/bin/cmake
/snap/bin/cmake
hwhsu1231@vb-kubuntu:~$ which cmake
/usr/bin/cmake
hwhsu1231@vb-kubuntu:~$ cmake --version
cmake version 3.28.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
hwhsu1231@vb-kubuntu:~$ echo $PATH
/home/hwhsu1231/gems/bin:/home/hwhsu1231/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/hwhsu1231/.local/share/JetBrains/Toolbox/scripts |
Fix for me |
wsl and windows use different settings.jsonI use wsl and i can apply diff settings.json in wsl and windows |
The original post is from 2019 and the issue is still here! |
I have just installed Ubuntu 19.10 and used the Software installer application to install Visual Studio Code and CMake 3.15. I cloned my repository from GitHub and whenever I try to call CMake configure in Visual Studio code I get an error message: Bad CMake executable
/snap/bin/cmake
. CMake seems to run fine in a terminal.VS Code/CMake extension used to run just fine out-of-the-box in previous version of Ubuntu.
When I try to enter the path manually I get error messages like these:
Actually
/snap/bin/cmake
is not an executable but a link if I recall correctly.The text was updated successfully, but these errors were encountered: