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

Compatibility with conda builds #500

Open
wants to merge 1 commit into
base: noetic-devel
Choose a base branch
from

Conversation

Tobias-Fischer
Copy link

No description provided.

@tfoote
Copy link
Member

tfoote commented Mar 6, 2021

This looks reasonable. Can you provide any pointers why this is necessary for this specific package and docs or references why these specific arguments are the solution?

@Tobias-Fischer
Copy link
Author

Hi @tfoote,
Sorry - I opened this PR in a rush and should have given more explanation. The find_package(Threads) and linking to {CMAKE_THREAD_LIBS_INIT} pulls in pthread. The link to rt is also necessary. On my Ubuntu installation of ROS melodic, buffer_server links indeed to both pthread and rt, although it is currently not explicitly linked. I can only guess that it's being pulled in from another dependency somehow, but it is better to link explicitly:

ldd /opt/ros/melodic/lib/tf2_ros/buffer_server
	linux-vdso.so.1 (0x00007ffeef2ff000)
	libtf2_ros.so => /opt/ros/melodic/lib/libtf2_ros.so (0x00007fe9fa705000)
	libactionlib.so => /opt/ros/melodic/lib/libactionlib.so (0x00007fe9fa4e4000)
	libroscpp.so => /opt/ros/melodic/lib/libroscpp.so (0x00007fe9fa14f000)
	librosconsole.so => /opt/ros/melodic/lib/librosconsole.so (0x00007fe9f9f19000)
	libtf2.so => /opt/ros/melodic/lib/libtf2.so (0x00007fe9f9ce5000)
	libroscpp_serialization.so => /opt/ros/melodic/lib/libroscpp_serialization.so (0x00007fe9f9ae2000)
	librostime.so => /opt/ros/melodic/lib/librostime.so (0x00007fe9f98c2000)
	libboost_system.so.1.65.1 => /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 (0x00007fe9f96bd000)
	libboost_thread.so.1.65.1 => /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 (0x00007fe9f9498000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe9f9279000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fe9f8ef0000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fe9f8cd8000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe9f88e7000)
	libxmlrpcpp.so => /opt/ros/melodic/lib/libxmlrpcpp.so (0x00007fe9f86c8000)
	libcpp_common.so => /opt/ros/melodic/lib/libcpp_common.so (0x00007fe9f84bd000)
	libboost_chrono.so.1.65.1 => /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.65.1 (0x00007fe9f82b8000)
	libboost_filesystem.so.1.65.1 => /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 (0x00007fe9f809e000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe9f7d00000)
	librosconsole_log4cxx.so => /opt/ros/melodic/lib/librosconsole_log4cxx.so (0x00007fe9f7ae5000)
	librosconsole_backend_interface.so => /opt/ros/melodic/lib/librosconsole_backend_interface.so (0x00007fe9f78e3000)
	liblog4cxx.so.10 => /usr/lib/x86_64-linux-gnu/liblog4cxx.so.10 (0x00007fe9f751a000)
	libboost_regex.so.1.65.1 => /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 (0x00007fe9f7212000)
	libconsole_bridge.so.0.4 => /usr/lib/x86_64-linux-gnu/libconsole_bridge.so.0.4 (0x00007fe9f700d000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fe9f6e05000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fe9fabec000)
	libapr-1.so.0 => /usr/lib/x86_64-linux-gnu/libapr-1.so.0 (0x00007fe9f6bd0000)
	libaprutil-1.so.0 => /usr/lib/x86_64-linux-gnu/libaprutil-1.so.0 (0x00007fe9f69a5000)
	libicui18n.so.60 => /usr/lib/x86_64-linux-gnu/libicui18n.so.60 (0x00007fe9f6504000)
	libicuuc.so.60 => /usr/lib/x86_64-linux-gnu/libicuuc.so.60 (0x00007fe9f614c000)
	libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fe9f5f45000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe9f5d41000)
	libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007fe9f5b09000)
	libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fe9f58d7000)
	libicudata.so.60 => /usr/lib/x86_64-linux-gnu/libicudata.so.60 (0x00007fe9f3d2e000)

Therefore, the PR can be summarized by explicitly linking to the rt and pthread dependencies, rather than relying on other dependencies to pull in rt and pthread.

/cc @wolfv @traversaro who might give better explanations ;)

@ahcorde ahcorde added the noetic label Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants