Skip to content

Export Poco libraries - #48

Merged
mikaelarguedas merged 1 commit into
ros:ros2from
esteve:ros2-export-poco
Oct 27, 2017
Merged

mikaelarguedas merged 1 commit into
ros:ros2from
esteve:ros2-export-poco

Conversation

@esteve

@esteve esteve commented Jun 13, 2017 •

Copy link
Copy Markdown
Member

While crosscompiling the rclcpp examples, I found out that the composition one all missed the Poco symbols, this change fixes that.

Edit: updated to mention the composition examples

@dirk-thomas

Copy link
Copy Markdown
Member

Can you please clarify which examples are you referring to.

@esteve

esteve commented Jun 13, 2017

Copy link
Copy Markdown
Member Author

The composition examples:


Process package 'examples_rclcpp_minimal_composition' with context:
--------------------------------------------------------------------------------
 source_space => /home/esteve/Projects/ros2_cross/ros2/ros2_ws/src/ros2/examples/rclcpp/minimal_composition
  build_space => /home/esteve/Projects/ros2_cross/ros2/output/build_isolated_cross/examples_rclcpp_minimal_composition
install_space => /home/esteve/Projects/ros2_cross/ros2/output/install_isolated_cross/examples_rclcpp_minimal_composition
   make_flags => -j1
  build_tests => False
--------------------------------------------------------------------------------
+++ Building 'examples_rclcpp_minimal_composition'
==> '. /home/esteve/Projects/ros2_cross/ros2/output/build_isolated_cross/examples_rclcpp_minimal_composition/cmake__build.sh && /usr/bin/make cmake_check_build_system' in '/home/esteve/Projects/ros2_cross/ros2/output/build_isolated_cross/examples_rclcpp_minimal_composition'
==> '. /home/esteve/Projects/ros2_cross/ros2/output/build_isolated_cross/examples_rclcpp_minimal_composition/cmake__build.sh && /usr/bin/make -j1' in '/home/esteve/Projects/ros2_cross/ros2/output/build_isolated_cross/examples_rclcpp_minimal_composition'
[ 33%] Built target examples_rclcpp_minimal_composition_nodes
[ 44%] Linking CXX executable examples_rclcpp_minimal_composition_subscriber
/home/esteve/Projects/ros2_cross/gcc-toolchain/bin/../lib/gcc/arm-linux-gnueabihf/4.9.2/../../../../arm-linux-gnueabihf/bin/ld: warning: libPocoFoundation.so.47, needed by /home/esteve/Projects/ros2_cross/ros2/output/install_isolated_cross/class_loader/lib/libclass_loader.so, not found (try using -rpath or -rpath-link)
/home/esteve/Projects/ros2_cross/ros2/output/install_isolated_cross/class_loader/lib/libclass_loader.so: undefined reference to `Poco::SharedLibrary::SharedLibrary(std::string const&)'
/home/esteve/Projects/ros2_cross/ros2/output/install_isolated_cross/class_loader/lib/libclass_loader.so: undefined reference to `typeinfo for Poco::RuntimeException'
/home/esteve/Projects/ros2_cross/ros2/output/install_isolated_cross/class_loader/lib/libclass_loader.so: undefined reference to `Poco::SharedLibrary::isLoaded() const'
/home/esteve/Projects/ros2_cross/ros2/output/install_isolated_cross/class_loader/lib/libclass_loader.so: undefined reference to `Poco::SharedLibrary::suffix()'
/home/esteve/Projects/ros2_cross/ros2/output/install_isolated_cross/class_loader/lib/libclass_loader.so: undefined reference to `typeinfo for Poco::LibraryLoadException'
/home/esteve/Projects/ros2_cross/ros2/output/install_isolated_cross/class_loader/lib/libclass_loader.so: undefined reference to `typeinfo for Poco::LibraryAlreadyLoadedException'
/home/esteve/Projects/ros2_cross/ros2/output/install_isolated_cross/class_loader/lib/libclass_loader.so: undefined reference to `typeinfo for Poco::NotFoundException'
/home/esteve/Projects/ros2_cross/ros2/output/install_isolated_cross/class_loader/lib/libclass_loader.so: undefined reference to `Poco::SharedLibrary::unload()'
collect2: error: ld returned 1 exit status
CMakeFiles/examples_rclcpp_minimal_composition_subscriber.dir/build.make:125: recipe for target 'examples_rclcpp_minimal_composition_subscriber' failed
make[2]: *** [examples_rclcpp_minimal_composition_subscriber] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/examples_rclcpp_minimal_composition_subscriber.dir/all' failed
make[1]: *** [CMakeFiles/examples_rclcpp_minimal_composition_subscriber.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

<== Command '. /home/esteve/Projects/ros2_cross/ros2/output/build_isolated_cross/examples_rclcpp_minimal_composition/cmake__build.sh && /usr/bin/make -j1' failed in '/home/esteve/Projects/ros2_cross/ros2/output/build_isolated_cross/examples_rclcpp_minimal_composition' with exit code '2'
<== Command '. /home/esteve/Projects/ros2_cross/ros2/output/build_isolated_cross/examples_rclcpp_minimal_composition/cmake__build.sh && /usr/bin/make -j1' failed in '/home/esteve/Projects/ros2_cross/ros2/output/build_isolated_cross/examples_rclcpp_minimal_composition' with exit code '2'

@dirk-thomas

dirk-thomas commented Jun 14, 2017 •

Copy link
Copy Markdown
Member

I think the direct export of Poco_LIBRARIES will make the generated CMake code not relocatable anymore. Therefore it would be better to export a CMake extra file which repeats the logic to lookup Poco (

find_package(poco_vendor REQUIRED) # Provides FindPoco.cmake and Poco on platforms without it.
find_package(Poco REQUIRED COMPONENTS Foundation)
).

@esteve

esteve commented Oct 16, 2017

Copy link
Copy Markdown
Member Author

@dirk-thomas sorry, I made that change, but then I forgot to push it. Is this the correct way to fix it?

@dirk-thomas

Copy link
Copy Markdown
Member

Is this the correct way to fix it?

Looks good to me. Please add a trailing newline at the end of the file.

@esteve

esteve commented Oct 16, 2017

Copy link
Copy Markdown
Member Author

Please add a trailing newline at the end of the file.

Done.

@mikaelarguedas

Copy link
Copy Markdown
Member

re-triggering travis

@mikaelarguedas mikaelarguedas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm,
Travis fails, I think it's due to their recent upgrade of the machines. Looks like CMAKE_CXX_STANDARD 14 is processed properly but their c++ compiler doesn't recognize the resulting -std=c++14 flag

@esteve

esteve commented Oct 18, 2017

Copy link
Copy Markdown
Member Author

@mikaelarguedas I believe it's because the Travis runner still runs Trusty, whose version of g++ does not support C++14. I've pushed one more revision which adds find_package(poco_vendor REQUIRED) to ensure that find_package(Poco ...) works.

@mikaelarguedas

Copy link
Copy Markdown
Member

I believe it's because the Travis runner still runs Trusty, whose version of g++ does not support C++14

I think you're right, I was just surprised that the job for the PR adding c++14 didn't fail in the same way.

I've pushed one more revision which adds find_package(poco_vendor REQUIRED) to ensure that find_package(Poco ...) works.

👍

@mikaelarguedas
mikaelarguedas merged commit 07a5e8a into ros:ros2 Oct 27, 2017
@esteve
esteve deleted the ros2-export-poco branch November 9, 2017 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants