Is it possible to build on a remote host (e.g. docker container), but deploy to a separate remote host (e.g. raspberry pi)?
Is is possible to implement the following workflow in CLion 2019.2?
- source code (C++) is managed locally
- compilation is performed within a specially constructed docker container (contains a special toolchain for cross-compilation)
- resulting binaries are copied to a remote host of a foreign architecture (matching the cross-compiler target)
- execution of those binaries is initiated and monitored
- (extra) debugging of binaries is possible
I could see how one might be able to configure a Toolchain to connect to the Docker container as a Remote Host, and then configure another remote host as the Deployment target, but as far as I can tell, CLion combines both of those concepts so that the target for compilation is automatically used as the target for deployment. Am I missing a feature that allows me to separately specify the toolchain from the deployment/execution target?
Specifically, my use-case involves cross-compilation for a Raspberry Pi within a docker container, and then deployment of the resulting binaries to a Raspberry Pi, for execution.
Please sign in to leave a comment.
Alternatively, if Docker makes this impossible, is there a way to use a local toolchain & cross-compiled sysroot (extracted from the Docker container) for building, then deploy to an alternative remote host?
For the record, Anna from JetBrains replied:
For now there are 1) full remote mode (CLion and sources are on a local machine, building and running processes take place on a remote machine), and 2) remote Debug via GDB/gdbserver (an executable is running on a remote machine under gdbserver, you can connect to it with the GDB from CLion from a local machine). It seems you can build an executable using the full remote mode, then transfer it to a Raspberry Pi and debug it remotely via GDB/gdbserver (there might be difficulties with path mappings etc.), I think the transferring step should be performed manually. Or you can run CLion in Docker container (for example, here the user shares experience), build your project locally, then deploy it to Raspberry Pi and debug it remotely via GDB/gdbserver. In CLion 2019.3 EAPwe improved a workflow for this scenario by introducing a Remote GDB Server configuration - https://blog.jetbrains.com/clion/2019/09/clion-starts-2019-3-eap/#remote_debug .