[notmuch] Notmuch shared library

Michal Sojka sojkam1 at fel.cvut.cz
Thu Apr 1 04:10:07 PDT 2010


On Thu, 01 Apr 2010, Carl Worth wrote:
> Finally, I'm a tiny bit annoyed that now after a fresh checkout of
> notmuch and "make" that one can't easily run ./notmuch without either
> installing the library (or fiddling with LD_LIBRARY_PATH). I've got some
> ideas on how to simplify that, but I'm not sure if any are good or worth
> it.

Hi,

this can be solved by the following patch, but I don't know how portable
it is. You can see the efect of this by

$ objdump -x notmuch|grep RPATH

diff --git a/Makefile.local b/Makefile.local
index 32b8f4a..2a1b55d 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -20,7 +20,7 @@ extra_cxxflags :=
 # Smash together user's values with our extra values
 FINAL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(CONFIGURE_CFLAGS) $(extra_cflags)
 FINAL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(CONFIGURE_CXXFLAGS) $(extra_cflags) $(extra_cxxflags)
-FINAL_LDFLAGS = $(LDFLAGS) $(CONFIGURE_LDFLAGS)
+FINAL_LDFLAGS = $(LDFLAGS) $(CONFIGURE_LDFLAGS) -Wl,-rpath,\$$ORIGIN/lib -z origin --enable-new-dtags
 
 all: notmuch notmuch.1.gz
 ifeq ($(MAKECMDGOALS),)

--Michal


More information about the notmuch mailing list