Skip to content

Commit

Permalink
Use LD_LIBRARY_PATH to find the build tree artifacts
Browse files Browse the repository at this point in the history
The libtool wrapper scripts of the test binaries set LD_LIBRARY_PATH to
find the libknet library and its modules in the build tree, but RPATH
overrides this setting.  This is why RPATH is deprecated, so we switch
to RUNPATH instead by using --enable-new-dtags, which is already the
linker default on Debian ustable for example.
  • Loading branch information
wferi committed Jan 18, 2018
1 parent 1d4f9b0 commit 54af866
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libknet/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ EXTRA_libknet_la_DEPENDENCIES = $(SYMFILE)
libknet_la_LDFLAGS = -Wl,--version-script=$(srcdir)/$(SYMFILE) \
--export-dynamic \
-Wl,-rpath=$(pkglibdir) \
-Wl,--enable-new-dtags \
-version-number $(libversion)

libknet_la_LIBADD = $(PTHREAD_LIBS) $(dl_LIBS) $(rt_LIBS) $(m_LIBS)
Expand Down

0 comments on commit 54af866

Please sign in to comment.