https://sourceware.org/bugzilla/show_bug.cgi?id=32929

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at klomp dot org

--- Comment #1 from Mark Wielaard <mark at klomp dot org> ---
That is interesting. The test is linked against the system libelf. But it
really should be linked against the just build libelf. I assume nobody else saw
this because libelf is always installed. But you see this because in your
(NixOS) environment you have a totally clean "buildroot".

I think you are right, for these test binaries we'll need to add an RPATH.
Does the following work for you?

diff --git a/libdw/Makefile.am b/libdw/Makefile.am
index f024d6524095..298b0c65b972 100644
--- a/libdw/Makefile.am
+++ b/libdw/Makefile.am
@@ -168,7 +168,8 @@ MAINTAINERCLEANFILES = $(srcdir)/known-dwarf.h
 check_PROGRAMS = dwarf_srclang_check
 TESTS = $(check_PROGRAMS)

-CHECK_DEF_FLAGS = $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-DMAIN_CHECK=1
+CHECK_DEF_FLAGS = $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) \
+       -Wl,-rpath,../libelf -DMAIN_CHECK=1

 .SECONDEXPANSION:
 dwarf_srclang_check$(EXEEXT): $$(filter-out $$(subst
_check,,$$@).o,$(libdw_a_OBJECTS)) $$(subst _check,,$$@).c

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to