-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Use yaml_cpp from Ubuntu Xenial. #7352
Conversation
Note for reviewers, please verify that redistributable packages still work. Shambhala is the test case at this present moment in time. Review status: 0 of 8 files reviewed at latest revision, 2 unresolved discussions. tools/install/libdrake/drake.cps, line 87 at r1 (raw file):
Note that the install packages would be broken with this change. See below for a temporary workaround. tools/install/libdrake/drake.cps, line 106 at r1 (raw file):
Changing this to
would probably be good enough for now, but it is not entirely correct as it implicitly relies on the headers being the search path. Ideally, the Comments from Reviewable |
Review status: 0 of 8 files reviewed at latest revision, 2 unresolved discussions. tools/install/libdrake/drake.cps, line 106 at r1 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
(also ideally Bazel would not suffer from #492 so this could be omitted altogether) Comments from Reviewable |
@drake-jenkins-bot mac-elcapitan-clang-bazel-experimental-everything please +@jwnimmer-tri as platform review volunteer. We will still need to find an Ubuntu volunteer to feature review and test vs Shambhala. |
Reviewed 8 of 8 files at r1. drake/automotive/maliput/monolane/BUILD.bazel, line 80 at r1 (raw file):
Why is this removed? This is exactly the place it should have been. drake/automotive/maliput/monolane/BUILD.bazel, line 127 at r1 (raw file):
This cc file doesn't include anything from yaml, so this line should not be here. drake/automotive/maliput/utility/BUILD.bazel, line 41 at r1 (raw file):
This cc file doesn't include anything from yaml, so this line should not be here. I pulled the PR locally to explore. The actual problem is that monolane's Ditto for the same edit below. Comments from Reviewable |
+@stonier as 🐧 (xenial) feature review and local build tester Comments from Reviewable |
Testing currently fine for this branch and shambhala (using this branch). Awaiting changes requested by @jamiesnape and @jwnimmer-tri. Comments from Reviewable |
Shall I make this change on the PR branch? |
Either that or a proper fix. This PR cannot break the packages. |
If both Jamie is correct about the metadata changes being required, and Daniel is correct that Shambhala tests are passing, does that mean Shambhala is not yet a good enough test of the packages? Should we be testing PRs like this against, say, Spartan also? Comments from Reviewable |
I will start with this change as I'm not clear on what the proper fix would be, nor how to test an attempt at one locally. What are you exercising to exhibit the breakage locally? Should I be concerned that on both my local workspace and in an isolated docker container the PR as submitted builds (
I will make these changes and test again. At the time I was under the impression that I was addressing build failures but I've rebased against master enough since then that it's entirely possible I bungled something but not enough to break my local build. |
Drake uses yaml-cpp in its public headers, you can use Review status: all files reviewed at latest revision, 5 unresolved discussions. Comments from Reviewable |
FYI I did not experience any errors. My comments are all about code review and bad smells. Jamie's comments about (Edit to add: include and) link flags are about whether Drake's installed or packaged binary release will work for users consuming it. Because of #7260, we don't have CI coverage of that yet. So the author (and reviewer, here Daniel) has to test manually against some exemplar downstream users -- Shambhala at least. (My recent question asks whether Shambhala on its own is good enough.) |
+(status: curate commits before merging) Reviewed 2 of 2 files at r2. Comments from Reviewable |
🍎 tested. Review status: all files reviewed at latest revision, 5 unresolved discussions. Comments from Reviewable |
Just to be clear, we do have CI coverage, but it's posthumous. Next steps are to get it into buildcop review and ultimately some form of it as a PR hook. Obviously, I am looking forward to that so I don't have a manual step involved. Having said that, this wouldn't have been caught by CI since in normal cases it gets saved by discovering it via the default system path setting. We should actually provide the system include path and libs here, just like for any other installed cmake/pkgconfig module. @jamiesnape what's the recommended way to handle this? Push the discovered yaml-cpp include directory into the "Includes" list? Comments from Reviewable |
I think I found an existing problem. Filed an issue at RobotLocomotion/drake-external-examples#56 . Review status: all files reviewed at latest revision, 5 unresolved discussions. Comments from Reviewable |
Please ignore my previous comment. Review status: all files reviewed at latest revision, 5 unresolved discussions. Comments from Reviewable |
That would work on Linux, but is brittle on Mac since the pkg-config file there unfortunately points to Review status: all files reviewed at latest revision, 5 unresolved discussions. Comments from Reviewable |
That should be fine though since the setup script for Mac will make sure that gets installed? Most other pkg-config scripts rely on the fact that their dependencies are explicitly installed by the system and don't go hunting for potentially a different one than the binaries were compiled with. Additionally, there is only likely to be support for Mac binaries on local installs for the foreseeable future. |
The problem is when someone does |
We do not have it yet, but only planning on support for Mac binaries on local installs for the foreseeable future which should mostly avoid any brittleness with the system (patch) version changing. If for any reason that does happen - the policy would be just to make sure you update your drake install when you do a brew upgrade. I'd prefer that than going hunting for and potentially finding the wrong yaml-cpp on linux. |
Not sure how that would happen. The find-module would just call |
Someone installs a (possibly non system patched) version in I would rather it points explicitly to the dependencies it was created from rather than have the potential to be misdirected. If for homebrew that means upgrading the installed drake following a brew upgrade, then that's fine for the foreseeable future until we get to the point of producing mac binaries. |
Ok, your decision, but from past experience, and the number of bug reports that it generates, that is not a good idea (you asked me for the "recommended way"). |
So, in the absence of find-modules (for better or worse), we have a prototype |
For what it is worth, we suffer a steady amount of issue traffic in ROS 2 as a result of hard coded paths to installed binaries (ros2/ros2#311 is a representative example). These paths change at upstream's discretion. There are platform limitations preventing us from working around our issue there easily, but hard coding these paths is going to be a definite developer experience hit, especially on a rolling release platform like MacOS + Homebrew. |
Reviewed 1 of 1 files at r3, 1 of 1 files at r4, 1 of 1 files at r5. Comments from Reviewable |
Reviewed 4 of 8 files at r1, 2 of 2 files at r2, 1 of 1 files at r3, 1 of 1 files at r4, 1 of 1 files at r5. Comments from Reviewable |
Possibly they are due to Jenkins having not exactly the right sources established to build. Since there are merge conflicts anyway, perhaps just update the PR to base off latest master. The push from that will cause a re-test, and we'll see what it looks like then. |
This removes the bazel external yaml_cpp and replaces it with system yaml_cpp found via pkg-config. In order to link against it additional dependencies on @yaml_cpp needed to be specified. * Remove vendored yaml-cpp build config.
As part of converting the Bazel drake build to using the system yaml-cpp a few dependencies were shuffled that should not have been. This reverts those changes based on feedback from jwnimmer-tri.
Added based on feedback in RobotLocomotion#7352 This may only be a temporary measure pending maturity of the pc2cps module.
0757cc1
to
59e2060
Compare
Reviewed 4 of 4 files at r6. Comments from Reviewable |
The cmake builds have passed now. We'll do a final check of Mac builds: @drake-jenkins-bot mac-sierra-clang-bazel-experimental-everything please |
I've confirmed on Ubuntu that the library is listed: jwnimmer@call-cc:~/jwnimmer-tri/drake-distro/tmp$ ldd lib/libdrake.so | grep yaml
libyaml-cpp.so.0.5 => /usr/lib/x86_64-linux-gnu/libyaml-cpp.so.0.5 (0x00007fd4bb00a000) I've confirmed on Ubuntu that Shambhala drake_cmake_installed still works 🐧. I think we can de-assign @stonier if everything else is ready and he doesn't object. @soonho-tri Do you want to re-test locally on Mac? If so, can you LGTM? If not, just de-assign yourself? |
Reviewed 3 of 8 files at r1, 4 of 4 files at r6. Comments from Reviewable |
The elcapitan error is:
But I don't think that test uses yaml: jwnimmer@call-cc:~/jwnimmer-tri/drake-distro$ bazel query 'somepath("//drake/systems/controllers/qp_inverse_dynamics:valkyrie_balancing_test", "@yaml_cpp//:yaml_cpp")'
INFO: Empty results so probably not the fault of this PR, but rather just a flake. We'll try a retest. |
@drake-jenkins-bot mac-elcapitan-clang-bazel-experimental-everything please |
This reverts commit 9eb22d4.
Added based on feedback in RobotLocomotion#7352 This may only be a temporary measure pending maturity of the pc2cps module.
Added based on feedback in RobotLocomotion#7352 This may only be a temporary measure pending maturity of the pc2cps module.
Added based on feedback in RobotLocomotion#7352 This may only be a temporary measure pending maturity of the pc2cps module.
* Use yaml_cpp from Ubuntu Xenial. This removes the bazel external yaml_cpp and replaces it with system yaml_cpp found via pkg-config. Using the system version cuts down on the size of libdrake.so and improves linking compatibility when using Drake within systems that use the system yaml-cpp version. This change was previously introduced in #7352 and later reverted (#7403) due to issues with the MacOS build. Other portions of that original pull request were reintroduced in #7453.
This splits the yaml-cpp changes from #7347 into a separate pull request.
yaml-cpp is already part of the setup scripts for Xenial and Mac.
CC collaborators @j-rivero and @clalancette
This change is