From Fedora Project Wiki


CMake: enable DCMAKE_SKIP_INSTALL_RPATH

This is a proposed Change for Fedora Linux.
This document represents a proposed Change. As part of the Changes process, proposals are publicly announced in order to receive community feedback. This proposal will only be implemented if approved by the Fedora Engineering Steering Committee.

Summary

enable the DCMAKE_SKIP_INSTALL_RPATH in the %cmake macro

Owner


Current status

  • Targeted release: Fedora Linux 43
  • Last updated: 2025-05-02
  • FESCo issue: <will be assigned by the Wrangler>
  • Tracker bug: <will be assigned by the Wrangler>
  • Release notes tracker: <will be assigned by the Wrangler>

Detailed Description

as we know, using rpaths is against the rules. this change may allow newer packages to reduce confusion when their packages get flagged for the above issue.

Migration

Compatibility with fedora releases

Benefit to Fedora

  • reduced confusion for new contributors

Scope

  • Proposal owners:
    • enable the CMAKE_SKIP_INSTALL_RPATH flag
    • Request that packages that need to opt out add the CMAKE_SKIP_INSTALL_RPATH=OFF flag to their spec files
    • Investigate the edge-cases that are not covered in Migration
  • Other developers:
    • You may want to add/ remove the CMAKE_SKIP_INSTALL_RPATH in your spec file
  • Policies and guidelines: N/A (not needed for this Change)

Upgrade/compatibility impact

Affected packages would be FTBFS (in the tracked copr repo) and would require patching before the corresponding cmake PR can be merged.



How To Test

A copr repo will be provided with the flag enabled Use it to try local builds, e.g. using:

 copr mock-config solomoncyj/cmake-rpth-testing/ fedora-rawhide-x86_64

If the build is successful, that should be sufficient.

you may also manually enable the flag CMAKE_SKIP_INSTALL_RPATH=1 and perform a mock build locally. Don't not push your commit to dist-git, tho.


Dependencies

Contingency Plan

  • Contingency mechanism: add the flag CMAKE_SKIP_INSTALL_RPATH=OFF to projects that are not building after mass rebuild after this pr is merged
  • Contingency deadline: No deadline necessary yet
  • Blocks release? No


Release Notes