question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Linux: Add support for snaps of CMake

See original GitHub issue

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:

[rollbar] Unhandled exception: Unhandled Promise rejection: configure TypeError: Cannot read property ‘on’ of undefined {} [rollbar] Unhandled exception: Error during CMake upgrade TypeError: Cannot read property ‘on’ of undefined {“version”:“3.13.2”,“linuxURL”:“https://github.com/Kitware/CMake/releases/download/v3.13.2/cmake-3.13.2-Linux-x86_64.sh",“windowsURL”:"https://github.com/Kitware/CMake/releases/download/v3.13.2/cmake-3.13.2-win64-x64.msi”}

Actually /snap/bin/cmake is not an executable but a link if I recall correctly.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:17
  • Comments:20 (11 by maintainers)

github_iconTop GitHub Comments

66reactions
hheldcommented, Nov 1, 2019

It works when you use /snap/cmake/current/bin/cmake as CMake Path. All snap executables seem to be just symbolic links to /usr/bin/snap, and that seems to work fine when called from a terminal but apparently not from the CMake extension in VSCode …

16reactions
Zingamcommented, Nov 1, 2019

There are two entries related to CMake Path. Which one is the correct one:

Cmake: Cmake Path Name/path of the CMake executable to use cmake Cmake: Ctest Path Path to CTest executable. If null, will be inference from cmake.cmakePath (recommended to leave null) Cmake: Cmake Path The path to CMake generator executable

@hheld Setting /snap/cmake/current/bin/cmake did the job!

Screenshot from 2019-11-01 13-12-05 Thank you!

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install CMake on Linux | Snap Store
Install CMake on your Linux distribution. Choose your Linux distribution to get detailed installation instructions. If yours is not shown, get ...
Read more >
Create your first snap
Snapcraft is a powerful and easy to use command line tool for building snaps. It reads a simple, declarative file and runs the...
Read more >
CMake Now Available As A Snap
The CMake snap is a convenient way to stay up to date with recent CMake releases, especially where the packages provided by your...
Read more >
(No title)
CMake Error at /snap/flutter/126/usr/share/cmake-3.10/Modules/FindPkgConfig.cmake:419 Flutter Linux · Ask Question. Asked 2 months ago. Modified 29 days ago.
Read more >
How to Install CMake on Ubuntu 22.04
The most convenient method is by running the command “sudo snap install cmake --classic” on Ubuntu 22.04. However, other methods are also explained....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found