https://bugzilla.redhat.com/show_bug.cgi?id=2213078 --- Comment #8 from shenlebantongying <shenlebantongying@xxxxxxxxx> --- > - rpmlint warning: unused-direct-shlib-dependency could be fixed by patching the CMake files to pass the as-needed flag for the fmt library, see https://stackoverflow.com/a/65819681 (this patch should be suggested upstream) The unused-direct-shlib-dependency only reads `ldd -u` Adding the `--as-needed` as suggested by the StackOverflow answer will erase direct linking to `libfmt.so` in the `Release` build. The fmt does use things like constexpr aggressively. I suspect they are optimized away entirely. The CMakeLists.txt does not include anything that modifies linker options. Most distros have --as-needed enabled by default, so I don't think adding it to CMakeLists.txt is necessary. CMake does read the value of LDFLAGS https://cmake.org/cmake/help/latest/envvar/LDFLAGS.html . I think something else is wrong, causing this flag to be ineffective. -- You are receiving this mail because: You are on the CC list for the bug. You are always notified about changes to this product and component https://bugzilla.redhat.com/show_bug.cgi?id=2213078 Report this comment as SPAM: https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202213078%23c8 _______________________________________________ package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue