Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing run dependency on spdlog on Ubuntu Focal #26

Closed
dirk-thomas opened this issue Mar 9, 2020 · 9 comments
Closed

missing run dependency on spdlog on Ubuntu Focal #26

dirk-thomas opened this issue Mar 9, 2020 · 9 comments
Assignees
Labels
bug Something isn't working
Projects

Comments

@dirk-thomas
Copy link
Member

See e.g. http://build.ros2.org/view/Fci/job/Fci__nightly-cross-vendor-connext-cyclonedds_ubuntu_focal_amd64/5/console which fails to build an overlay workspace while rcl_logging is part of the underlay.

@clalancette
Copy link
Contributor

In ROS 2 Eloquent on Ubuntu Bionic, Windows, and macOS, we use spdlog as a header-only library, so we never exported it as a exec_depend. But it is also the case that we only install the vendored version of the library if version < 1.3.1 is available. It looks like Focal ships with spdlog version 1.5.0 as a compiled library, so we use the system library there.

For Foxy, this gets us into an interesting situation where we are doing something different for Ubuntu vs Windows/macOS. We have a few options to fix the problem:

  1. Just add an exec_depend in the proper place. This is the easiest, but also the least consistent.
  2. Always vendor spdlog, even when it is available as a system dependency. This keeps maximum consistency between our platforms.
  3. Vendor spdlog if it is too old, but build it as a shared library. This keeps consistency between the platforms.
  4. Build an spdlog package for homebrew and chocolatey, and never vendor spdlog. Given the rolling nature of homebrew, though, this is likely to cause compatibility problems later.

Personally, I'd go for 3 in the list above, where we build a vendored spdlog as a shared library only if it is too old. Thoughts?

@dirk-thomas
Copy link
Member Author

dirk-thomas commented Mar 9, 2020

I'd go for 3 in the list above, where we build a vendored spdlog as a shared library only if it is too old.

Option 3 sounds good to me.

@dirk-thomas dirk-thomas changed the title missing run dependency on spdlog missing run dependency on spdlog on Ubuntu Focal Mar 9, 2020
@dirk-thomas dirk-thomas added this to To do in Foxy via automation Mar 9, 2020
@clalancette
Copy link
Contributor

clalancette commented Mar 10, 2020

Edit: I was wrong about windows, it can be precompiled but uses a different mechanism.

So, as usual, Windows is a pain. We can build spdlog for both Linux and macOS, but spdlog doesn't currently have a way to build the library for Windows. That means that the only option on Windows is to do header-only. So what I'm going to suggest here is the following:

  1. We update the documentation for macOS for Foxy to include brew install spdlog. As of right now, that will bring in the binary version of spdlog 1.5.0.
  2. Ubuntu Focal will already bring in the spdlog dependency via the rosdep install line.
  3. When building the spdlog_vendor package on Ubuntu Focal and macOS, it will just use the system version.
  4. When building the spdlog_vendor package on Ubuntu Bionic, it will build the binary version.
  5. We add an exec_depend on spdlog to rcl_logging_spdlog.

@clalancette
Copy link
Contributor

CI:

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

@clalancette
Copy link
Contributor

While there are a bunch of failures on Windows debug:

  1. Those are in the nightlies as well, and
  2. None of them seem related to being able to access the spdlog

So I'm going to go ahead and merge the fixes for this.

@clalancette
Copy link
Contributor

Fixed by #27 and ros2/spdlog_vendor#2, so closing.

Foxy automation moved this from To do to Done Mar 12, 2020
@dirk-thomas
Copy link
Member Author

Unfortunately the overlay cross-vendor jobs are still failing: e.g. http://build.ros2.org/view/Fci/job/Fci__nightly-cross-vendor-connext-fastrtps_ubuntu_focal_amd64/6/console

@dirk-thomas dirk-thomas reopened this Mar 13, 2020
Foxy automation moved this from Done to In progress Mar 13, 2020
@clalancette
Copy link
Contributor

clalancette commented Mar 13, 2020

http://build.ros2.org/view/Fci/job/Fci__nightly-cross-vendor-connext-fastrtps_ubuntu_focal_amd64/6/consoleFull ended up failing because it can't find the spdlogConfig.cmake. In turn, that's because the libspdlog-dev package didn't get installed.

Looking at it closely, it looks like the package was properly identified during enumeration. But it never goes forward and installs the package (and in point of fact, I don't think it installs some other of the packages identified in that phase; cppcheck also seems to be missing, for instance).

So I actually don't know what is going on here, it seems like a more generic problem in the CI script. Any thoughts?

@dirk-thomas
Copy link
Member Author

I guess someone has to debug it if we want the jobs to pass...

The job has two phases:

  • build (without tests) and install
  • build (with tests) and run the tests

Each phase has its own dependencies and environment. In the first phase it already fails trying to find spdlog. Though that should only be used when tests are built. Without tests test_communication is pretty much an empty package. So the problem is that the first phase tries to build the tests even though it is not supposed to. That is also the reason why no test dependencies (which spdlog is part of) are being installed.

See ros-infrastructure/ros_buildfarm#765 for the fix.

Foxy automation moved this from In progress to Done Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Foxy
  
Done
Development

No branches or pull requests

2 participants