PickNikRobotics/rviz_visual_tools

Failing Noetic Debian buster build - failed to find stdlib.h

sloretz opened this issue · 0 comments

It looks like this package is failing to build on Debian Buster

The error output is a failure to find the C include <stdlib.h>

make[4]: Entering directory '/tmp/binarydeb/ros-noetic-rviz-visual-tools-3.9.0/obj-aarch64-linux-gnu'
[  7%] Building CXX object CMakeFiles/rviz_visual_tools_remote_control.dir/src/remote_control.cpp.o
/usr/lib/ccache/c++  -DQT_NO_KEYWORDS -DROSCONSOLE_BACKEND_LOG4CXX -DROS_BUILD_SHARED_LIBS=1 -DROS_PACKAGE_NAME=\"rviz_visual_tools\" -Drviz_visual_tools_remote_control_EXPORTS -I/tmp/binarydeb/ros-noetic-rviz-visual-tools-3.9.0/obj-aarch64-linux-gnu -I/tmp/binarydeb/ros-noetic-rviz-visual-tools-3.9.0 -I/tmp/binarydeb/ros-noetic-rviz-visual-tools-3.9.0/obj-aarch64-linux-gnu/rviz_visual_tools_remote_control_autogen/include -isystem /tmp/binarydeb/ros-noetic-rviz-visual-tools-3.9.0/include -isystem /opt/ros/noetic/include -isystem /opt/ros/noetic/share/xmlrpcpp/cmake/../../../include/xmlrpcpp -isystem /usr/include/eigen3 -isystem /usr/include/OGRE/Overlay -isystem /usr/include/OGRE -isystem /usr/share/orocos_kdl/cmake/../../../include  -g -O2 -fdebug-prefix-map=/tmp/binarydeb/ros-noetic-rviz-visual-tools-3.9.0=. -fstack-protector-strong -Wformat -Werror=format-security -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC   -W -Wall -Wextra -Wwrite-strings -Wunreachable-code -Wpointer-arith -Winit-self -Wredundant-decls -Wno-unused-parameter -Wno-unused-function -std=c++11 -o CMakeFiles/rviz_visual_tools_remote_control.dir/src/remote_control.cpp.o -c /tmp/binarydeb/ros-noetic-rviz-visual-tools-3.9.0/src/remote_control.cpp
In file included from /usr/include/c++/8/ext/string_conversions.h:41,
                 from /usr/include/c++/8/bits/basic_string.h:6400,
                 from /usr/include/c++/8/string:52,
                 from /tmp/binarydeb/ros-noetic-rviz-visual-tools-3.9.0/src/remote_control.cpp:40:
/usr/include/c++/8/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>
               ^~~~~~~~~~
compilation terminated.

This might be due to the use of isystem: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129

include_directories(SYSTEM include ${catkin_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS} ${OGRE_OV_INCLUDE_DIRS})

Removing the use of SYSTEM will probably fix the build. Alternatively there might be a way to work around it by setting a couple cmake variables. Lastly, maybe the error would go away if the include is changed to <cstdlib> instead?