Robotics StackExchange | Archived questions

make fails for class_loader on RPi Zero

Hi Guys, I am trying to execute catkinmake (in order to use usbcam node) but when it get to class loader I see the following:

~/ros_catkin_ws $ catkin_make -DCATKIN_WHITELIST_PACKAGES="class_loader"
Base path: /home/pi/ros_catkin_ws
Source space: /home/pi/ros_catkin_ws/src
Build space: /home/pi/ros_catkin_ws/build
Devel space: /home/pi/ros_catkin_ws/devel
Install space: /home/pi/ros_catkin_ws/install
####
#### Running command: "cmake /home/pi/ros_catkin_ws/src -DCATKIN_WHITELIST_PACKAGES=class_loader -DCATKIN_DEVEL_PREFIX=/home/pi/ros_catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/pi/ros_catkin_ws/install -G Unix Makefiles" in "/home/pi/ros_catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/pi/ros_catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/kinetic
-- This workspace overlays: /opt/ros/kinetic
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/pi/ros_catkin_ws/build/test_results
-- Found gmock sources under '/usr/src/gmock': gmock will be built
-- Found gtest sources under '/usr/src/gmock': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.11
CMake Warning (dev) at catkin/CMakeLists.txt:5 (project):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    catkin_VERSION
This warning is for project developers.  Use -Wno-dev to suppress it.

-- BUILD_SHARED_LIBS is on
-- Using CATKIN_WHITELIST_PACKAGES: class_loader
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 1 packages in topological order:
-- ~~  - class_loader
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'class_loader'
-- ==> add_subdirectory(class_loader)
-- Boost version: 1.55.0
-- Found the following Boost libraries:
--   thread
--   system
--   chrono
--   date_time
--   atomic
-- Searching for Poco library...
--   Found Poco!
-- components found: Foundation.
-- Boost version: 1.55.0
-- Found the following Boost libraries:
--   thread
--   chrono
--   system
--   date_time
--   atomic
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/ros_catkin_ws/build
####
#### Running command: "make -j1 -l1" in "/home/pi/ros_catkin_ws/build"
####
[ 20%] Building CXX object class_loader/CMakeFiles/class_loader.dir/src/class_loader.cpp.o
In file included from /home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader.hpp:46:0,
                 from /home/pi/ros_catkin_ws/src/class_loader/src/class_loader.cpp:30:
/home/pi/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/pi/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/pi/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/pi/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/pi/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/pi/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/pi/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/pi/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/pi/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!");
                                            ^
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader_core.hpp:281:56: 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]
     (typeid(obj).name()), reinterpret_cast<void *>(obj));
                                                        ^
In file included from /home/pi/ros_catkin_ws/src/class_loader/src/class_loader.cpp:30:0:
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader.hpp: In member function ‘void class_loader::ClassLoader::onPluginDeletion(Base*)’:
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader.hpp:245:36: 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]
       reinterpret_cast<void *>(obj));
                                    ^
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader.hpp:262:35: 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]
           getLibraryPath().c_str());
                                   ^
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader.hpp: In member function ‘Base* class_loader::ClassLoader::createRawInstance(const string&, bool)’:
/home/pi/ros_catkin_ws/src/class_loader/include/class_loader/class_loader.hpp:295:7: error: there are no arguments to ‘CONSOLE_BRIDGE_logInform’ that depend on a template parameter, so a declaration of ‘CONSOLE_BRIDGE_logInform’ must be available [-fpermissive]
       );
       ^
/home/pi/ros_catkin_ws/src/class_loader/src/class_loader.cpp: In constructor ‘class_loader::ClassLoader::ClassLoader(const string&, bool)’:
/home/pi/ros_catkin_ws/src/class_loader/src/class_loader.cpp:72:31: error: ‘CONSOLE_BRIDGE_logDebug’ was not declared in this scope
     this, library_path.c_str());
                               ^
/home/pi/ros_catkin_ws/src/class_loader/src/class_loader.cpp: In destructor ‘virtual class_loader::ClassLoader::~ClassLoader()’:
/home/pi/ros_catkin_ws/src/class_loader/src/class_loader.cpp:82:65: error: ‘CONSOLE_BRIDGE_logDebug’ was not declared in this scope
     "Destroying class loader, unloading associated library...\n");
                                                                 ^
/home/pi/ros_catkin_ws/src/class_loader/src/class_loader.cpp: In member function ‘int class_loader::ClassLoader::unloadLibraryInternal(bool)’:
/home/pi/ros_catkin_ws/src/class_loader/src/class_loader.cpp:122:70: error: ‘CONSOLE_BRIDGE_logWarn’ was not declared in this scope
       "destroying the ClassLoader. The library will NOT be unloaded.");
                                                                      ^
class_loader/CMakeFiles/class_loader.dir/build.make:62: recipe for target 'class_loader/CMakeFiles/class_loader.dir/src/class_loader.cpp.o' failed
make[2]: *** [class_loader/CMakeFiles/class_loader.dir/src/class_loader.cpp.o] Error 1
CMakeFiles/Makefile2:736: recipe for target 'class_loader/CMakeFiles/class_loader.dir/all' failed
make[1]: *** [class_loader/CMakeFiles/class_loader.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j1 -l1" failed

any idea what can be done?

Asked by Gil404 on 2018-07-28 13:12:32 UTC

Comments

Not an answer, but a suggestion: in order for other users to be able to help you, it would probably help if you described your setup a bit more. Which versions of things are you trying to compile? Which procedure are you following? What OS are you using? etc.

Asked by gvdhoorn on 2018-07-29 03:25:21 UTC

Answers

I don't know your exact setup, but I got the same problem when trying to install kinetic on raspberry pi zero with raspbian jessie.

The issue I had was that the class loader repository defaults to melodic-devel (as of this post), so simply switching to indigo works:

$ cd path/to/your/src/class_loader
$ git checkout -t origin/indigo-devel

Then I was able to successfully build class_loader.

Alternatively, if you came from the corresponding ROS wiki page, selecting the correct ROS distribution tab should redirect you to the correct branch on github.

See also the same issue on the class_loader github repo.

Asked by Irin Thirdwater on 2019-09-01 04:03:45 UTC

Comments