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

Issue when compiling ROS noetic from source on RaspberryPi

asked 2021-11-06 10:04:17 -0600

James NT gravatar image

I have been attempting to compile ROS noetic on a Raspberry Pi 4 running Buster. I have been following the instructions given here:

At the point in the compile where it starts to build xmlrpcpp.dir/src I start to see several errors and this annotation:

[  8%] Building CXX object CMakeFiles/xmlrpcpp.dir/src/XmlRpcValue.cpp.o
In file included from /usr/include/c++/5/mutex:35:0,
                 from /home/pi/catkin_ws/src/ros_comm/xmlrpcpp/src/XmlRpcValue.cpp:17:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \

There are also some other reported errors that I am unsure if related to the above.

/home/pi/catkin_ws/src/ros_comm/xmlrpcpp/src/XmlRpcValue.cpp: In member function 'std::ostream& XmlRpc::XmlRpcValue::write(std::ostream&) const':
/home/pi/catkin_ws/src/ros_comm/xmlrpcpp/src/XmlRpcValue.cpp:619:23: error: 'once_flag' in namespace 'std' does not name a type
           static std::once_flag once;
                       ^
/home/pi/catkin_ws/src/ros_comm/xmlrpcpp/src/XmlRpcValue.cpp:624:13: error: 'call_once' is not a member of 'std'

There is no obvious CmakeList.txt file. In which file should I, and how do I, enable the '-std=c++11 or -std=gnu++11 compiler options' for this build unit?

Thanks

edit retag flag offensive close merge delete

Comments

I'm not sure this isn't an xy-problem (and other problems would turn up later on), but you could force C++11 in all packages using catkin_make --cmake-args -DCMAKE_CXX_STANDARD=11.

gvdhoorn gravatar image gvdhoorn  ( 2021-11-06 14:15:44 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-11-06 14:13:13 -0600

osilva gravatar image

This error is most likely caused by incompatibility in C++ libraries and the compiler. Don't be surprised if you fix this error more errors will pop up in the compilation process.

If you want to run ROS Noeticwith RPi 4, the best recommended way is to use Ubuntu 20.04: https://ubuntu.com/download/raspberry-pi. The installation is straightforward and you will more resources for support.

If you want to continue troubleshooting for this error, I suggest to look of what may cause: error: 'once_flag' in namespace 'std' does not name a type

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-11-06 10:04:17 -0600

Seen: 195 times

Last updated: Nov 06 '21