Repository navigation
tools/ceph-dencoder: drop unused link dependencies - #73958
Conversation
Doracly
left a comment
There was a problem hiding this comment.
Thanks, this is the better fix; I've closed #71814 in favour of it.
Tested on top of #72620 with GCC 15.2 and Clang 21.1 × ld.bfd 2.46, lld 21.1.8 and mold 2.40.4: ceph-dencoder links in all six combinations and check-generated.sh passes. With ld.bfd and lld, the executable is byte-identical with and without this PR.
Two nits on the commit message:
8da660fe8aeis the pre-merge copy of the plugin split; on main it is 2d3c656.- "Mold pulls in their client code anyway" is rui314/mold#1657, fixed in mold 3.0.0. Naming it would make clear that bfd and lld never pulled in these members.
Optional: ${DENCODER_EXTRALIBS} (set nowhere) and $<TARGET_OBJECTS:common_texttable_obj> (TextTable is in libceph-common) are also dead since the plugin split and could go in the same hunk; both removals pass the same six builds.
The "Verify Checklist" check needs a ticked box.
Building ceph-dencoder with older mold versions fails:
mold: error: undefined symbol:
librados::v14_2_0::ObjectOperation::ObjectOperation()
>>> referenced by cls_log_client.cc
2d3c656 ("tools/ceph-dencoder: build dencoders as plugins")
moved the type handlers into denc-mod-*.so, but left four cls client
libraries on the executable's link line. The executable no longer
uses them.
Older mold versions can extract unused archive members to satisfy
versioned references from shared libraries. The extracted client code
then needs librados. This is rui314/mold#1657, fixed in mold 3.0.0:
rui314/mold#1657
GNU ld and lld do not extract those members.
Drop the four libraries from the executable's link line. The plugins
link their own dependencies. Also drop DENCODER_EXTRALIBS, which has
not been set since the plugin split, and the unused TextTable object.
ceph-dencoder then links with mold, and check-generated.sh passes.
Signed-off-by: Kefu Chai <[email protected]>
35128d3 to
ac4f5ee
Compare
|
@Doracly thanks for your review. all addressed. PTAL. |
Doracly
left a comment
There was a problem hiding this comment.
LGTM.
Just one minor nitpick, which I don't really know whether it does any harm:
The PR title ("drop unused cls client libraries") doesn't match the commit subject ("drop unused link dependencies"), and the title is what goes into the merge commit.
|
changed. i don't feel strong either way. |
Building ceph-dencoder with mold fails:
8da660f ("tools/ceph-dencoder: build dencoders as plugins") moved the type handlers into denc-mod-*.so, but left four cls client libraries on the executable's link line. The executable no longer uses them. Mold pulls in their client code anyway, and that code needs librados.
Drop the four libraries from the executable's link line. The plugins link their own dependencies. ceph-dencoder then links with mold, and check-generated.sh passes.
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.