-
Notifications
You must be signed in to change notification settings - Fork 123
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
Fix rolling build #379
Fix rolling build #379
Conversation
I can't see the latest Jenkins problems |
Ok, I returned to this and I still don't get build problems when building in debug mode, but if I build in release mode, I get an error due to This might be a similar bug (as in GCC/Eigen related, rather than fuse-related) to the one mentioned at the top of @svwilliams since you added the workaround for that previous GCC bug in #366, does this seem like a similar case? I couldn't find a GCC or Eigen issue about it, but I also couldn't see any issues in the fuse codebase that could've caused this. I am just getting familiar with it, though, so it could be that I just missed something. For more info on my setup, my host computer is running Ubuntu 20.04 but I'm building fuse in the latest ros rolling docker image, that's based off Ubuntu 24.04 and has GCC 13.2.0 |
Let me see if I can reproduce the issue. |
Yes, I can reproduce at least a similar error in the
This makes me think of some sort of memory alignment/SSE/vectorization type of issue. Something wants to read data in 256-bit (32 byte) chunks, but I only have 8/16/24 bytes allocated. Unfortunately, this is not my realm of expertise. Eigen does have a few pages discussing memory alignment issues: One thing that seems to be true is fixed-sizes vectors and matrices are treated differently than dynamic-sized vectors and matrices. The code in question are largely unit tests where fixed-sized Eigen objects are created, and then provided to a constructor defined in terms of dynamic-sized Eigen objects. I suspect the fixed-sized and dynamic-sized objects have different alignment properties, and that causes an error to arise. One quick fix is to modify the unit tests to create dynamic-sized objects instead. E.g.
becomes
We then have the assignment of a variable-sized Eigen object to a variable-sized Eigen object, and so the memory alignment properties should match. I made a patch file with all of these changes, and I am able to compile fuse in Debug, Release, and RelWithDebInfo without any of these On a different front, it seems there are additional required virtual methods for I made the following local changes in order to get passed the compilation errors. I want to be clear, I am not proposing this as a solution; I merely added this to
I don't know enough about the Waitable interface to say how these methods should be implemented. If that's not something you are familiar with either, let me know and I'll start digging into the Waitable implmentations. |
@svwilliams thank you so much for the review! I am going over it now. I will also provide a review to #381, thank you for making that |
@svwilliams I have reverted the change that ignored the stringop-overread error now that you fixed that. Regarding those 3 functions, none of them are marked Great catch on why those errors were happening! It's interesting that it only happened when building in release, but I suppose it is due to some release-only optimization by Eigen. Are you getting build errors on this branch at the moment? When I build in debug mode (release won't work until #381 is merged), I can build from scratch without compile errors even those those three functions aren't overridden. If you are, then I'm not sure how I should reproduce those to try and fix them. |
For reference, I'm developing in the ros-rolling docker container, which is based on 24.04 and has gcc 13.2.0; may or may not be relevant depending on if you're getting build errors on the current branch. |
This is what I see on the
https://github.com/ros2/rclcpp/blob/rolling/rclcpp/include/rclcpp/waitable.hpp#L176-L179 I was getting compilation errors as a result. I had to add some sort of implementation for those three functions to get past the error. It looks like that change was merged in on Aug 2 (ros2/rclcpp#2593). I'm no docker expert. Most of the time I spent "fixing" the compile error was me trying to get a docker setup working so I could reproduce the issue. I finally used
🤷 Regardless, this PR at least gets fuse closer to compiling on CI, so I'll take it. If I need to implement a couple of additional functions after that, so be it. |
Ohhh, I see. I'm not building rclcpp from source, just using it from the docker image, so that's why I have a different function declaration, sorry about that. I should've looked more closely at the commit you linked. Those changes either aren't in the latest docker image or I just haven't pulled it since they've been added. Yes, not sure why they're now required to be overridden. Do you think this is a valid way to override them? Taken from the ROS system tests here void set_on_ready_callback(std::function<void(size_t, int)>) override {}
void clear_on_ready_callback() override {}
std::shared_ptr<void> take_data_by_entity_id(size_t) override {return nullptr;} I do notice they say it's fine to override them this way, though users typically override them. Perhaps adding the above is the best way to fix the build for now, and an issue can be opened to investigate how they should be overridden? |
I added those implementations, but I can remove it if you'd prefer them to not be included (I can also add a TODO comment referencing an issue, if that is desirable). |
Seems reasonable to me. |
No. It's some internal Locus Robotics configuration issue. I need to resolve that one. |
I did a manual merge, which seems to have confused github. Closing this PR. |
Some changes in
rclcpp::Waitable
(see here) cause theCallbackAdapter
to fail to build. This PR fixes that