link error

classic Classic list List threaded Threaded
3 messages Options
Peter Wang-2 Peter Wang-2
Reply | Threaded
Open this post in threaded view
|

link error

Hi,

Linking fails on my system for some reason (undefined references to
talloc functions).  Putting $(LDFLAGS) after the object list solves it.

Peter

diff --git a/Makefile.local b/Makefile.local
index 27e42ba..c2fbe21 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -18,7 +18,7 @@ notmuch_client_srcs = \
 
 notmuch_client_modules = $(notmuch_client_srcs:.c=.o)
 notmuch: $(notmuch_client_modules) lib/notmuch.a
- $(CXX) $(LDFLAGS) $^ -o $@
+ $(CXX) $^ $(LDFLAGS) -o $@
 
 notmuch.1.gz: notmuch.1
  gzip --stdout notmuch.1 > notmuch.1.gz


James Rowe James Rowe
Reply | Threaded
Open this post in threaded view
|

Re: link error

* Peter Wang ([hidden email]) wrote:
> Linking fails on my system for some reason (undefined references to
> talloc functions).  Putting $(LDFLAGS) after the object list solves it.

  I have a similar ordering change in the ebuild I posted earlier as
a workaround for people using ld's --as-needed option.

Thanks,

James


Carl Worth-2 Carl Worth-2
Reply | Threaded
Open this post in threaded view
|

Re: link error

In reply to this post by Peter Wang-2
On Thu, 19 Nov 2009 19:13:35 +1100, Peter Wang <[hidden email]> wrote:
> Linking fails on my system for some reason (undefined references to
> talloc functions).  Putting $(LDFLAGS) after the object list solves
> it.

Thanks Peter.

I've pushed this now.

-Carl