Vscode-cmake-tools: Failed to activate protocol version: "CMAKE_HOME_DIRECTORY" is set but incompatible...

Created on 5 Aug 2018  路  8Comments  路  Source: microsoft/vscode-cmake-tools

Brief Issue Summary

[rollbar] Unhandled exception: Unhandled Promise rejection: configure [cmake-server] Failed to activate protocol version: "CMAKE_HOME_DIRECTORY" is set but incompatible with configured source directory value. {}

The CMake Project outline panel is empty.

Expected:

No error.
The CMake Project outline panel is filled.

Apparent Behavior:

git clone https://github.com/facebook/rocksdb.git
code rocksdb

CMake Tools will then attempt to "configure" the project and fail with the aforementioned error in the "debug console".

Platform and Versions

  • Operating System: Ubuntu 18.04 64bit
  • CMake Version: 3.10.2
  • VSCode Version: 1.25.1
  • CMake Tools Extension Version: 1.1.1
  • Compiler/Toolchain: gcc 7.3.0
bug

Most helpful comment

Removing the build directory and doing the Clean reconfigure works.

All 8 comments

I had this same issue, I believe it is due to changing the project directory name/path. Try deleting the build directory and rerunning as loads of the stuff in that directory has absolute paths that are reused.

As you can see in the issue description, it happens also with a freshly cloned repository.

All my C++ projects created with the previous version of the plugin now have this issue. Is it possible for the plugin to recognize and fix whatever is wrong automatically?

Removing the build directory and doing the Clean reconfigure works.

It does work when the build directory is removed.
In my case, it was a permission issue: build is created - and build are done - from within a Docker container. So all the files are owned by root.

I've had this issue myself with Docker containers, as well as when you move the source/build directory. I know how it can be fixed, so I'll take a swing for 1.1.2.

I'll try to create my container with the proper uid/gid to see if it fixes it.

This will now display a useful error message and helpful action button when it occurs. Fix in 1.1.2

Was this page helpful?
0 / 5 - 0 ratings