On 3/26/2017 1:50 PM, Ken Brown wrote:
I've succeeded in making the build work with the three attached patches.

The main issue is that libtool won't build shared libraries on Cygwin
unless the -no-undefined flag is used.  The first patch takes care of that.

But then there are in fact some undefined symbols, which I fixed in the
third patch.

That third patch, 0003-Fix-undefined-symbols-errors-on-Cygwin.patch, was wrong and caused hard-to-debug failures. Please use the attached 0001-Fix-undefined-symbols-errors-on-Cygwin.patch instead. This fixes all undefined symbol errors as of mailutils-3.2.

After commit 444d20f (Rewrite the mailutils tool), there are more undefined symbols. These are fixed by the attached 0001-Fix-more-undefined-symbol-errors-on-Cygwin.patch.

Ken

>From b065d8427bc51a795f7ae144bb2bc99880ab415c Mon Sep 17 00:00:00 2001
From: Ken Brown <kbr...@cornell.edu>
Date: Sun, 26 Mar 2017 12:56:26 -0400
Subject: [PATCH] Fix "undefined symbols" errors on Cygwin

* lib/Makefile.am (libmuaux_la_LIBADD):
* pop3d/Makefile.am (pop3d_LDADD):
* imap4d/Makefile.am (imap4d_LDADD):
* maidag/Makefile.am (maidag_LDADD): Add libmailutils.la
---
 imap4d/Makefile.am | 3 ++-
 lib/Makefile.am    | 2 +-
 maidag/Makefile.am | 3 ++-
 pop3d/Makefile.am  | 3 ++-
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/imap4d/Makefile.am b/imap4d/Makefile.am
index e62c34dfb..edaa5e92d 100644
--- a/imap4d/Makefile.am
+++ b/imap4d/Makefile.am
@@ -79,7 +79,8 @@ imap4d_LDADD = \
  ${MU_LIB_AUTH}\
  @MU_AUTHLIBS@ \
  ${MU_LIB_MAILUTILS}\
- @SERV_AUTHLIBS@ @MU_COMMON_LIBRARIES@ @MU_TCPWRAP_LIBRARIES@
+ @SERV_AUTHLIBS@ @MU_COMMON_LIBRARIES@ @MU_TCPWRAP_LIBRARIES@\
+ ../libmailutils/libmailutils.la
 
 ## This kludge is necessary to correctly establish imap4d -> MU_AUTHLIBS
 ## dependencies. Automake stupidly refuses to include them.
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 94e9593ed..a9f12f533 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -35,7 +35,7 @@ libmuaux_la_SOURCES = \
  strexit.c\
  mu_umaxtostr.c\
  mu_umaxtostr.h
-libmuaux_la_LIBADD=gnu/libgnu.la
+libmuaux_la_LIBADD=gnu/libgnu.la ../libmailutils/libmailutils.la
 libmuaux_la_LDFLAGS = -no-undefined -version-info 
@VI_CURRENT@:@VI_REVISION@:@VI_AGE@
 
 libmutcpwrap_a_SOURCES = tcpwrap.c
diff --git a/maidag/Makefile.am b/maidag/Makefile.am
index 1a4940a63..6fa7df6a8 100644
--- a/maidag/Makefile.am
+++ b/maidag/Makefile.am
@@ -53,7 +53,8 @@ maidag_LDADD = \
  @GUILE_LIBS@\
  @PYTHON_LIBS@\
  @DBMLIBS@\
- @MU_TCPWRAP_LIBRARIES@
+ @MU_TCPWRAP_LIBRARIES@\
+ ../libmailutils/libmailutils.la
 
 AM_CPPFLAGS = -I${top_srcdir} @MU_APP_COMMON_INCLUDES@ @GUILE_INCLUDES@ \
  @PYTHON_INCLUDES@
diff --git a/pop3d/Makefile.am b/pop3d/Makefile.am
index ba21c9ae9..611e3ee6b 100644
--- a/pop3d/Makefile.am
+++ b/pop3d/Makefile.am
@@ -61,7 +61,8 @@ pop3d_LDADD = \
  @MU_COMMON_LIBRARIES@\
  ${LIBMU_DBM}\
  @DBMLIBS@\
- @MU_TCPWRAP_LIBRARIES@
+ @MU_TCPWRAP_LIBRARIES@\
+ ../libmailutils/libmailutils.la
 
 popauth_SOURCES = popauth.c
 popauth_LDADD = \
-- 
2.12.2

>From 96f7cf6b82bdd82f7b4b14442d619abbe3be083f Mon Sep 17 00:00:00 2001
From: Ken Brown <kbr...@cornell.edu>
Date: Thu, 20 Apr 2017 15:46:49 -0400
Subject: [PATCH] Fix more "undefined symbol" errors on Cygwin

* mu/libexec/Makefile.am (mailutils_pop_LDADD)
(mailutils_imap_LDADD, mailutils_smtp_LDADD): Add libmuaux.la.
---
 mu/libexec/Makefile.am | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/mu/libexec/Makefile.am b/mu/libexec/Makefile.am
index b59dc1127..71d37caa8 100644
--- a/mu/libexec/Makefile.am
+++ b/mu/libexec/Makefile.am
@@ -66,7 +66,8 @@ if MU_COND_SUPPORT_POP
  ${MU_LIB_POP}\
  ${MU_LIB_AUTH}\
  @MU_AUTHLIBS@\
- $(MUTOOL_LIBRARIES_TAIL)
+ $(MUTOOL_LIBRARIES_TAIL)\
+ ../../lib/libmuaux.la
 endif
 
 if MU_COND_SUPPORT_IMAP
@@ -80,7 +81,8 @@ if MU_COND_SUPPORT_IMAP
  ${MU_LIB_IMAP}\
  ${MU_LIB_AUTH}\
  @MU_AUTHLIBS@\
- $(MUTOOL_LIBRARIES_TAIL)
+ $(MUTOOL_LIBRARIES_TAIL)\
+ ../../lib/libmuaux.la
 endif
 
 mailutils_send_SOURCES = send.c
@@ -116,7 +118,8 @@ mailutils_smtp_LDADD = \
  ${MU_LIB_MAILER}\
  ${MU_LIB_AUTH}\
  @MU_AUTHLIBS@\
- $(MUTOOL_LIBRARIES_TAIL)
+ $(MUTOOL_LIBRARIES_TAIL)\
+ ../../lib/libmuaux.la
 
 MUTOOL_LIBRARIES_TAIL = \
  ${MU_APP_LIBRARIES}\
-- 
2.12.2

_______________________________________________
Bug-mailutils mailing list
Bug-mailutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-mailutils

Reply via email to