ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

ROS Kinetic 64Bit with 32Bit library

asked 2018-02-23 07:17:07 -0500

Fresh gravatar image

updated 2018-03-01 01:11:40 -0500

Edit6: I found now the way to download the 32bit libraries and i tried it with the libroscpp. and it works but now he needs much more libraries. Is there a way to download all libraries with one package?!

I tried to download the libroscpp.so and it works fine with the followin commands:

  • apt-get download ros-kinetic-roscpp:i386
  • Extract the archieve and get the lib from the data.tar.

Then I used the lib for compiling a node an now he needs all the other libraries like librosconsole.so. So my question is if there is a easy way to download all 32bit libraries with one step?!


Hi I started some days ago with ROS. I'm using a 64bit Ubuntu system and the installation of ROS Kinetic works fine and I'm able to build an node and to start the node. Now I need to use a library which only exists in a 32Bit version. I use the linker flag -m32 to use the library but then I have the problem with the 64Bit ROS libraries. So I need the ROS libraries in a 32Bit version but i found currently no way to install them or to build them myself! I wrote in the forum that this problem was already discussed but i found no working answer. Has someone a solution for this problem? THANKS


Edit: Hi Thanks for the reply. I need a system with a 64bit version of Kinetic for the ROS nodes but one node is a 32 bit node thats the reason why I need the 32 libraries. I compiled it myself and it works perfect for 64 bit. I tried to compile the 32 bit version but it doesn't work. I used:

./src/catkin/bin/catkin_make_isolated --cmake-args -CMAKE_CXX_FLAGS="-m32" --install

How does it work correctly?!


Edit 2: Hi I have a already running ROS system ob a normal Ubuntu and everthing runs with 64 bit. Now I have to integrate another ROS node that uses a 32 bit library. I understand that the node must be a 32 bit node otherwise I can not use the 32bit library. But the node must run in the 64bit environment. So I need the ROS librarys in 32bit to link them against the 32bit node. I downloaded the source code but when I try the commanline:

./src/catkin/bin/catkin_make_isolated --cmake-args -CMAKE_CXX_FLAGS="-m32" --install

I got the error message

CMake Error: Error processing file: MAKE_C_FLAGS=-m32

So I am currently only able to compile the 64bit version!


Edit 3: Hi I know that there are 32Bit Libs for the kinetic version but I need the 64bit Version on my system and at the same time the 32bit version. Is this possible?! I tried to install the 32 bit version but it didn't work.

enter@ubuntu:~/Downloads/ros_catkin_ws$ sudo apt-get install ros-kinetic-desktop-full:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-02-23 08:00:19 -0500

gvdhoorn gravatar image

updated 2018-02-28 08:35:12 -0500

Edit7:

I found now the way to download the 32bit libraries and i tried it with the libroscpp. and it works but now he needs much more libraries. Is there a way to download all libraries with one package?!

I believe this would be best asked in a new question, as otherwise we start to meander into new topics in this one.

But any answer to your edit would depend on what you are currently doing to "download the 32bit libraries".


Edit6:

Hi My goal is that I am able to build the node and provide the used 32bit librarys for the node. Then I would install the librarys and the node on the target with the 64bit system to communicate with the master there. Is that not possible? I want to avoid to use a docker or something else.

To my knowledge -- and based on the information that you've provided -- this is not possible without some form of isolation between your 64bit and 32bit runtime environments. A chroot or similar system (like Docker, LXC, etc) could provide that.

Building ROS Kinetic from source for 32bit could work, but only if all the dependencies for that are available in 32bit and support multiarch. I don't know whether that is the case.

Note that this is not a ROS specific problem at all, it would be a problem with any framework trying to mix 64 and 32 bit objects.

I'm assuming the library that you have to use was given to you (by an mfg fi) and you have to work with it. Otherwise, I'd suggest trying to obtain a 64bit version of it, as that will make everything significantly easier.


Edit5:

I know that there are 32Bit Libs for the kinetic version but I need the 64bit Version on my system and at the same time the 32bit version. Is this possible?!

No, unfortunately you cannot install both the i386 and the amd64 packages, as it appears the ROS pkgs don't seem to support multiarch.

Building from source would be an option, but it will require that all your dependencies do support multiarch. Without that, even adding -m32 will most likely not solve your problem.

If this is just a single node, you could perhaps look into using a suitable Docker image containing a 32bit OS and build it in there and run it from a container. Docker containers can communicate with the host quite easily via network, and ROS nodes don't really care where they are run, as long as they can communicate with the master (which would be running on the host) and other nodes.


Edit4:

 ./src/catkin/bin/catkin_make_isolated --cmake-args -CMAKE_CXX_FLAGS="-m32" --install

I got the error message

CMake Error: Error processing file: MAKE_C_FLAGS=-m32

I'm still not sure whether you actually need to build all of ROS from source (as there are still 32bit pkgs available), but to set that CMake variable you'll need to use the -D ... (more)

edit flag offensive delete link more

Comments

For a comment on (current) multi-arch support: #q283945.

gvdhoorn gravatar image gvdhoorn  ( 2019-05-20 01:52:03 -0500 )edit

Question Tools

Stats

Asked: 2018-02-23 07:17:07 -0500

Seen: 903 times

Last updated: Mar 01 '18