Discussion:
[bug-mailutils] Patches for Cygwin build
Ken Brown
2017-03-26 17:50:14 UTC
Permalink
I see from the archives that various people have tried to build
mailutils on Cygwin, most recently here:

http://lists.gnu.org/archive/html/bug-mailutils/2013-12/msg00000.html

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.

Finally, as was already noted in response to the message cited above,
-llber is needed on Cygwin. More generally, it is needed on any
platform in which the ber_* functions are in -llber rather than -lldap.
I imagine this could be the case on some platforms other than Cygwin, so
I wrote the second patch to apply to any such platform.

Although the three patches are needed for Cygwin, I don't think they do
any harm on other platforms. Please consider installing them.

Thanks.

Ken

P.S. I also have some test failures that I might need help with, but
I'll write about them separately, after I've tried to fix them myself.
Ken Brown
2017-03-26 18:54:55 UTC
Permalink
Post by Ken Brown
I've succeeded in making the build work with the three attached patches.
And one more, just for my convenience.
Ken Brown
2017-04-26 21:51:05 UTC
Permalink
Post by Ken Brown
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

Loading...