Hi,
Running doveadm on Alpine Linux will show various underlinking errors:
/usr/bin/doveadm: symbol 'acl_user_module': can't resolve symbol in
lib '/usr/lib/dovecot/doveadm/lib10_doveadm_acl_plugin.so'.
/usr/bin/doveadm: symbol 'acl_identifier_parse': can't resolve
symbol
in lib '/usr/lib/dovecot/doveadm/lib10_doveadm_acl_plugin.so'.
...
(complete list is found here: http://bugs.alpinelinux.org/issues/1274)
I understand that those are "harmless" (at least as long as you dont
use those plugins), and even if some dynamic linkers are forgiving,
the doveadm plugin modules are technically underlinked.
The lib10_doveadm_acl_plugin.so uses symbol acl_user_module:
$ nm -D /usr/lib/dovecot/doveadm/lib10_doveadm_acl_plugin.so | grep
acl_user_module
U acl_user_module
That symbol is defined in lib01_acl_plugin.so:
$ nm -D /usr/lib/dovecot/lib01_acl_plugin.so | grep acl_user_module
000000000020fb80 D acl_user_module
Which means that lib10_doveadm_acl_plugin.so should be directly linked
to lib01_acl_plugin.so. But it is not:
$ readelf -d /usr/lib/dovecot/doveadm/lib10_doveadm_acl_plugin.so | grep NEEDED
0x0000000000000001 (NEEDED) Shared library: [librt.so.0.9.32]
0x0000000000000001 (NEEDED) Shared library: [libc.so.0.9.32]
Below is a patch that should solve it.
---
diff -r 4d268e810c15 src/plugins/acl/Makefile.am
--- a/src/plugins/acl/Makefile.am Mon Oct 08 08:53:54 2012 +0300
+++ b/src/plugins/acl/Makefile.am Wed Oct 10 11:03:49 2012 +0200
@@ -10,7 +10,8 @@
-I$(top_srcdir)/src/doveadm
NOPLUGIN_LDFLAGS -lib10_doveadm_acl_plugin_la_LDFLAGS = -module -avoid-version
+lib10_doveadm_acl_plugin_la_LDFLAGS = -module -avoid-version
-Wl,-rpath,$(moduledir)
+lib10_doveadm_acl_plugin_la_LIBADD = $(module_LTLIBRARIES)
lib01_acl_plugin_la_LDFLAGS = -module -avoid-version
module_LTLIBRARIES = \
diff -r 4d268e810c15 src/plugins/expire/Makefile.am
--- a/src/plugins/expire/Makefile.am Mon Oct 08 08:53:54 2012 +0300
+++ b/src/plugins/expire/Makefile.am Wed Oct 10 11:03:49 2012 +0200
@@ -14,7 +14,8 @@
-I$(top_srcdir)/src/doveadm
NOPLUGIN_LDFLAGS -lib10_doveadm_expire_plugin_la_LDFLAGS = -module
-avoid-version
+lib10_doveadm_expire_plugin_la_LDFLAGS = -module -avoid-version
-Wl,-rpath,$(moduledir)
+lib10_doveadm_expire_plugin_la_LIBADD = $(module_LTLIBRARIES)
lib20_expire_plugin_la_LDFLAGS = -module -avoid-version
module_LTLIBRARIES = \
diff -r 4d268e810c15 src/plugins/fts/Makefile.am
--- a/src/plugins/fts/Makefile.am Mon Oct 08 08:53:54 2012 +0300
+++ b/src/plugins/fts/Makefile.am Wed Oct 10 11:03:49 2012 +0200
@@ -11,7 +11,8 @@
-I$(top_srcdir)/src/doveadm
NOPLUGIN_LDFLAGS -lib20_doveadm_fts_plugin_la_LDFLAGS = -module -avoid-version
+lib20_doveadm_fts_plugin_la_LDFLAGS = -module -avoid-version
-Wl,-rpath,$(moduledir)
+lib20_doveadm_fts_plugin_la_LIBADD = $(module_LTLIBRARIES)
lib20_fts_plugin_la_LDFLAGS = -module -avoid-version
module_LTLIBRARIES = \
diff -r 4d268e810c15 src/plugins/quota/Makefile.am
--- a/src/plugins/quota/Makefile.am Mon Oct 08 08:53:54 2012 +0300
+++ b/src/plugins/quota/Makefile.am Wed Oct 10 11:03:49 2012 +0200
@@ -11,7 +11,8 @@
-I$(top_srcdir)/src/doveadm
NOPLUGIN_LDFLAGS -lib10_doveadm_quota_plugin_la_LDFLAGS = -module
-avoid-version
+lib10_doveadm_quota_plugin_la_LDFLAGS = -module -avoid-version
-Wl,-rpath,$(moduledir)
+lib10_doveadm_quota_plugin_la_LIBADD = $(module_LTLIBRARIES)
lib10_quota_plugin_la_LDFLAGS = -module -avoid-version
module_LTLIBRARIES = \
diff -r 4d268e810c15 src/plugins/zlib/Makefile.am
--- a/src/plugins/zlib/Makefile.am Mon Oct 08 08:53:54 2012 +0300
+++ b/src/plugins/zlib/Makefile.am Wed Oct 10 11:03:49 2012 +0200
@@ -11,7 +11,8 @@
-I$(top_srcdir)/src/doveadm
NOPLUGIN_LDFLAGS -lib10_doveadm_zlib_plugin_la_LDFLAGS = -module -avoid-version
+lib10_doveadm_zlib_plugin_la_LDFLAGS = -module -avoid-version
-Wl,-rpath,$(moduledir)
+lib10_doveadm_zlib_plugin_la_LIBADD = $(module_LTLIBRARIES)
lib20_zlib_plugin_la_LDFLAGS = -module -avoid-version
module_LTLIBRARIES = \