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>
Wed, 26 Oct 2022 19:42:08 +0000 (15:42 -0400)
commit6b979fc6dd8c03ed8332bdef2915b9d6d3ecfd6a
treed2eeb5704811baeb38debe98cee73d4a3e1dd15b
parenta12fbf640489be17c800edc1fba9f926b8a1ab8b
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.025879 seconds and 4 git commands to generate.