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

Disable multi-arch for catkin #97

Closed
matlabbe opened this issue Jul 12, 2016 · 3 comments
Closed

Disable multi-arch for catkin #97

matlabbe opened this issue Jul 12, 2016 · 3 comments

Comments

@matlabbe
Copy link
Member

matlabbe commented Jul 12, 2016

There is still installation issues with multi-arch on fresh Kinetic system: http://official-rtab-map-forum.206.s1.nabble.com/Problem-while-running-RTAB-Map-installed-from-ROS-tp1530.html

A way to fix it would be to disable INCLUDE(GNUInstallDirs) or uncomment

# Catkin doesn't support multiarch library path, 
# fix to "lib" if not set by user.
#IF(NOT DEFINED CMAKE_INSTALL_LIBDIR)
#   set(CMAKE_INSTALL_LIBDIR "lib")
#ENDIF(NOT DEFINED CMAKE_INSTALL_LIBDIR)

To detect catkin, this could be done like in find-object:

# Detect if it is called by catkin
IF(CATKIN_TOPLEVEL OR CATKIN_BUILD_BINARY_PACKAGE OR CATKIN_SKIP_TESTING OR CATKIN_ENABLE_TESTING)
  SET(CATKIN_BUILD TRUE)
ENDIF(CATKIN_TOPLEVEL OR CATKIN_BUILD_BINARY_PACKAGE OR CATKIN_SKIP_TESTING OR CATKIN_ENABLE_TESTING)
@matlabbe
Copy link
Member Author

Seems not working: http://build.ros.org/job/Kbin_uW64__rtabmap__ubuntu_wily_amd64__binary/14/console

14:56:00 -- Info :
14:56:00 --   Version : 0.11.8
14:56:00 --   CMAKE_INSTALL_PREFIX = /opt/ros/kinetic
14:56:00 --   CMAKE_BUILD_TYPE =     None
14:56:00 --   CMAKE_INSTALL_LIBDIR = lib/x86_64-linux-gnu
14:56:00 --   BUILD_APP =            ON
14:56:00 --   BUILD_TOOLS =          ON
...

@matlabbe matlabbe reopened this Jul 21, 2016
@willdzeng
Copy link
Contributor

willdzeng commented Jul 21, 2016

I fixed this by deleting all the files in lib/x84_64-linux-gnu.
Also this can be fixed by doing a make uninstall in the old build folder.
And sudo ldconfig
Maybe do a auto uninstall before install library?

@matlabbe
Copy link
Member Author

I did a fast test on a Virtual machine with 16.04/kinetic.

When doing cmake when building from source, CMAKE_INSTALL_LIBDIR = lib. Not sure why on the ros buildfarm it is with x86_64-linux-gnu.

I also tested kinetic ros binaries. The rtabmap_ros launch files can be started without problem (even if the libraries are installed in /opt/ros/kinetic/lib/x86_64-linux-gnu).

I'll set this bug as fixed as the not found library error is not reproductible.

More info:

$ env | grep kinetic
ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_PACKAGE_PATH=/opt/ros/kinetic/share:/opt/ros/kinetic/stacks
LD_LIBRARY_PATH=/opt/ros/kinetic/lib:/opt/ros/kinetic/lib/x86_64-linux-gnu
PATH=/opt/ros/kinetic/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
ROS_DISTRO=kinetic
PYTHONPATH=/opt/ros/kinetic/lib/python2.7/dist-packages
PKG_CONFIG_PATH=/opt/ros/kinetic/lib/pkgconfig
CMAKE_PREFIX_PATH=/opt/ros/kinetic
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros

/opt/ros/kinetic/lib/x86_64-linux-gnu is already added from sourcing /opt/ros/kinetic/setup.bash.

From included /opt/ros/kinetic/_setup_util.py:

# subfolder of workspace prepended to CMAKE_PREFIX_PATH
ENV_VAR_SUBFOLDERS = {
    'CMAKE_PREFIX_PATH': '',
    'LD_LIBRARY_PATH' if not IS_DARWIN else 'DYLD_LIBRARY_PATH': ['lib', os.path.join('lib', 'x86_64-linux-gnu')],
    'PATH': 'bin',
    'PKG_CONFIG_PATH': [os.path.join('lib', 'pkgconfig'), os.path.join('lib', 'x86_64-linux-gnu', 'pkgconfig')],
    'PYTHONPATH': 'lib/python2.7/dist-packages',
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants