Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Up poco version to 1.8.0.1 #14

Merged
merged 13 commits into from
May 11, 2018
Merged

Up poco version to 1.8.0.1 #14

merged 13 commits into from
May 11, 2018

Conversation

sloretz
Copy link
Contributor

@sloretz sloretz commented Apr 25, 2018

Edit: This PR ups the version of poco to 1.8.0.1 (same as in bionic). It also removes the custom find module by instead installing poco into the same install prefix as poco_vendor.

Old description

More info in this comment.

connects to #11

Running windows packaging job so I can use the artifact to test this patch. I've checked it on Ubuntu and did not see a regression.

Build Status

@sloretz sloretz added the in progress Actively being worked on (Kanban column) label Apr 25, 2018
@sloretz sloretz added this to the bouncy milestone Apr 25, 2018
@sloretz sloretz self-assigned this Apr 25, 2018
mikaelarguedas
mikaelarguedas previously approved these changes Apr 26, 2018
Copy link
Member

@mikaelarguedas mikaelarguedas left a comment

Choose a reason for hiding this comment

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

lgtm, once the artifact has proven to fix the pb

CMakeLists.txt Outdated
@@ -76,6 +76,7 @@ function(get_poco)
-DENABLE_UTIL:BOOL=OFF
-DENABLE_XML:BOOL=OFF
-DENABLE_ZIP:BOOL=OFF
-DCMAKE_Debug_POSTFIX=d
Copy link
Member

Choose a reason for hiding this comment

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

Alternatively we could use all caps for consistency https://cmake.org/cmake/help/v3.11/variable/CMAKE_DEBUG_POSTFIX.html.
I expect both to have the same effect.

Though I'm fine with the current one if we prefer matching the case of the string representing the build type rather than following a strict "all caps for all CMake variables".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The debug build produced PocoFoundation.dll on the windows packaging job. Maybe all-caps is mandatory.

@sloretz
Copy link
Contributor Author

sloretz commented Apr 26, 2018

Another windows packaging job

Build Status

@sloretz
Copy link
Contributor Author

sloretz commented Apr 27, 2018

Yet another packaging job

Build Status

@sloretz sloretz dismissed mikaelarguedas’s stale review April 27, 2018 16:56

Review was conditional on testing outcome. It didn't work and there have been new changes since then.

@sloretz
Copy link
Contributor Author

sloretz commented Apr 27, 2018

Trying another approach
Build Status

@sloretz
Copy link
Contributor Author

sloretz commented Apr 27, 2018

Getting closer
Build Status

@sloretz
Copy link
Contributor Author

sloretz commented Apr 27, 2018

The lastest build artifact fixes the issue. I've tested building Debug of ros2/examples in an overlay workspace an confirmed it still works on Ubuntu and now Windows using the artifact from the last CI packaging job.

The fix overwrites the build and install commands to pass the build type via --config. This should make no difference on ubuntu/osx but is required when using visual studio.

CI build type Debug

@sloretz sloretz added in review Waiting for review (Kanban column) in progress Actively being worked on (Kanban column) and removed in progress Actively being worked on (Kanban column) in review Waiting for review (Kanban column) labels Apr 27, 2018
@sloretz
Copy link
Contributor Author

sloretz commented Apr 30, 2018

CI Windows build type None Build Status

@sloretz
Copy link
Contributor Author

sloretz commented May 1, 2018

Re-Rebuild CI windows Build Status

@sloretz
Copy link
Contributor Author

sloretz commented May 4, 2018

Trying a job with a more recent version of poco: 1.8.0.1

Windows packaging job Build Status

@sloretz
Copy link
Contributor Author

sloretz commented May 4, 2018

Windows packaging job Build Status

@sloretz
Copy link
Contributor Author

sloretz commented May 8, 2018

Build Status
Build Status

@sloretz sloretz changed the title Always append 'd' suffix to Debug libraries Up poco version to 1.8.0.1 May 9, 2018
@sloretz
Copy link
Contributor Author

sloretz commented May 9, 2018

CI build type None

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@mikaelarguedas
Copy link
Member

additional context available at ros2/ci#148 (comment)

@sloretz
Copy link
Contributor Author

sloretz commented May 9, 2018

With this PR I don't see the issue described in #11 in windows

However, I have to explicitly use CMake commands to test a debug build on windows. The default generator used when I run colcon build does not make use of the CMAKE_BUILD_TYPE variable.

To test on windows

  1. clone ros2/examples
  2. mkdir some_folder && cd some_folder
  3. cmake -G "Visual Studio 14 2015 Win64" ..\src\examples\rclcpp\minimal_composition\"
  4. cmake --build . --config Debug

@mikaelarguedas
Copy link
Member

mikaelarguedas commented May 9, 2018

The default generator used when I run colcon build does not make use of the CMAKE_BUILD_TYPE variable.

This looks like a bug.
Can you provide the colcon invocation you ran that didnt work ?
Could it be an issue when escaping the build type in the colcon invocation ?

I guess colcon is using the VS 2017 generator by default?

@mikaelarguedas
Copy link
Member

Following up from offline discussion with @sloretz:

  • the patch needs to be modified to keep the check for the version of poco we find and build anyway if the version is too old: https://github.com/ros2/poco_vendor/pull/10/files

  • the cmake generator error seems tied to the environment that was used for testing (a VS2015 VM), we should check if we can reproduce in our Windows node in VS2017 terminal and optionally in a VS2015 terminal as well

  • We should test the updated patch on a Xenial system to see if Poco is downloaded and built properly and confirm that an overlay workspace building in Debug still works

@sloretz
Copy link
Contributor Author

sloretz commented May 10, 2018

I tested b70d08e manually for each of these cases and did not see the issue described by #11

  • bionic with libpoco-dev installed
  • bionic without libpoco-dev installed
  • xenial without libpoco-dev installed

Test steps

cd ros2_ws
rm -rf build install
colcon build --cmake-args " -DCMAKE_BUILD_TYPE=RelWithDebInfo"
cd ..
mkdir overlay_ws
git clone https://github.com/ros2/examples.git
colcon build
./install/examples_rclcpp_minimal_composition/lib/examples_rclcpp_minimal_composition/composition_composed
rm -rf build install
colcon build --cmake-args " -DCMAKE_BUILD_TYPE=Debug"
./install/examples_rclcpp_minimal_composition/lib/examples_rclcpp_minimal_composition/composition_composed

Here's another windows packaging job Build Status. When that finishes I'll test the above steps on it
Edit: seems to work on windows, putting this ticket into review

CI

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@sloretz sloretz added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels May 10, 2018
Copy link
Member

@mikaelarguedas mikaelarguedas left a comment

Choose a reason for hiding this comment

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

LGTM, with 2 nitpicks/questions

Can we use CMAKE_CXX_STANDARD instead of passing -std=c++14 explicitly to cmake ?

CMakeLists.txt Outdated
@@ -1,25 +1,15 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.5)
cmake_policy(SET CMP0048 NEW)
Copy link
Member

Choose a reason for hiding this comment

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

Is this necessary ? It looks like the default is NEW in CMake 3.5: https://cmake.org/cmake/help/v3.5/policy/CMP0048.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fc22ae0

Oops, thanks. I think I set the policy first, then later upped the minimum required version and didn't check the policy's default.

@sloretz
Copy link
Contributor Author

sloretz commented May 10, 2018

@mikaelarguedas changed to CMAKE_CXX_STANDARD in 0cfdd5c

ci up to composition since the two new commits are minor changes and I think composition tests should confirm poco_vendor built successfully. I'll merge if the tests pass.

@mikaelarguedas
Copy link
Member

We could use the CMAKE_CXX_STANDARD outside of the if as it's not platform specific. Though I think Windows just ignores that variable so it wouldn't make any difference to the current implementation so we can leave it as is.

ci up to composition since the two new commits are minor changes and I think composition tests should confirm poco_vendor built successfully. I'll merge if the tests pass.

👍

@sloretz sloretz merged commit 319899f into master May 11, 2018
@sloretz sloretz deleted the poco_debug_suffix_windows branch May 11, 2018 14:22
@sloretz sloretz removed the in review Waiting for review (Kanban column) label May 11, 2018
@mikaelarguedas mikaelarguedas mentioned this pull request May 22, 2018
31 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants