Why no /opt/ros/kinetic/lib/*.so soname version?
Here's what I can see (abbreviated) on a typical Ubuntu Xenial installation of Kinetic:
$ find /opt/ros/kinetic/lib -maxdepth 1 -type f -name '*.so' -exec objdump -p {} \; | grep SONAME | head
SONAME libresource_retriever.so
SONAME libpcl_ros_filters.so
SONAME libinteractive_markers.so
SONAME libtf.so
SONAME librosbag.so
SONAME librosconsole_bridge.so
SONAME libnodeletlib.so
SONAME libpcl_ros_features.so
SONAME liburdf.so
SONAME libsimple_message_dummy.so
Here's a view of the "host multiarch" directory on the same installation:
$ find /opt/ros/kinetic/lib/x86_64-linux-gnu/ -maxdepth 1 -type f -name '*.so.*' -exec objdump -p {} \; | grep SONAME | head
SONAME libopencv_video3.so.3.3
SONAME libopencv_rgbd3.so.3.3
SONAME libopencv_stitching3.so.3.3
SONAME libopencv_xfeatures2d3.so.3.3
SONAME libopencv_viz3.so.3.3
SONAME libopencv_imgproc3.so.3.3
SONAME libopencv_xphoto3.so.3.3
SONAME libopencv_features2d3.so.3.3
SONAME libopencv_ximgproc3.so.3.3
SONAME libopencv_bgsegm3.so.3.3
Why do the former lack soname versions? Why do only the latter have soname versions? Why does setup.sh
export LD_LIBRARY_PATH
such that the former path precedes the latter (causing the linker to find the _unversioned_ shared objects in lieu of the versioned ones)?
Follow up question: Is there anything obviously wrong with doing something like the following?
find "/opt/ros/${ros_distro}/lib" -maxdepth 1 -type f -name '*.so' -exec dpkg -S {} + \
| tr -s ': ' '\t' \
| while read package sofile; do
version="$(dpkg -s "${package}" | awk '/^Version: /{print $NF}')"
output="/etc/dpkg/symbols/${package}.symbols"
mkdir -vp "$(dirname "${output}")"
dpkg-gensymbols -e"${sofile}" -p"${package}" -v"${version}" -O"${output}"
done
I.e., Is generating symbols files for every unversioned shared object a reasonable solution to this problem?