Drop SYSTEM option to avoid compilation errors with modern compilers#47
Drop SYSTEM option to avoid compilation errors with modern compilers#47lepalom wants to merge 1 commit intopal-robotics:kinetic-develfrom
Conversation
|
Actually we need the SYSTEM for disabling warnings and build errors from system headers. I've seen the issue you reported elsewhere, and it's even mentioned in https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html Can you find an alternative solution that keeps the warning suppression from the included directories, but fixes your issue? Moltes gràcies! |
Could you post them?
I have tried several options but I think that use the SYSTEM option with the catkin_INCLUDE_DIRS is not a good idea. Could you try to do this please: include_directories(${catkin_INCLUDE_DIRS}) A disposar ;-) |
|
The problem is that in-house we have stricter compilation flags. We disable equality comparison of floating point values for instance. It's a tricky situation because i don't believe we're misusing SYSTEM for this. And I haven't found an alternative (besides disabling/enabling the warnings before the external includes, which is not maintanable in all our codebase). But on the other hand you're not doing anything wrong on your side, it's a gcc feature (or a bug¿?), but it doesn't work for you. I'll keep an eye on the issue, I guess that this isn't blocking for you since you have it disabled on your fork. When I have time I'll try to build this on a bionic docker with gcc8,because with gcc8 it works fine. |
|
Any new in this topic? |
|
We are using bionic and gcc9 and it is working fine. |
This commit fix compilation errors with gcc-8 in a Debian Buster box.
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 /home/users/leopold.palomo/ros/catkin_ws_pal/src/play_motion/play_motion/include/play_motion/play_motion_helpers.h:43,
from /home/users/leopold.palomo/ros/catkin_ws_pal/src/play_motion/play_motion/src/play_motion_helpers.cpp:38:
/usr/include/c++/8/cstdlib:75:15: fatal error: stdlib.h: El fitxer o directori no existeix
#include_next <stdlib.h>
^~~~~~~~~~
compilation terminated.
[ 33%] Building CXX object CMakeFiles/pm_rrbot.dir/test/rrbot.cpp.o
make[2]: *** [CMakeFiles/play_motion_helpers.dir/build.make:63: CMakeFiles/play_motion_helpers.dir/src/play_motion_helpers.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1849: CMakeFiles/play_motion_helpers.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
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 /usr/include/ros/platform.h:38,
from /usr/include/ros/time.h:53,
from /usr/include/ros/ros.h:38,
from /home/users/leopold.palomo/ros/catkin_ws_pal/src/play_motion/play_motion/test/rrbot.cpp:31:
/usr/include/c++/8/cstdlib:75:15: fatal error: stdlib.h: El fitxer o directori no existeix
#include_next <stdlib.h>
^~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/pm_rrbot.dir/build.make:63: CMakeFiles/pm_rrbot.dir/test/rrbot.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:106: CMakeFiles/pm_rrbot.dir/all] Error 2
[ 38%] Building CXX object CMakeFiles/run_motion.dir/src/run_motion_node.cpp.o
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 /home/users/leopold.palomo/ros/catkin_ws_pal/src/play_motion/play_motion/src/run_motion_node.cpp:40:
/usr/include/c++/8/cstdlib:75:15: fatal error: stdlib.h: El fitxer o directori no existeix
#include_next <stdlib.h>
^~~~~~~~~~