-
Notifications
You must be signed in to change notification settings - Fork 42
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
Cross-compilation issue #112
Comments
I looked a bit more into how r2r handles message generation and found that it differs from the In the end I solved my cross-compilation issue by compiling the interface libraries for both the build host and target architectures. |
Hi, Sorry I didn't manage to answer until now. Yes I guess this is a downside of using the introspection function for generating the wrappers, that you need to have them build also on the host. It would be elegant if this was not necessary but I am not sure if its technically possible the way it is set up now. |
No worries. I wonder if it would be possible to use bindgen to generate wrappers for the interface libraries generated by rosidl. I won’t look at this short term since we have a working solution by compiling the libs for the host before cross compiling the nodes. But I wanted to ask if you see any downsides or obstacles to changing r2r to use this approach. Thanks again for this lovely crate! |
Do you mean by relying on what bindgen spits out to guess the types etc? Maybe possible, we do something like that for constants defined in the messages. But it has some limitations, see #47. I suspect one would have to parse the idl files in the end to get the information we need (which we can do of course, and would improve some things like the constants -- but I have no intention of doing it at the moment). |
Hi, thank you for making
r2r
, it's a joy to use.I'm trying to cross-compile a ROS2 workspace including r2r nodes.
Cross-compiling ROS2 at all is already complicated (we just got the ros/meta-ros OE layer cross-compilation SDK to work) - let's add Rust to the mix...
I have some interface packages (action/msg) that I'd like to use in my r2r nodes. I've already cross-compiled them and sourced the install env.
I get the following (abbreviated) error:
What seems to be happening is that Rust is compiling r2r/build.rs for the dev machine's architecture (understandable), but then it tries to link all of the interface library dependencies to the build script binary.
This is a problem, because the libraries it's trying to link to are only available as arm64 libraries.
I'm not sure why the build script should be linked with those dependency libraries. Maybe you have an idea?
The text was updated successfully, but these errors were encountered: