[PATCH] build: fix order of rpath

2014-05-28 Thread David Bremner
Felipe Contreras  writes:

> In my system `pkg-config --libs talloc` returns
> 'Wl,-rpath,/usr/lib -ltalloc' (probably wrongly) which causes the final
> LDFLAGS to be something like '-Wl,-rpath,/usr/lib
> -Wl,-rpath,/opt/notmuch/lib', which causes the RUNPATH to be
> '/usr/lib:/opt/notmuch/lib', so basically defeating the whole purpose of
> RUNPATH.

pushed to release and master.

d


Re: [PATCH] build: fix order of rpath

2014-05-28 Thread David Bremner
Felipe Contreras  writes:

> In my system `pkg-config --libs talloc` returns
> 'Wl,-rpath,/usr/lib -ltalloc' (probably wrongly) which causes the final
> LDFLAGS to be something like '-Wl,-rpath,/usr/lib
> -Wl,-rpath,/opt/notmuch/lib', which causes the RUNPATH to be
> '/usr/lib:/opt/notmuch/lib', so basically defeating the whole purpose of
> RUNPATH.

pushed to release and master.

d
___
notmuch mailing list
[email protected]
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] build: fix order of rpath

2014-05-12 Thread Tomi Ollila
On Mon, May 12 2014, Felipe Contreras  wrote:

> In my system `pkg-config --libs talloc` returns
> 'Wl,-rpath,/usr/lib -ltalloc' (probably wrongly) which causes the final
> LDFLAGS to be something like '-Wl,-rpath,/usr/lib
> -Wl,-rpath,/opt/notmuch/lib', which causes the RUNPATH to be
> '/usr/lib:/opt/notmuch/lib', so basically defeating the whole purpose of
> RUNPATH.
>
> I noticed this when my /opt/notmuch/bin/notmuch (0.17) started updating
> the database after I updated the system (which updated the system's
> notmuch). This shouldn't happen.
>
> Let's move the RUNPATH flags before other external flags have a chance of
> screwing the build.
>
> Signed-off-by: Felipe Contreras 
> ---

LGTM. Works for me (i.e. did not break my RPATH setting for notmuch-shared 
binary.

Tomi


>  Makefile.local | 9 +
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/Makefile.local b/Makefile.local
> index fa07d81..af79b5c 100644
> --- a/Makefile.local
> +++ b/Makefile.local
> @@ -46,15 +46,16 @@ PV_FILE=bindings/python/notmuch/version.py
>  # Smash together user's values with our extra values
>  FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CPPFLAGS) $(CFLAGS) 
> $(WARN_CFLAGS) $(extra_cflags) $(CONFIGURE_CFLAGS)
>  FINAL_CXXFLAGS = $(CPPFLAGS) $(CXXFLAGS) $(WARN_CXXFLAGS) $(extra_cflags) 
> $(extra_cxxflags) $(CONFIGURE_CXXFLAGS)
> -FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lutil -Llib -lnotmuch 
> $(AS_NEEDED_LDFLAGS) $(GMIME_LDFLAGS) $(TALLOC_LDFLAGS) $(ZLIB_LDFLAGS)
> +FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lutil -Llib -lnotmuch
> +ifeq ($(LIBDIR_IN_LDCONFIG),0)
> +FINAL_NOTMUCH_LDFLAGS += $(RPATH_LDFLAGS)
> +endif
> +FINAL_NOTMUCH_LDFLAGS += $(AS_NEEDED_LDFLAGS) $(GMIME_LDFLAGS) 
> $(TALLOC_LDFLAGS) $(ZLIB_LDFLAGS)
>  FINAL_NOTMUCH_LINKER = CC
>  ifneq ($(LINKER_RESOLVES_LIBRARY_DEPENDENCIES),1)
>  FINAL_NOTMUCH_LDFLAGS += $(CONFIGURE_LDFLAGS)
>  FINAL_NOTMUCH_LINKER = CXX
>  endif
> -ifeq ($(LIBDIR_IN_LDCONFIG),0)
> -FINAL_NOTMUCH_LDFLAGS += $(RPATH_LDFLAGS)
> -endif
>  FINAL_LIBNOTMUCH_LDFLAGS = $(LDFLAGS) $(AS_NEEDED_LDFLAGS) 
> $(CONFIGURE_LDFLAGS)
>  
>  .PHONY: all
> -- 
> 1.9.2+fc1~45~g3953d93
>
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] build: fix order of rpath

2014-05-12 Thread Tomi Ollila
On Mon, May 12 2014, Felipe Contreras  wrote:

> In my system `pkg-config --libs talloc` returns
> 'Wl,-rpath,/usr/lib -ltalloc' (probably wrongly) which causes the final
> LDFLAGS to be something like '-Wl,-rpath,/usr/lib
> -Wl,-rpath,/opt/notmuch/lib', which causes the RUNPATH to be
> '/usr/lib:/opt/notmuch/lib', so basically defeating the whole purpose of
> RUNPATH.
>
> I noticed this when my /opt/notmuch/bin/notmuch (0.17) started updating
> the database after I updated the system (which updated the system's
> notmuch). This shouldn't happen.
>
> Let's move the RUNPATH flags before other external flags have a chance of
> screwing the build.
>
> Signed-off-by: Felipe Contreras 
> ---

LGTM. Works for me (i.e. did not break my RPATH setting for notmuch-shared 
binary.

Tomi


>  Makefile.local | 9 +
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/Makefile.local b/Makefile.local
> index fa07d81..af79b5c 100644
> --- a/Makefile.local
> +++ b/Makefile.local
> @@ -46,15 +46,16 @@ PV_FILE=bindings/python/notmuch/version.py
>  # Smash together user's values with our extra values
>  FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CPPFLAGS) $(CFLAGS) 
> $(WARN_CFLAGS) $(extra_cflags) $(CONFIGURE_CFLAGS)
>  FINAL_CXXFLAGS = $(CPPFLAGS) $(CXXFLAGS) $(WARN_CXXFLAGS) $(extra_cflags) 
> $(extra_cxxflags) $(CONFIGURE_CXXFLAGS)
> -FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lutil -Llib -lnotmuch 
> $(AS_NEEDED_LDFLAGS) $(GMIME_LDFLAGS) $(TALLOC_LDFLAGS) $(ZLIB_LDFLAGS)
> +FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lutil -Llib -lnotmuch
> +ifeq ($(LIBDIR_IN_LDCONFIG),0)
> +FINAL_NOTMUCH_LDFLAGS += $(RPATH_LDFLAGS)
> +endif
> +FINAL_NOTMUCH_LDFLAGS += $(AS_NEEDED_LDFLAGS) $(GMIME_LDFLAGS) 
> $(TALLOC_LDFLAGS) $(ZLIB_LDFLAGS)
>  FINAL_NOTMUCH_LINKER = CC
>  ifneq ($(LINKER_RESOLVES_LIBRARY_DEPENDENCIES),1)
>  FINAL_NOTMUCH_LDFLAGS += $(CONFIGURE_LDFLAGS)
>  FINAL_NOTMUCH_LINKER = CXX
>  endif
> -ifeq ($(LIBDIR_IN_LDCONFIG),0)
> -FINAL_NOTMUCH_LDFLAGS += $(RPATH_LDFLAGS)
> -endif
>  FINAL_LIBNOTMUCH_LDFLAGS = $(LDFLAGS) $(AS_NEEDED_LDFLAGS) 
> $(CONFIGURE_LDFLAGS)
>  
>  .PHONY: all
> -- 
> 1.9.2+fc1~45~g3953d93
>
> ___
> notmuch mailing list
> [email protected]
> http://notmuchmail.org/mailman/listinfo/notmuch
___
notmuch mailing list
[email protected]
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] build: fix order of rpath

2014-05-11 Thread Felipe Contreras
In my system `pkg-config --libs talloc` returns
'Wl,-rpath,/usr/lib -ltalloc' (probably wrongly) which causes the final
LDFLAGS to be something like '-Wl,-rpath,/usr/lib
-Wl,-rpath,/opt/notmuch/lib', which causes the RUNPATH to be
'/usr/lib:/opt/notmuch/lib', so basically defeating the whole purpose of
RUNPATH.

I noticed this when my /opt/notmuch/bin/notmuch (0.17) started updating
the database after I updated the system (which updated the system's
notmuch). This shouldn't happen.

Let's move the RUNPATH flags before other external flags have a chance of
screwing the build.

Signed-off-by: Felipe Contreras 
---
 Makefile.local | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/Makefile.local b/Makefile.local
index fa07d81..af79b5c 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -46,15 +46,16 @@ PV_FILE=bindings/python/notmuch/version.py
 # Smash together user's values with our extra values
 FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CPPFLAGS) $(CFLAGS) 
$(WARN_CFLAGS) $(extra_cflags) $(CONFIGURE_CFLAGS)
 FINAL_CXXFLAGS = $(CPPFLAGS) $(CXXFLAGS) $(WARN_CXXFLAGS) $(extra_cflags) 
$(extra_cxxflags) $(CONFIGURE_CXXFLAGS)
-FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lutil -Llib -lnotmuch 
$(AS_NEEDED_LDFLAGS) $(GMIME_LDFLAGS) $(TALLOC_LDFLAGS) $(ZLIB_LDFLAGS)
+FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lutil -Llib -lnotmuch
+ifeq ($(LIBDIR_IN_LDCONFIG),0)
+FINAL_NOTMUCH_LDFLAGS += $(RPATH_LDFLAGS)
+endif
+FINAL_NOTMUCH_LDFLAGS += $(AS_NEEDED_LDFLAGS) $(GMIME_LDFLAGS) 
$(TALLOC_LDFLAGS) $(ZLIB_LDFLAGS)
 FINAL_NOTMUCH_LINKER = CC
 ifneq ($(LINKER_RESOLVES_LIBRARY_DEPENDENCIES),1)
 FINAL_NOTMUCH_LDFLAGS += $(CONFIGURE_LDFLAGS)
 FINAL_NOTMUCH_LINKER = CXX
 endif
-ifeq ($(LIBDIR_IN_LDCONFIG),0)
-FINAL_NOTMUCH_LDFLAGS += $(RPATH_LDFLAGS)
-endif
 FINAL_LIBNOTMUCH_LDFLAGS = $(LDFLAGS) $(AS_NEEDED_LDFLAGS) $(CONFIGURE_LDFLAGS)

 .PHONY: all
-- 
1.9.2+fc1~45~g3953d93



[PATCH] build: fix order of rpath

2014-05-11 Thread Felipe Contreras
In my system `pkg-config --libs talloc` returns
'Wl,-rpath,/usr/lib -ltalloc' (probably wrongly) which causes the final
LDFLAGS to be something like '-Wl,-rpath,/usr/lib
-Wl,-rpath,/opt/notmuch/lib', which causes the RUNPATH to be
'/usr/lib:/opt/notmuch/lib', so basically defeating the whole purpose of
RUNPATH.

I noticed this when my /opt/notmuch/bin/notmuch (0.17) started updating
the database after I updated the system (which updated the system's
notmuch). This shouldn't happen.

Let's move the RUNPATH flags before other external flags have a chance of
screwing the build.

Signed-off-by: Felipe Contreras 
---
 Makefile.local | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/Makefile.local b/Makefile.local
index fa07d81..af79b5c 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -46,15 +46,16 @@ PV_FILE=bindings/python/notmuch/version.py
 # Smash together user's values with our extra values
 FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CPPFLAGS) $(CFLAGS) 
$(WARN_CFLAGS) $(extra_cflags) $(CONFIGURE_CFLAGS)
 FINAL_CXXFLAGS = $(CPPFLAGS) $(CXXFLAGS) $(WARN_CXXFLAGS) $(extra_cflags) 
$(extra_cxxflags) $(CONFIGURE_CXXFLAGS)
-FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lutil -Llib -lnotmuch 
$(AS_NEEDED_LDFLAGS) $(GMIME_LDFLAGS) $(TALLOC_LDFLAGS) $(ZLIB_LDFLAGS)
+FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lutil -Llib -lnotmuch
+ifeq ($(LIBDIR_IN_LDCONFIG),0)
+FINAL_NOTMUCH_LDFLAGS += $(RPATH_LDFLAGS)
+endif
+FINAL_NOTMUCH_LDFLAGS += $(AS_NEEDED_LDFLAGS) $(GMIME_LDFLAGS) 
$(TALLOC_LDFLAGS) $(ZLIB_LDFLAGS)
 FINAL_NOTMUCH_LINKER = CC
 ifneq ($(LINKER_RESOLVES_LIBRARY_DEPENDENCIES),1)
 FINAL_NOTMUCH_LDFLAGS += $(CONFIGURE_LDFLAGS)
 FINAL_NOTMUCH_LINKER = CXX
 endif
-ifeq ($(LIBDIR_IN_LDCONFIG),0)
-FINAL_NOTMUCH_LDFLAGS += $(RPATH_LDFLAGS)
-endif
 FINAL_LIBNOTMUCH_LDFLAGS = $(LDFLAGS) $(AS_NEEDED_LDFLAGS) $(CONFIGURE_LDFLAGS)
 
 .PHONY: all
-- 
1.9.2+fc1~45~g3953d93

___
notmuch mailing list
[email protected]
http://notmuchmail.org/mailman/listinfo/notmuch