[PATCH 1/2] build: fix DSO dependencies

Felipe Contreras felipe.contreras at gmail.com
Fri Oct 29 16:16:46 PDT 2010


From: Carl Worth <cworth at cworth.org>

At least on Fedora 13, this doesn't link; the linker finds the
dependencies, and aborts saying we should include them.

/usr/bin/ld: gmime-filter-reply.o: undefined reference to symbol 'g_mime_filter_set_size'
/usr/bin/ld: note: 'g_mime_filter_set_size' is defined in DSO /usr/lib/libgmime-2.6.so.0 so try adding it to the linker command line
/usr/lib/libgmime-2.6.so.0: could not read symbols: Invalid operation

We do need to link at least to what we really use, the linker resolves
the dependencies of our dependencies at loading time.

For more information, see:
https://fedoraproject.org/wiki/UnderstandingDSOLinkChange

Reported by Felipe Contreras, rewrote by Carl Worth.

Signed-off-by: Felipe Contreras <felipe.contreras at gmail.com>
---
 Makefile.local |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile.local b/Makefile.local
index bc61a3c..9fed725 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -31,7 +31,7 @@ GPG_FILE=$(SHA1_FILE).asc
 # Smash together user's values with our extra values
 FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CFLAGS) $(WARN_CFLAGS) $(CONFIGURE_CFLAGS) $(extra_cflags)
 FINAL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(CONFIGURE_CXXFLAGS) $(extra_cflags) $(extra_cxxflags)
-FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Llib -lnotmuch
+FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Llib -lnotmuch $(GMIME_LDFLAGS) $(TALLOC_LDFLAGS)
 FINAL_NOTMUCH_LINKER = CC
 ifneq ($(LINKER_RESOLVES_LIBRARY_DEPENDENCIES),1)
 FINAL_NOTMUCH_LDFLAGS += $(CONFIGURE_LDFLAGS)
-- 
1.7.3.2.2.g0dc5c



More information about the notmuch mailing list