Issue when compiling ROS noetic from source on RaspberryPi
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
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
.