Bug#1024638: opencv: embeds build path in Python extension

Vagrant Cascadian vagrant at reproducible-builds.org
Tue Nov 22 18:56:07 GMT 2022


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
-------------- 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/debian-science-maintainers/attachments/20221122/6e8e728a/attachment.sig>


More information about the debian-science-maintainers mailing list