Repository navigation
Fix macOS compatibility issues in realtime_tools package - #370
Conversation
Signed-off-by: Dhruv Patel <[email protected]>
Signed-off-by: Dhruv Patel <[email protected]>
| // On platforms like macOS, pthread_mutexattr_setrobust is not available, | ||
| // so skip this step |
There was a problem hiding this comment.
Should this be a std::cerr like others?
There was a problem hiding this comment.
As far as I know, macOS doesn’t define pthread_mutexattr_setrobust or related constants like PTHREAD_MUTEX_STALLED in its system headers, so this conditional block was added to skip robustness configuration on that platform.
Suggestions or better cross-platform handling approaches are definitely welcome!
There was a problem hiding this comment.
Ofcourse, I was referrinf to that in certain places you left std::cerr. May be here it doesn't make sense
realtime_tools/realtime_tools/include/realtime_tools/mutex.hpp
Lines 204 to 207 in 705c553
Co-authored-by: Sai Kishor Kothakota <[email protected]>
I guess the original patch from @Tobias-Fischer, but thanks a lot for taking the time of opening a PR with the fix! |
Co-authored-by: Christoph Fröhlich <[email protected]>
|
Thanks! Yes, pre-commit is available on macOS — I’ll install it and run the checks again to fix the current issues. |
| // On platforms like macOS, pthread_mutexattr_setrobust is not available, | ||
| // so skip this step |
There was a problem hiding this comment.
Ofcourse, I was referrinf to that in certain places you left std::cerr. May be here it doesn't make sense
realtime_tools/realtime_tools/include/realtime_tools/mutex.hpp
Lines 204 to 207 in 705c553
…rrections Co-authored-by: Sai Kishor Kothakota <[email protected]>
…rrections Co-authored-by: Sai Kishor Kothakota <[email protected]>
|
@idesign0 Please check the codebase again to see if any other cleanup is needed |
Co-authored-by: Sai Kishor Kothakota <[email protected]>
…eaders Co-authored-by: Sai Kishor Kothakota <[email protected]>
…eaders Co-authored-by: Sai Kishor Kothakota <[email protected]>
…eaders Co-authored-by: Sai Kishor Kothakota <[email protected]>
|
@saikishor @christophfroehlich Hi, I noticed that the ament_cppcheck hook is failing with a message about limiting branch analysis, but no actual errors were found. All other checks are passing. Would it be okay to proceed despite this, or should I investigate further? ament_cppcheck...........................................................Failed
[realtime_tools/src/realtime_helpers.cpp:0]: (information: normalCheckLevelMaxBranches) Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. |
Signed-off-by: Dhruv Patel <[email protected]>
Signed-off-by: Dhruv Patel <[email protected]>
Hii, I'm running Ubuntu 22.04.5 LTS (Jammy) inside Parallels on a macOS host — no Docker involved. I'm using ROS 2 Humble with backported changes of package. |
|
I don't think that this is a ROS package issue. can you try with an ubuntu noble docker inside your VM? |
Ok. I’ll run the test in a Noble container and follow up once I have results. |
|
@christophfroehlich @saikishor I’ve tested the build in a Docker container with ROS Rolling. The realtime_tools package compiles successfully, but one of the CTests—specifically the 8th one (the same), |
|
@saikishor @christophfroehlich All tests are passing now in ROS Rolling. :) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #370 +/- ##
=======================================
Coverage 87.21% 87.21%
=======================================
Files 17 17
Lines 1291 1291
Branches 104 104
=======================================
Hits 1126 1126
Misses 97 97
Partials 68 68
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
saikishor
left a comment
There was a problem hiding this comment.
I missed these 2 in my initial review. Rest looks good
Co-authored-by: Sai Kishor Kothakota <[email protected]>
Co-authored-by: Sai Kishor Kothakota <[email protected]>
--------- Signed-off-by: Dhruv Patel <[email protected]> Co-authored-by: Sai Kishor Kothakota <[email protected]> Co-authored-by: Christoph Fröhlich <[email protected]> Co-authored-by: Copilot <[email protected]> (cherry picked from commit d6b4113)
…s#370) --------- Signed-off-by: Dhruv Patel <[email protected]> Co-authored-by: Sai Kishor Kothakota <[email protected]> Co-authored-by: Christoph Fröhlich <[email protected]> Co-authored-by: Copilot <[email protected]>
|
@Mergifyio backport humble |
✅ Backports have been createdDetails
Cherry-pick of d6b4113 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
…) (#658) * Fix macOS compatibility issues in realtime_tools package (#370) --------- Signed-off-by: Dhruv Patel <[email protected]> Co-authored-by: Sai Kishor Kothakota <[email protected]> Co-authored-by: Christoph Fröhlich <[email protected]> Co-authored-by: Copilot <[email protected]> (cherry picked from commit d6b4113) # Conflicts: # CMakeLists.txt * Resolve CMakeLists.txt conflicts of the humble backport Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Dhruv Patel <[email protected]> Co-authored-by: Christoph Froehlich <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
in source and cmakefile:
in tests:
thanks a lot @traversaro for the original patch that this PR builds upon to fix macOS compatibility issues.