-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker support for C++ target #2322
Conversation
4eca8e0
to
00e4151
Compare
core/src/main/java/org/lflang/generator/docker/CppDockerGenerator.java
Outdated
Show resolved
Hide resolved
@oowekyala are you interested in pulling together the same ability for Rust? |
core/src/main/java/org/lflang/generator/docker/CDockerGenerator.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a good start, but unfortunately, this does not work on my machine. I get:
WARN[0000] a network with name lf exists but was not created for project "helloworldcontainerized".
Set `external: true` to use an existing network
[+] Running 1/0
✔ Container HelloWorldContainerized Created 0.0s
Attaching to HelloWorldContainerized
HelloWorldContainerized | Error loading shared library libreactor-cpp-default.so.1: No such file or directory (needed by ./bin/HelloWorldContainerized)
HelloWorldContainerized | Error loading shared library libexecinfo.so.1: No such file or directory (needed by ./bin/HelloWorldContainerized)
HelloWorldContainerized | Error loading shared library libstdc++.so.6: No such file or directory (needed by ./bin/HelloWorldContainerized)
HelloWorldContainerized | Error loading shared library libgcc_s.so.1: No such file or directory (needed by ./bin/HelloWorldContainerized)
HelloWorldContainerized | Error relocating ./bin/HelloWorldContainerized: _ZN7reactor14ReactorElementC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_4TypeEPNS_7ReactorE: symbol not found
HelloWorldContainerized | Error relocating ./bin/HelloWorldContainerized: _ZSt9use_facetISt5ctypeIcEERKT_RKSt6locale: symbol not found
HelloWorldContainerized | Error relocating ./bin/HelloWorldContainerized: __cxa_free_exception: symbol not found
HelloWorldContainerized | Error relocating ./bin/HelloWorldContainerized: __cxa_begin_catch: symbol not found
HelloWorldContainerized | Error relocating ./bin/HelloWorldContainerized: _ZNKSt9basic_iosIcSt11char_traitsIcEE4failEv: symbol not found
...
core/src/main/kotlin/org/lflang/generator/cpp/CppStandaloneCmakeGenerator.kt
Show resolved
Hide resolved
core/src/main/java/org/lflang/generator/docker/CppDockerGenerator.java
Outdated
Show resolved
Hide resolved
Observation: this will not work well with cross-compilation. It will not really make sense for the two base images to differ.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a quite significant overhaul. Most importantly, the docker generators are now inner classes of the platform-specific generators (CppStandalonGenerator
and CppRos2Generator
).
Docker generation for ROS2 works now, too. This is particularly useful as it allows building and running ROS nodes without a ROS installation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cmnrd, this looks very nice!!
No description provided.