On 2025-02-18, Chris Lamb wrote:
> Whilst working on the Reproducible Builds effort [0], we noticed that
> onevpl-intel-gpu could not be built reproducibly.
>
> This is because the binary embeds the kernel version into one of the
> binaries via the MFX_BUILD_INFO macro:
>
> │ │ │ ├── ./usr/lib/x86_64-linux-gnu/libmfx-gen.so.1.2.13
...
> │ │ │ │ │ -mediasdk_build_info: Linux-6.12.9+bpo-amd64 6.12.9+bpo-amd64 | GNU 
> 14.2.0 | glibc 2.40
> │ │ │ │ │ +mediasdk_build_info: Linux-6.1.0-31-amd64 6.1.0-31-amd64 | GNU 
> 14.2.0 | glibc 2.40

> A patch is attached that ensures that this value is not passed to the
> compiler, resulting in "no build info" (via an #ifndef already in the
> code).
>
> An alternative approach is perhaps adding:
>
>    export DEB_CPPFLAGS_MAINT_APPEND = -DMFX_BUILD_INFO="no build info"
>
> ... to debian/rules, although this will result in "redefinition"
> warnings in the build log as it will cause multiple -DMFX_BUILD_INFO="[…]"
> comand-line arguments.

I *thought* this looked familiar!

  https://bugs.debian.org/1006455

With the newer upstream version, It looks like this can be easily fixed
in debian/rules with:

diff --git a/debian/rules b/debian/rules
index 47129d2..95146a9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,7 +7,8 @@
 override_dh_auto_configure:
        dh_auto_configure -- \
                -DBUILD_TESTS=ON \
-               -DBUILD_TOOLS=ON
+               -DBUILD_TOOLS=ON \
+               -DMFX_SYSTEM=Debian

 %:
        dh $@ --builddir build/

... or some other deterministic value for MFX_SYSTEM.

At the moment, tests.reproducible-builds.org is not varying the kernel
version, so it is not detecting this issue, but I can reproduce the
issue locally. As soon as someone tries to reproduce a build with a
slightly different kernel version, this will trigger the reproducibility
issue.

I would like to fix this by performing an NMU with the above patch,
unless the maintainers would like to tackle this some other way?

live well,
  vagrant

Attachment: signature.asc
Description: PGP signature

Reply via email to