catkin_make_isolated fails with [-fpermissive]

asked 2019-07-11 01:46:02 -0500

buenos gravatar image

updated 2019-07-11 06:23:03 -0500

I want to install ros in centos. therefore I follow the ros tutorial called installing from source.
everything goes well until I build the catkin workspace[2.1.2]
the error msg I got follows:

==> Processing catkin package: 'class_loader'  
==> Building with env: '/home/dmd/ros_catkin_ws/install_isolated/env.sh'  
       Makefile exists, skipping explicit cmake invocation...
==> make cmake_check_build_system in '/home/dmd/ros_catkin_ws/build_isolated/class_loader'  
==> make -j32 -l32 in '/home/dmd/ros_catkin_ws/build_isolated/class_loader'  
[ 40%] Building CXX object CMakeFiles/class_loader.dir/src/class_loader.cpp.o  
[ 40%] Building CXX object CMakeFiles/class_loader.dir/src/class_loader_core.cpp.o  
[ 60%] Building CXX object CMakeFiles/class_loader.dir/src/multi_library_class_loader.cpp.o  
[ 80%] Building CXX object CMakeFiles/class_loader.dir/src/meta_object.cpp.o  
In file included from /home/dmd/ros_catkin_ws/src/class_loader/src/class_loader_core.cpp:30:0:  
/home/dmd/ros_catkin_ws/src/class_loader/include/class_loader/class_loader_core.hpp: In function ‘void   class_loader::impl::registerPlugin(const string&, const string&)’:  
/home/dmd/ros_catkin_ws/src/class_loader/include/class_loader/class_loader_core.hpp:181:45: error: there are no arguments to ‘CONSOLE_BRIDGE_logDebug’ that depend on a template parameter, so a declaration of ‘CONSOLE_BRIDGE_logDebug’ must be available [-fpermissive]  
       getCurrentlyLoadingLibraryName().c_str());  
                                             ^
/home/dmd/ros_catkin_ws/src/class_loader/include/class_loader/class_loader_core.hpp:181:45: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/dmd/ros_catkin_ws/src/class_loader/include/class_loader/class_loader_core.hpp:199:79: error: there are no arguments to ‘CONSOLE_BRIDGE_logDebug’ that depend on a template parameter, so a declaration of ‘CONSOLE_BRIDGE_logDebug’ must be available [-fpermissive]
       "Please refactor your code to isolate plugins into their own libraries.");
                                                                               ^
/home/dmd/ros_catkin_ws/src/class_loader/include/class_loader/class_loader_core.hpp:222:25: error: there are no arguments to ‘CONSOLE_BRIDGE_logWarn’ that depend on a template parameter, so a declaration of ‘CONSOLE_BRIDGE_logWarn’ must be available [-fpermissive]
       class_name.c_str());
                         ^
/home/dmd/ros_catkin_ws/src/class_loader/include/class_loader/class_loader_core.hpp:230:62: error: there are no arguments to ‘CONSOLE_BRIDGE_logDebug’ that depend on a template parameter, so a declaration of ‘CONSOLE_BRIDGE_logDebug’ must be available [-fpermissive]
     class_name.c_str(), reinterpret_cast<void *>(new_factory));
                                                              ^
/home/dmd/ros_catkin_ws/src/class_loader/include/class_loader/class_loader_core.hpp: In function ‘Base* class_loader::impl::createInstance(const string&, class_loader::ClassLoader*)’:
/home/dmd/ros_catkin_ws/src/class_loader/include/class_loader/class_loader_core.hpp:250:95: error: there are no arguments to ‘CONSOLE_BRIDGE_logError’ that depend on a template parameter, so a declaration of ‘CONSOLE_BRIDGE_logError’ must be available [-fpermissive]
       "class_loader.impl: No metaobject exists for class type %s.", derived_class_name.c_str());
                                                                                               ^
/home/dmd/ros_catkin_ws/src/class_loader/include/class_loader/class_loader_core.hpp:270:44: error: there are no arguments to ‘CONSOLE_BRIDGE_logDebug’ that depend on a template parameter, so a declaration of ‘CONSOLE_BRIDGE_logDebug’ must be available [-fpermissive]
         "possible to shutdown the library!");
                                            ^

I guess this error may caused by the version of gcc which is gcc4.8.5.
error msg suggest me use [-fppermissive] args , but I don't konw how to add this args into catkin_make.

I wish for help, thanks.

edit retag flag offensive close merge delete

Comments

I guess this error may caused by the version of gcc.

which version of GCC are you using?

gvdhoorn gravatar image gvdhoorn  ( 2019-07-11 02:05:30 -0500 )edit

I use gcc4.8.5.

buenos gravatar image buenos  ( 2019-07-11 06:23:54 -0500 )edit

Even ROS Kinetic had a minimum requirement of GCC 4.9: https://www.ros.org/reps/rep-0003.htm... I would suggest taking a look at the Red Hat Developer Toolsets, which contain newer GCC builds that might give you better luck. They are built for CentOS as well.

cottsay gravatar image cottsay  ( 2019-09-17 14:13:20 -0500 )edit