Clion cannot detect the wsl directory

Answered

Im trying to build docker in full remote mode through ssh using wsl as backend. My source and build directories are located within wsl and when I try to build it, it throws the following error 

Cannot resolve path '\\wsl$\Ubuntu-20.04\home\hari\lgpr\Release-Docker'

 

 

 

Any thoughts or ideas are highly appreciated

5 comments
Comment actions Permalink

Hello!

Could you please clarify the scenario a bit? As far as I understand, there is a local Windows machine with CLion and WSL. How is Docker involved?

0
Comment actions Permalink

Yes, there is windows host on which clion is installed. The code is hosted within wsl which is then opened within clion. The docker container is built using the code that lives in the wsl. So the container is within the wsl

0
Comment actions Permalink

Ok, as far as I understand, you need to build the code inside WSL. In this case you can use the WSL toolchain - https://www.jetbrains.com/help/clion/how-to-use-wsl-development-environment-in-product.html, instead of the "Remote Host" toolchain.

0
Comment actions Permalink

But wsl doesn't have the necessary build env to build it. It only hosts the source code. That is why I need to build it within the docker container. As I understand there are two ways to do this, one is using docker toolchain but that will not let you ssh into the container while any application is running or let you run python/bash scripts.
The other option is to use it in full remote mode as indicated here which isn't working for me
https://www.jetbrains.com/help/clion/remote-projects-support.html#ipv6

0
Comment actions Permalink

So you have three "machines":

  1. The local Windows machine with CLion;
  2. The WSL instance with the source code;
  3. The Docker container running in WSL, inside this container the project should be built.

CLion doesn't support such configuration. In the Full Remote Mode scenario (the "Remote Host" toolchain), the project originally should be located on the local machine, the Windows one in your case. Opening the project in CLion using the WSL-style path ("\\wsl$\Ubuntu-20.04\home\hari\lgpr") won't work, sorry.

0

Please sign in to leave a comment.