[WIP] Spike test using shared libraries rather than static linking #7616
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relates #7294 / #6760:
This is a (semi-)quick test of having Drake use shared libraries, rather than rely on static linking, trying to skip waiting on bazelbuild/bazel#492, using one of the suggested workarounds.
Pros:
master
, doing an install in debug mode yieldslibdrake.so
of about 1.6GB (per Francois's findings)libdrake.so
is about 2MB.Cons:
linkshared
causes any upstream libraries that have any bit of object code to be linked as Bazel-mangled shared objects. This sucks when working with externals, because I had to either have to shim them using (a) the workaround from 492, or (b) create a "barrier" library to intercept thelinkstatic
seems to be catered to how a library is consumed, rather than produced. Maybe there's a better balance oflinkstatic
andlinkshared
that I missed.pydrake
after installing.I tested the installed libraries with the following command:
When running
bazel --bazelrc=/dev/null test //...
, all but 15 tests pass:libdrake-automotive-maliput-dragway-dragway.so
- could be fixed quickly?)rgbd_camera_test
- Same things as what's in the FAQ, I believe.I wouldn't say this is anywhere near ready for prime time, but an initial attempt.
\cc @jwnimmer-tri @jamiesnape @fbudin69500 @stonier
This change is