Some modern distros (Mageia, Mandriva) use -no-undefined as a default
linker flag for building software. However, undefined symbols are OK if
the binary being linked is a plugin. To detect plugins, build system
looks for presence of "-module" libtool flag in makefiles.

There are two libraries in Pigeonhole that couldn't be linked with
-no-undefined:

src/lib-sieve/plugins/mailbox/libsieve_ext_mailbox.la
src/lib-sieve/libdovecot-sieve.la

These modules do contain undefined symbols, but they are not linked
against library that provides them. It would be good if corresponding
makefiles contained "-module" flags, so that build system could
selectively turn off that -no-undefined linker flag. Please see proposed
patch (attached).

Thanks,
Dimitri
Mageia Linux packager

--- src/lib-sieve/Makefile.am~	2012-09-18 23:25:44.000000000 +0400
+++ src/lib-sieve/Makefile.am	2012-12-22 05:45:24.504324809 +0400
@@ -72,6 +72,7 @@
 
 libdovecot_sieve_la_DEPENDENCIES = $(plugins) $(LIBDOVECOT_LDA_DEPS)
 libdovecot_sieve_la_LIBADD = $(plugins) $(LIBDOVECOT) $(LIBDOVECOT_LDA)
+libdovecot_sieve_la_LDFLAGS = -module
 
 libdovecot_sieve_la_SOURCES = \
 	rfc2822.c \
--- src/lib-sieve/plugins/mailbox/Makefile.am~	2012-08-12 17:38:16.000000000 +0400
+++ src/lib-sieve/plugins/mailbox/Makefile.am	2012-12-22 05:44:52.116540024 +0400
@@ -15,5 +15,7 @@
 	$(tests) \
 	ext-mailbox.c
 
+libsieve_ext_mailbox_la_LDFLAGS = -module
+
 noinst_HEADERS = \
 	ext-mailbox-common.h

Reply via email to