0

I cloned the drake repo and went through the [setup instructions from source][1] (WSL Ubuntu 18.04). Now I am trying to follow the first steps and build:

bazel build //tools:drake_visualizer //manipulation/util:geometry_inspector

However some warnings treated as errors are getting in the way :

bazel-out/k8-opt/bin/systems/framework/_virtual_includes/system_scalar_converter/drake/systems/framework/system_scalar_converter.h: In member function 'void drake::systems::SystemScalarConverter::AddIfSupported()': bazel-out/k8-opt/bin/systems/framework/_virtual_includes/system_scalar_converter/drake/systems/framework/system_scalar_converter.h:138:60: error: 'GuaranteedSubtypePreservation' is deprecated: DRAKE DEPRECATED: Use MakeWithoutSubtypeChecking instead of kDisabled. The deprecated code will be removed from Drake on or after 2021-11-01. [-Werror=deprecated-declarations] AddIfSupported<S, T, U>(GuaranteedSubtypePreservation::kEnabled);

What's the proper way to resolve that? Since those warnings are coming from explicit deprecations I would assume there is a way to cleanly work around them without manually tampering with the BUILD files?

gg99
  • 445
  • 6
  • 12
  • That build command definitely works for me on the master branch (on 18.04 and mac). As it should... it's covered by CI. Perhaps there is something stale in your checkout? Or local edits? – Russ Tedrake Aug 22 '21 at 12:57
  • I can confirm I don't have local modifications. It's fairly benign as it only takes changing a few lines to get it to compile along the line of @jwnimmer-tri PR below. – gg99 Aug 25 '21 at 06:49

1 Answers1

0

Perhaps there is something different with the WSL toolchain that's tripping us up here?

In any case, it calls my attention to the fact that a bit of stale code has slipped into that function body. I'll work on a fix for that typo https://github.com/RobotLocomotion/drake/pull/15657, and perhaps it will resolve your problem as well.

jwnimmer-tri
  • 1,994
  • 2
  • 5
  • 6
  • That should fix it for me, thanks. I ran into another small one : I think there is a missing include in lcm/lcm_messages.h as I got an (on WSL 18.04 with gcc 11.1): drake/lcm/lcm_messages.h:35:16: error: 'runtime_error' is not a member of 'std'. I can send a PR for that one. Might be a matter of robustifying the build on WSL. – gg99 Aug 25 '21 at 06:53
  • Yup, I agree that include should be there. A PR would be awesome, thanks! – jwnimmer-tri Aug 25 '21 at 23:54
  • There you go: https://github.com/RobotLocomotion/drake/pull/15668 – gg99 Aug 26 '21 at 01:03