Bug#962474: CMAKE_SKIP_RPATH=ON improves reproducibility of CMake builds
Vagrant Cascadian
vagrant at reproducible-builds.org
Mon Jun 29 17:37:37 BST 2020
On 2020-06-29, Vagrant Cascadian wrote:
> On 2020-06-29, Timo Röhling wrote:
>>>> By default, CMake adds an RPATH entry to ELF binaries and deletes it
>>>> again at install time. However, due to the limitations of some
>>>> platforms, CMake will actually zero out the RPATH entry in the binary,
>>>> leaking the original path length and thus making the build not
>>>> reproducible (see the attached diffoscope output for an example).
>>>>
>>>> CMAKE_SKIP_RPATH disables the RPATH machinery and fixes the issue, and
>>>> since most package won't ever ship with an RPATH entry anyway, I propose
>>>> adding -DCMAKE_SKIP_RPATH=ON to the default build options.
>>> Thanks for the suggestion.
>
> Thanks for identifying the issue!
>
>
>>> Has this proposal been tested on an archive-wide rebuild test to see how
>>> much breaks with this option set?
>> I don't know, but I don't think so. I'm not directly involved with the
>> Reproducible Builds Team, I just pinged them on IRC after I filed this
>> bug. Cc'ing them now.
>
> There is currently only one package tagged with:
>
> https://tests.reproducible-builds.org/debian/issues/unstable/cmake_rpath_contains_build_path_issue.html
Also worth mentioning the upstream issue:
https://gitlab.kitware.com/cmake/cmake/-/issues/18413
live well,
vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/reproducible-bugs/attachments/20200629/6f63f5c4/attachment.sig>
More information about the Reproducible-bugs
mailing list