On 2022-11-22, Victor Westerhuis wrote:
> Stripping the rpath from the Python extension makes its BuildId
> reproducible. The extension still works and both arch:all and arch:any
> builds succeed locally.
...
> diff --git a/debian/rules b/debian/rules
> index b4d654102..6bd845023 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -151,6 +151,7 @@ override_dh_auto_configure:
>               -- --name=opencv --system=custom --configure-args "\
>                       dh_auto_configure -S cmake -D modules/python -B 
> {build_dir} -- \
>                               -GNinja \
> +                             -DCMAKE_SKIP_RPATH=ON \
>                               -DOpenCV_BINARY_DIR=$(CURDIR)/$(BUILDDIR) \
>                               
> -DOPENCV_PYTHON_STANDALONE_INSTALL_PATH={install_dir} \
>                               -DOPENCV_SKIP_PYTHON_LOADER=ON \

I would recommend using -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON instead of
-DCMAKE_SKIP_RPATH=ON.

This is the default behavior with (the currently experimental) debhelper
compat level 14. A little more detail on the issue is available here:

  
https://tests.reproducible-builds.org/debian/issues/unstable/cmake_rpath_contains_build_path_issue.html

The main advantage of CMAKE_BUILD_RPATH_USE_ORIGIN is it is more likely
to work with test suites that depend on the full path.

live well,
  vagrant

Attachment: signature.asc
Description: PGP signature

Reply via email to