Build fix: rpath of test libraries results in non-reproducible build
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 24 Oct 2022 14:53:40 +0000 (10:53 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 5 Jan 2023 23:53:04 +0000 (18:53 -0500)
commit95c830c4fddfeb13d020cf53a041934cc431c419
treec03de672003f32c577b9a63277cc0d5907fb64b9
parent318a73cce5c3e7a243c0d7f6a337c4aeb4bc6f6c
Build fix: rpath of test libraries results in non-reproducible build

Yocto has trouble making LTTng-tools builds reproducibile since
abs_builddir is used as the rpath of the test libraries under
tests/regression/ust/ust-dl/.

From their commit message:
  Specifing abs_builddir as an RPATH is plain wrong when cross
  compiling. Sadly, removing the rpath makes libtool/automake do weird
  things and breaks the build as shared libs are no longer generated.

  We already try and delete the RPATH at do_install with chrpath however
  that does leave the path in the string table so it doesn't help us
  with reproducibility.

Their fix consists in hardcoding /usr/lib as the rpath of those
libraries. As mentionned, the rpath doesn't matter; it's used to
workaround libtool's behaviour.

This fix uses `$libdir`, which takes the user's specified prefix into
account to generate an rpath that is consistent with the one inserted in
the other artifacts.

Note that the change in the notification tests is a bit more involved
since we have to bypass libtool to instrument a test application with
uprobes.

Fixes #1361

Change-Id: I7739956f8bc8571ef90802c3b37a4e1f21352385
Reported-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/kernel/test_userspace_probe
tests/regression/tools/notification/util_event_generator.sh
tests/regression/ust/ust-dl/Makefile.am
tests/utils/testapp/userspace-probe-elf-binary/Makefile.am
tests/utils/testapp/userspace-probe-sdt-binary/Makefile.am
This page took 0.027583 seconds and 4 git commands to generate.