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

stage_ros needs -ldl to be built but it's a order problem #18

Open
lepalom opened this issue May 11, 2015 · 1 comment
Open

stage_ros needs -ldl to be built but it's a order problem #18

lepalom opened this issue May 11, 2015 · 1 comment

Comments

@lepalom
Copy link

lepalom commented May 11, 2015

Hi,

building stage_ros in a Debian Wheezy/Jessie/Unstable we have found that it fails because the -ldl of a link to libdl is missed. After dig a bit on the net and test it, I found that it's a problem with the order of the link procedure.

So, in stage_ros/CMakeLists.txt instead of add set(${PROJECT_NAME}_extra_libs dl) just change the order of:

target_link_libraries(stageros
  ${catkin_LIBRARIES}
  ${Boost_LIBRARIES}
  ${FLTK_LIBRARIES}
  ${Stage_LIBRARIES}
  ${${PROJECT_NAME}_extra_libs}
)

by:

target_link_libraries(stageros 
  ${catkin_LIBRARIES} 
  ${Boost_LIBRARIES}
  ${Stage_LIBRARIES} 
  ${FLTK_LIBRARIES}
)

and it compiles without problem.

@wjwwood
Copy link
Member

wjwwood commented May 13, 2015

Thanks for the report. Other systems like OS X have a similar issue, but I think the right thing to do is to conditionally not add dl as is done for OS X here:

https://github.com/ros-simulation/stage_ros/blob/master/CMakeLists.txt#L45-L47

The additional dl flag there not only compiles for Ubuntu, but it is required if I remember correctly.

Please consider opening a pull request with your proposed changes.

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

No branches or pull requests

2 participants