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

[tools] Link ignition-math statically #15600

Merged
merged 1 commit into from
Aug 20, 2021

Conversation

jwnimmer-tri
Copy link
Collaborator

@jwnimmer-tri jwnimmer-tri commented Aug 11, 2021

It was an oddball in terms of being a shared library. Most all of our other private dependencies are currently being linked statically. For simplicity, we prefer that the only dependencies linked as shared are either public dependencies (such as spdlog) and/or LGPL'd (such as lcm).

Partially reverts #7622.

Tested locally that:

  • ls -l bazel-bin/external/ignition_math/libdrake_ignition_math.so shows a non-empty size
  • The installed copy of lib/libdrake_ignition_math.so after a bazel run //:install shows a non-empty size.
  • The ignition headers and cmake config file are still being installed.

This change is Reviewable

@jwnimmer-tri jwnimmer-tri force-pushed the ign-math-static branch 2 times, most recently from 2ebbd15 to 6f5b5ea Compare August 11, 2021 17:55
@jwnimmer-tri jwnimmer-tri changed the title [tools] Link ignition-math hidden and statically [tools] Link ignition-math statically Aug 11, 2021
It was an oddball in terms of being a shared library.

TBD This is breaking change, in that it's no longer exported for downstream
projects to build against.
@jwnimmer-tri jwnimmer-tri marked this pull request as ready for review August 18, 2021 16:06
@jwnimmer-tri
Copy link
Collaborator Author

@drake-jenkins-bot mac-catalina-clang-bazel-experimental-release please

@jwnimmer-tri
Copy link
Collaborator Author

+@rpoyner-tri for feature review, please?

Copy link
Contributor

@rpoyner-tri rpoyner-tri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 5 files at r1, 4 of 4 files at r2, all commit messages.
Reviewable status: LGTM missing from assignee rpoyner-tri(platform), needs at least two assigned reviewers (waiting on @jwnimmer-tri)

Copy link
Contributor

@rpoyner-tri rpoyner-tri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: needs at least two assigned reviewers (waiting on @jwnimmer-tri)

@SeanCurtis-TRI SeanCurtis-TRI self-assigned this Aug 20, 2021
Copy link
Contributor

@SeanCurtis-TRI SeanCurtis-TRI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+@SeanCurtis-TRI

Reviewable status: LGTM missing from assignee SeanCurtis-TRI(platform) (waiting on @SeanCurtis-TRI)

Copy link
Contributor

@SeanCurtis-TRI SeanCurtis-TRI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:LGTM:

Reviewed 2 of 5 files at r1, 2 of 4 files at r2, all commit messages.
Reviewable status: :shipit: complete! all discussions resolved, LGTM from assignees rpoyner-tri(platform),SeanCurtis-TRI(platform) (waiting on @jwnimmer-tri)


tools/workspace/ignition_math/package.BUILD.bazel, line 237 at r2 (raw file):

    }),
    linkshared = 1,
    linkstatic = 1,

BTW For my own edification, what is the implication of simultaneously declaring linkshared and linkstatic?

Copy link
Collaborator Author

@jwnimmer-tri jwnimmer-tri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! all discussions resolved, LGTM from assignees rpoyner-tri(platform),SeanCurtis-TRI(platform) (waiting on @jwnimmer-tri)


tools/workspace/ignition_math/package.BUILD.bazel, line 237 at r2 (raw file):

Previously, SeanCurtis-TRI (Sean Curtis) wrote…

BTW For my own edification, what is the implication of simultaneously declaring linkshared and linkstatic?

https://docs.bazel.build/versions/4.2.0/be/c-cpp.html#cc_binary.linkshared

"linkshared" means to create a shared library.

"linkstatic" means that the deps should come in as *.a files (object code copied into the new *.so), not as references to more *.so files.

@jwnimmer-tri jwnimmer-tri merged commit 4a0860a into RobotLocomotion:master Aug 20, 2021
@jwnimmer-tri jwnimmer-tri deleted the ign-math-static branch August 20, 2021 16:15
@jwnimmer-tri jwnimmer-tri added the release notes: newly deprecated This pull request contains new deprecations label Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low release notes: newly deprecated This pull request contains new deprecations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants