Remote build and deployment excluded path resets. Cannot read CMakeCache.txt
I am using the remote build and deployment tools to develop for a local arm64 machine. When I attempt to build for this platform, the file download excludes the CMakeCache.txt. This then means the project doesn't build
File Transfer:
[7/12/18 7:48 AM] Download from remote (d52e82af-beef-4dd9-9c31-6cf6750e1d43)
[7/12/18 7:48 AM] Excluded path '/home/ben/CLionProjects/project/cmake-build-debug-remote/CMakeCache.txt'
[7/12/18 7:48 AM] 1 item excluded
CMake:
-- Build files have been written to: /home/remote/CLionProjects/cmake-build-debug-remote
Cannot read /home/ben/CLionProjects/project/cmake-build-debug-remote/CMakeCache.txt
[Failed to reload]
When I attempt to remove /home/ben/CLionProjects/project/cmake-build-debug-remote/ from the Excluded paths as soon as I run 'rebuild the project' I find it is re-added.
Can someone please explain how I can remedy this to enable building?
请先登录再写评论。
Hi Ben! Do you have installed rsync on the remote host?
I am having the same issue. Rsync is installed on the remote. Every time I reload the project, CLion complains "Cannot read /path/to/project/CMakeCache.txt [Failed to reload]".
[Update]
I was compiling with a toolchain in a Docker container, which communicates with CLion using sshd. The aforementioned problem arose when the container was running as root. After creating and logging as a non-root user, the problem disappeared.
@Chenzhekl, thanks for describing the solution! Are you on Windows? Maybe the issue you've faced is related to https://youtrack.jetbrains.com/issue/CPP-14881.
I am having the same issue. Loging as a non-root user can not help, any other solution?
@Luoyibu, what OS is in your local client machine? What OS is in your remote host? Is your remote host a Docker container? Is rsync installed on the remote host?
@Anna Falevskaya, I have the same problem and my remote is a docker container. Is there a known good solution to this?
I really like remote development when it works, but it seems to be so fragile. Any minor hiccup between my host and remote gets in to a really horrible state that I can't get out of.
Have you tried logging as a non-root user as described here by @Chenzhekl?
@Anna, yes I have tried that in the past and just again for kicks. That does not solve any problem. Additionally, when I look in the "Deployment" at the deploy server that adding the new toolchain created I see that the cmake folder that the CMake profile is creating is in the "Excluded Paths".
@Nate, are you on Windows? If yes, please reproduce the problem and provide the log file (Help -> Show Log ...) in the comments to https://youtrack.jetbrains.com/issue/CPP-14881. Note that logs might contain private user's information (like file paths and names). You can attach it privately (with visibility to CLion team), the instruction is here.
>the cmake folder that the CMake profile is creating is in the "Excluded Paths"
That's intended.
@Anna It seems that this is also not working on ubuntu 14.04 while it is working perfectly fine on ubuntu 18.04. Is there some requirement about the version of sshd or rsync?
ubuntu 14.04 is remote host (docker) in this scenario
I am experiencing the same issue. The local machine is MacOS Mojave, the remote - Raspbian.
```
usr/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /tmp/tmp.Ctq2GptMdG
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/tmp.Ctq2GptMdG/cmake-build-debug-remote
Cannot read /Users/username/project/cmake-build-debug-remote/CMakeCache.txt
[Failed to reload]
```
@Pawel Weber, @U Abdullaev,
since your local OS isn't Windows, CPP-14168 looks like a more relevant ticket. Please check comments and workaround section:
rsync
is installed on local and remote host.ssh/known_hosts
In my case the problem was with the known_hosts. I had to remove the localhost and try again. I find this out using the beta version of new Clion which creates report with the stack trace from java. Maybe it is good idea to show that the problem is that host localhost has changed and has different signature in known_hosts file.
Best
Hi, I'm use mac os 10.14.5, plan to deploy to remote host, follow upside comments to do
1. install rsync and remote host
2. remove .ssh/known_hosts on my mac
3. configure toolchains, Cmake and deployment settings. after all above get done, then upload file to remote server.
build project success on remote host, and get CMakeCache.txt there.
but still get error "Cannot read /Users/xxx/project/cmake-build-debug/CMakeCache.txt"
deployment, mapping like below:
excluded_path:
get error:
can anybody help me on this error how to let it work on mac. thanks.
Hi @Lidzhu! Please send the idea.log file (Help | Show Log in ...) to clion-support at jetbrains.com. Note that logs might contain private user's information (like file paths and names).
@Pawel Weber's recommendation fixed it for me.
I used:
ssh-keygen -f "/home/remote/.ssh/known_hosts" -R "MY.IP.AD.DR"
to fix it.
@... solution worked out for me!!
I was missing rsync on my docker container, I installed it and everything started to work perfectly.
Just for reference I'll show my Dockerfile:
So when I create the Container I use the following command:
Wait for it to install everything... then run the container with:
Notice that I "redirect" port 22 from the container to port 222. Then when configuring the CLion remote host:
I hope this helps!