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

//bindings/pydrake/examples violate ODR #8911

Closed
EricCousineau-TRI opened this issue May 31, 2018 · 1 comment · Fixed by #9978
Closed

//bindings/pydrake/examples violate ODR #8911

EricCousineau-TRI opened this issue May 31, 2018 · 1 comment · Fixed by #9978

Comments

@EricCousineau-TRI
Copy link
Contributor

EricCousineau-TRI commented May 31, 2018

As @jwnimmer-tri pointed out on Slack, targets underneath //bindings/pydrake/examples presently violate ODR, similar to #8908.

At present, we are getting lucky that we do not encounter the same segfault as #8908, but it may happen shortly. This should be fixed, most ideally by having all examples link to drake_shared_library, or even better, using granular shared libraries (#7294).

In attempting to reproduce along the lines of #8908, it seems that we are extra lucky in that it does not cause a segfault akin to bazel test //examples/kuka_iiwa_arm:kuka_simulation_test when not linking targets directly to libdrake.so via cc_binary(..., srcs = ["...:libdrake.so"]):
https://github.com/RobotLocomotion/drake/compare/master...EricCousineau-TRI:issue/8908-repro-wip?expand=1#diff-9454df01e25d57f36c12f3b200dc2988
(EricCousineau-TRI@1067f19)

For this reason, we should maybe consider this a low priority pending resolution of #7294?

@EricCousineau-TRI EricCousineau-TRI self-assigned this May 31, 2018
@EricCousineau-TRI EricCousineau-TRI changed the title //bindings/pydrake/examples violate ODR //bindings/pydrake/examples violate ODR May 31, 2018
@jwnimmer-tri jwnimmer-tri self-assigned this Jun 28, 2018
@jwnimmer-tri
Copy link
Collaborator

If we have chosen to install pydrake libraries with these (and more) example plants, then it follows that we should also be installing the C++ flavor of the libraries as well. The correct solution here is to expand libdrake.so to include these plants, and then we can remove the incorrect cc_deps from the pydrake build rules for them.

The next step to make that happen is to make the library_lint also apply to the examples folders (currently they are all ignored); I'll work on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants