Skip to content
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 linking issues for ODE on macOS #549

Merged
merged 11 commits into from
Jul 30, 2021
Merged

Fix linking issues for ODE on macOS #549

merged 11 commits into from
Jul 30, 2021

Conversation

nkalupahana
Copy link
Contributor

@nkalupahana nkalupahana commented Jul 9, 2021

Description

This fixes the Bullet linking issues on macOS introduced by #489 (https://github.com/nkalupahana/ros2-foxy-macos/runs/3014655671?check_suite_focus=true). It also fixes an ODE linking issue that I've been using a temp fix for -- OMPL uses ODE, and this needs to be linked in (https://github.com/nkalupahana/ros2-foxy-macos/runs/3022396910?check_suite_focus=true).

(Bullet issue fixed by #530 so now this is just ODE)

Proof of build: https://github.com/nkalupahana/ros2-foxy-macos/runs/3198722057?check_suite_focus=true

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation reference
  • Document API changes relevant to the user in the MIGRATION.md notes
  • Create tests, which fail without this PR reference
  • Include a screenshot if changing a GUI
  • While waiting for someone to review your request, please help review another open pull request to support the maintainers

@codecov
Copy link

codecov bot commented Jul 9, 2021

Codecov Report

Merging #549 (dae2470) into main (d903614) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #549   +/-   ##
=======================================
  Coverage   46.79%   46.79%           
=======================================
  Files         185      185           
  Lines       19693    19693           
=======================================
  Hits         9214     9214           
  Misses      10479    10479           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d903614...dae2470. Read the comment docs.

@@ -13,6 +13,10 @@ set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_V
ament_target_dependencies(${MOVEIT_LIB_NAME} SYSTEM
BULLET
)
if(APPLE)
target_link_directories(${MOVEIT_LIB_NAME} PUBLIC ${BULLET_LIBRARY_DIRS})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ament_target_dependencies should already search for the correct library dirs. (see here). Or is it actually missing the PUBLIC keyword. I didn't check thoroughly, but Bullet doesn't seem to be part of the public API.

Copy link
Contributor Author

@nkalupahana nkalupahana Jul 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is an issue with the custom FindBULLET. Removing it fixed this issue. Let me know if that's okay -- it is quite old, and I think if the CI passes, it should be.

macOS CI: https://github.com/nkalupahana/ros2-foxy-macos/runs/3031358497?check_suite_focus=true

@@ -26,6 +26,11 @@ set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_V

find_package(OpenMP REQUIRED)

# Used to link in ODE, an OMPL dependency, on macOS
if(APPLE)
target_link_directories(${MOVEIT_LIB_NAME} PUBLIC ${OMPL_LIBRARY_DIRS})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. Is ODE not exported correctly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking back at this, I think the issue might be that in moveit_planners/ompl/CMakeLists.txt, ompl is lowercase, but the variable is OMPL_LIBRARY_DIRS -- the code you linked to specifically say that case matters. I'll try it out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this doesn't work -- I have a feeling ODE just isn't exported correctly, so this is required. Let me know if there's something specific you want to try.

@nkalupahana
Copy link
Contributor Author

@henningkayser Let me know if you want any more changes, or if this is good to go!

@nkalupahana
Copy link
Contributor Author

@henningkayser sorry to keep bothering you on this :) I'd like to get this merged in soon if there are no further issues!

@nkalupahana
Copy link
Contributor Author

@tylerjw I'd love to get this merged in if possible before foxy gets branched off as mentioned in #530 -- it's a pretty simple one-file change, and it's essential to get MoveIt2 compiling on macOS.

@nkalupahana nkalupahana changed the title Fix linking issues for Bullet and ODE on macOS Fix linking issues ODE on macOS Jul 30, 2021
@nkalupahana nkalupahana changed the title Fix linking issues ODE on macOS Fix linking issues for ODE on macOS Jul 30, 2021
@tylerjw
Copy link
Member

tylerjw commented Jul 30, 2021

@nkalupahana do you know why it isn't passing for foxy in CI?

@nkalupahana
Copy link
Contributor Author

@tylerjw It looks like CI is trying to use the ros2 branch instead of the foxy branch of geometric_shapes, which very recently got split off (moveit/geometric_shapes#200). I don't believe this has anything to do with this PR.

@tylerjw
Copy link
Member

tylerjw commented Jul 30, 2021

You are correct. I'm working on a fix for that. Does this PR fix your issue with building on OSX? I couldn't tell based on the conversation thread above if this worked for you.

@nkalupahana
Copy link
Contributor Author

@tylerjw yes, it does! https://github.com/nkalupahana/ros2-foxy-macos/runs/3200763303?check_suite_focus=true

@tylerjw
Copy link
Member

tylerjw commented Jul 30, 2021

Here is what I'm doing about foxy: #565

I hope to merge that soon and then we can update this based on that and I'm happy to merge this (as you say it fixes your issue and it doesn't seem to harm anything else).

@henningkayser
Copy link
Member

@nkalupahana sorry for letting this get stale. The change looks fine to me, I filed a related issue at ompl. lgtm after CI succeeds

@tylerjw tylerjw merged commit 8463854 into moveit:main Jul 30, 2021
christianlandgraf pushed a commit to christianlandgraf/moveit2 that referenced this pull request Aug 12, 2021
tylerjw pushed a commit to tylerjw/moveit2 that referenced this pull request Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants