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

Compiling ROS on raspberry pi 4 with Buster, problem with libboost1.58

asked 2019-07-02 09:18:33 -0500

kwint gravatar image

Hi,

I'm following this guide from the wiki: http://wiki.ros.org/ROSberryPi/Instal...

It says the following:

On Raspbian Buster the compilation may fail with "'boost/tr1/unordered_set.hpp' file not found". This is because rospack version used in Kinetic is dependent on boost 1.58. To fix this error try installing boost 1.58 manually.

I've installed libboost 1.58 manually with this guide, chapter 5.1: https://www.boost.org/doc/libs/1_58_0... But i'm still getting errors regarding libboost, what am I missing?

edit retag flag offensive close merge delete

Comments

Facing a similar problem on pi 3 with Buster. Near the end, in rosout build, I get some warnings like

libboost_regex.so.1.58.0, needed by /opt/ros/kinetic/lib/libroscpp.so, may conflict with libboost_regex.so.1.67.0

And then the following errors:

/usr/bin/ld: /opt/ros/kinetic/lib/librosconsole.so: undefined reference to `boost::re_detail::cpp_regex_traits_implementation<char>::transform[abi:cxx11](char const*, char const*) const'
/usr/bin/ld: /opt/ros/kinetic/lib/librosconsole.so: undefined reference to `boost::re_detail::cpp_regex_traits_implementation<char>::transform_primary[abi:cxx11](char const*, char const*) const'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/rosout.dir/build.make:103: /home/pi/ros_catkin_ws/devel_isolated/rosout/lib/rosout/rosout] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/rosout.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

If I install libboost1.58, the versions in the warning swap places.

jesusrubio gravatar image jesusrubio  ( 2019-07-04 12:36:11 -0500 )edit

I got the same errors. So I got this working in the end, but I'm not sure how. Here are the steps I toke, you might have some luck to: I installed and removed both versions of libboost via apt, I ended with having the newest version installed via apt, the older version manually (this took a bit less than an hour to install/compile). I then ran the command that is in the error message, it is something like cd ***/independent-build/rosout && some other command I ran that it got some permission error, so executed the second command with sudo. Reran the whole compilation and some other package had an error, did the same as with rosout. Then reran the whole compilation but still no luck. Finally I tried to run it with the -j2 argument, and then it somehow worked. I've spend almost a day ...(more)

kwint gravatar image kwint  ( 2019-07-04 14:01:53 -0500 )edit

same here I can get compile actionlib and rosbase installing libboost1.62, but this wil brake rviz because wont find libogre. -j2 I read that already in a couple of post with this related, try it. with buster you need install melodic no kinetic as they answered me here.

FPSychotic gravatar image FPSychotic  ( 2019-07-18 16:47:57 -0500 )edit

Did anyone ever figure this problem out? "To fix this error try installing boost 1.58 manually." It seems like no one actually attempted to apply this fix and see that it actually doesn't work and also there are no instructions on how to install boost 1.58 on Raspberry Pi. I went ahead and did a manual install using:

sudo apt-get install libboost1.58-dev
sudo apt-get install libboost1.58-tools-dev

I still end up getting the same boost/tr1/unordered_set.hpp error message!

Stigma gravatar image Stigma  ( 2019-08-02 20:20:47 -0500 )edit

@Stigma: I believe you're running into #q328303.

gvdhoorn gravatar image gvdhoorn  ( 2019-08-03 05:37:39 -0500 )edit

I am unable to add the ROS Kinetic repo...get the same error as : https://answers.ros.org/question/3294...

How did you manage to install Ros?

bobsaccamano gravatar image bobsaccamano  ( 2019-08-03 19:17:50 -0500 )edit

This is not an answer. If you have a question, please post it as a question.

ahendrix gravatar image ahendrix  ( 2019-08-03 20:20:08 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
4

answered 2019-08-27 05:54:57 -0500

chubbyk gravatar image

updated 2019-08-27 21:29:37 -0500

I have a pi4b with buster, when I tried to install ros kinetic ,I just encountered the same problem, the reason seems to be that the C compiler (gcc-8) version is too high, and does not match boost1.58, I switched to gcc-5 and fortunately it worked, I've recorded my steps as follows:

1, uninstall libboost1.67-dev, and execute 'sudo apt autoremove' to clean up

2, install libboost1.58-dev and libboost1.58-all-dev

3, delete build_isolated and devel_isolated folders in the ~/ros_catkin_ws directory, you may need sudo to do this ( important!!! otherwise the compilation will still fail even if you've switched to gcc-5)

4, apt install gcc-5 and g++-5 and switch the default compiler to them(please Google how to switch)

5, gcc -v g++ -v to confirm that the version is 5.5.0, then the recompilation should be successful.

6, if you wish, switch back to gcc-8.

Good luck, and please tell me if it work on your pi4 ~

edit flag offensive delete link more

Comments

This worked for me very well! Thanks for your help!

stoianovici gravatar image stoianovici  ( 2019-09-10 17:57:44 -0500 )edit

Me too! You're a genius!

Old_Forester gravatar image Old_Forester  ( 2019-09-11 19:11:30 -0500 )edit
3

For completeness, the following does exactly what @chubbyk suggested, including the switch to gcc-5 as default:

$ sudo apt remove libboost1.67-dev
$ sudo apt autoremove
$ sudo apt install libboost1.58-dev libboost1.58-all-dev
$ sudo apt install g++-5 gcc-5
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 20
$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10
$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 20
$ sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
$ sudo update-alternatives --set cc /usr/bin/gcc
$ sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
$ sudo update-alternatives --set c++ /usr/bin/g++
$ sudo rm -rf ~/ros_catkin_ws/build_isolated
$ sudo rm -rf ~/ros_catkin_ws/devel_isolated
gonzalocasas gravatar image gonzalocasas  ( 2019-09-21 18:03:48 -0500 )edit

Somebody with rights to do so ought to add this part of the installation to the buster section of the official tutorial.

MoffKalast gravatar image MoffKalast  ( 2019-10-17 09:53:33 -0500 )edit

@MoffKalast: that would be you, as a member of the community, after you register for an account on the wiki.

This is a community project.

There is no "official tutorial". Or at least, there is no official authority that keeps these things up-to-date or makes sure everything works "everywhere".

That would be you, me and the rest of the community.

So if you feel this requires changing, then please register for an account and update the tutorial.

gvdhoorn gravatar image gvdhoorn  ( 2019-10-18 04:29:00 -0500 )edit

I am very happy that my method has taken effect, but I still recommend that you compile and install melodic instead, which has no compiler problem. you can follow these steps in this website. https://www.seeedstudio.com/blog/2019...

chubbyk gravatar image chubbyk  ( 2019-10-24 04:02:24 -0500 )edit

Hi, i am facing the same erros ... I followed up the steps suggested by @chubbyk, @stoianovici, @Old_Forester and when recompile, it stuck at first package "catkin". Please help! Thanks. here is the error log: https://pastebin.com/KqFQvjgc Help Please!!

Ashkr gravatar image Ashkr  ( 2019-10-27 22:03:06 -0500 )edit

@gonzalocasas thank you very much for your code - I'm very new to linux/python. Do you or anyone know how to switch back to gcc 8? I don't want to break anything especially my now working ROS install trying to modify your gcc 5 code to revert back to 8.

cjk11091 gravatar image cjk11091  ( 2019-11-07 20:48:41 -0500 )edit
0

answered 2019-08-04 05:40:52 -0500

FPSychotic gravatar image

I got finally install ROS Melodic+navigatiion+perception+navigation+opencv3.4.6. I only could not install gazebo 9 and ros_controls totally, I got it only partial. Sadly the proccess was crazy, and I couldn't document it, but I helped to get it to other person that kept the process and in the next days he tild going to open a github with the process. While that happens you can try the next: Forget kinetic, libboost1.58 and the official guide, mainly the part of the dependency collada. You must install Melodic from source.Install libboost1.65 and previous to the ros installation, and rosdep will do rest if some pkg must be upgraded to 1.67( as some 1.67 are needed for libogre and rviz). Before any compilation, you need find a alternative source of actionlib, as the official is broken and is the real problem. Afer make rosdep step,, put your alternative actionlib source (look for google results in korean or chinese and translate)and compile just action and its dependences with -- pkg option. If it doesn't compile, delete all except src folder, and try other different actionlib source. If it compile, just compile the rest as the tutorials

Feel free to contact with me or my FB group Raspberry Pi 4, the IMage will be posted there too, and I can try help you.

edit flag offensive delete link more

Comments

@FPSychotic; I followed this post and successfully build most of the packages except 'rviz'. Could you please help me out? I am using libboost1.58 and gcc/g++ 5.0. If i update the libboost with 1.67, the build stops in starting at most of the packages. And as i followed up the ROS Kinetic RPi tutorial web, its mentioned to use gcc/g++ 5.0 and libboost1.58. here is the error log: https://pastebin.com/E4HRHZwu

Please help. Thanks.

Ashkr gravatar image Ashkr  ( 2019-10-30 04:11:27 -0500 )edit

@FPSychotic hi, so do u have the image of raspi with ros?

ridwan gravatar image ridwan  ( 2020-08-18 11:54:54 -0500 )edit

Question Tools

7 followers

Stats

Asked: 2019-07-02 09:18:33 -0500

Seen: 4,978 times

Last updated: Aug 27 '19