pluginlib / class_loader compilation issue

asked 2014-11-26 21:06:02 -0600

that_guy318 gravatar image

updated 2014-11-27 08:51:16 -0600

So I'm trying to get fpasteau's raspicam_node working on my Raspberry Pi B+. I've added a ton of dependencies in as catkin_make complained about them, and it finally get's the the point that it starts making. For a while I was having problems with it not finding Poco, but I was able to fix that by commenting out the find and include lines and setting the Poco_DIR manually as such:

  #find_package(Poco REQUIRED COMPONENTS Foundation)    
  #include(${CMAKE_SOURCE_DIR}/class_loader/cmake/Modules/PocoConfig.cmake)     
  SET(Poco_DIR "/usr/local/include/Poco")

After that it would make it up to the make part, but then get stuck with the message
image description

After some googling I added/modified the following lines to the Cmaklists file in the pluginlib package

 SET(LDFLAGS_LINUX "-ldl")      
 SET(LDLIBS "-ldl")      
 SET(Poco_DIR "/usr/local/include/Poco")        
 target_link_libraries(plugin_tool ${Boost_LIBRARIES} ${catkin_LIBRARIES} -lm -ldl ${TinyXML_LIBRARIES})

And now I'm getting these errors and haven't been able to figure anything out.

image description

Direct Link to the Picture

Any suggestions? I've been able to figure out all the other issues with learning ROS and getting other nodes working, but this time I'm just stumped.

Thanks -Matt

EDIT: I'm fairly convinced at the moment that the issue is with how Poco is being included in the class_loader cmakelists file still. Poco appears to be installed in both "/usr/include/Poco" and "/usr/local/include/Poco" on the Pi.

This is what the original cmakelists file looked like

 cmake_minimum_required(VERSION 2.8.3)
 project(class_loader)

 find_package(Boost REQUIRED COMPONENTS thread system)
 find_package(catkin REQUIRED cmake_modules)
 find_package(console_bridge REQUIRED)
 find_package(Poco REQUIRED COMPONENTS Foundation)

 catkin_package(
  INCLUDE_DIRS include
   LIBRARIES ${PROJECT_NAME} ${Poco_LIBRARIES}
   DEPENDS Boost Poco console_bridge
   CFG_EXTRAS class_loader-extras.cmake
 )

 include_directories(include ${console_bridge_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${Poco_INCLUDE_DIRS})

 set(${PROJECT_NAME}_SRCS
   src/class_loader.cpp
   src/class_loader_core.cpp
   src/meta_object.cpp
   src/multi_library_class_loader.cpp
 )
 add_library(${PROJECT_NAME} ${${PROJECT_NAME}_SRCS})
 target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} ${console_bridge_LIBRARIES} ${Poco_LIBRARIES})

 install(TARGETS ${PROJECT_NAME}
   ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
   LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
   RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION})
 install(DIRECTORY include/class_loader/
   DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})

 if(CATKIN_ENABLE_TESTING)
   add_subdirectory(test)
 endif()

These are the various things I've been trying with it:

 cmake_minimum_required(VERSION 2.8.3)
 project(class_loader)

 find_package(Boost REQUIRED COMPONENTS thread system)
 find_package(catkin REQUIRED cmake_modules)
 find_package(console_bridge REQUIRED)
 #find_package(Poco REQUIRED COMPONENTS Foundation)
 #include(${CMAKE_SOURCE_DIR}/class_loader/cmake/Modules/PocoConfig.cmake)

 # I had this as /usr/local/include/Poco originally
 SET(Poco_DIR "${CMAKE_SOURCE_DIR}/class_loader/cmake/Modules")
 find_package(Poco REQUIRED COMPONENTS Foundation)
 #include(/usr/include/Poco)

 find_package(Poco REQUIRED COMPONENTS Foundation)
 #SET(Poco_FOUND "TRUE")
 include(${CMAKE_SOURCE_DIR}/class_loader/cmake/Modules/PocoConfig.cmake)

 catkin_package(
   INCLUDE_DIRS include
   LIBRARIES ${PROJECT_NAME} ${Poco_LIBRARIES}
   DEPENDS Boost Poco console_bridge
   CFG_EXTRAS class_loader-extras.cmake
 )

 include_directories(include ${console_bridge_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${Poco_INCLUDE_DIRS})
 #include_directories(include ${console_bridge_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${Poco_INCLUDE_DIRS} 
 #  "/usr/include/Poco")

In this current configuration it is able to fine the PocoConfig.make file in the class loader modules directory (I copied it there as per a suggestion I found searching online), but it gives me this error before it gets to compilation:

 -- Found the following Boost libraries:
 --   thread
 --   system
 -- Poco was not found. 
 CMake ...
(more)
edit retag flag offensive close merge delete