简体   繁体   中英

CMake File API "no reply dir found"

I have trouble using toolchains in Docker from CLION. My Docker container is based on ubuntu 18.04 and CMake 3.17 is installed. The image definition is based on this reference implementation.

When I reload the CMake project with CLion, the following error is shown.

-- Build files have been written to: /tmp/tmp.vmmD6opEtD/cmake-build-debug-local-docker
CMake File API: /path/to/glow/cmake-build-debug-local-docker: no reply dir found

When I configure the CMake project in the Docker container directly, it succeeded. I believe there is nothing wrong with the CMake project itself.

What does "no reply dir found" mean? There is no clue for this error message even with googling.

I met exactly the same error and here is how I did the troubleshooting and basically solved the error.

Because I'm using CMake's Ninja generator, my first few search queries include "clion ninja remote development." As luck would have it, the first search result was a blog post by CLion developers that boasted adding Ninja support with CMake File API . I got curious about that API because it also appeared in the error message and checked its documentation.

Its documentation states that "API v1 is housed in the <build>/.cmake/api/v1/ directory" and has a subdirectory named " reply ." Now, if you look inside that /tmp/tmp.vmmD6opEtD/cmake-build-debug-local-docker directory in your own container, you will definitely find the reply directory under .cmake/api/v1/reply , which contains a bunch of JSON files. These files seem to provide information about the generated build system and are used by CLion.

Now the problem is clear: Why did CLion look for the reply directory on the local machine (the one running CLion) rather than in the container? Apparently CLion tried to download the reply dir behind the scene and failed. To see the actual error message, you need to run CLion from the command line. If you install CLion using the Toolbox, the script that launches CLion should be something like ~/.local/share/JetBrains/Toolbox/apps/CLion/ch-0/203.7148.70/bin/clion.sh . Just launch CLion from the command line, reload the CMake project and sees what error message you will get.

For me, there wasn't a reply dir at the local machine because rsync failed to download the build directory from a container in the remote machine over SSH. When I tried again, using the same setup but a simple hello world project generated by CLion, the error message instead became "Cannot read CMake dependency information" that led me to this ticket . The cause is easy to guess now. My container was behind 2 SSH jump boxes and this setup somehow made CLion mess up with the known_hosts file. With a messed-up known_hosts , CLion was unable to download the reply dir with rsync . I simplified my setup by moving the remote container to my local machine and now remote development with CLion works happily.

If you are looking for a quick fix (or just something to try), I suggest following the workaround mentioned in the ticket.

I had the exact same error, in my case setting up SSH to avoid asking for passphrase, that is on a terminal run ssh-add then try to reload the CMake project

Just had the same problem. Your build dir in clion cmake project settings is other than the one appear in the cmake options specified there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM