[Dovecot] dovecot-2.0.alpha2 doesn't compile on Mac OS X

Timo Sirainen tss at iki.fi
Tue Oct 27 18:22:32 EET 2009


On Oct 27, 2009, at 12:06 PM, Mike Abbott wrote:

> Howdy, dovecot-2.0.alpha2 doesn't compile on Mac OS X.
>
> First, trivially, there's a typo in array.h:
> --- a/src/lib/array.h   2009-10-08 10:04:35.000000000 -0500
> +++ b/src/lib/array.h	2009-10-27 10:35:58.000000000 -0500
> @@ -72,7 +72,7 @@
>             (elem)++)
> #  define array_foreach_modifiable(array, elem) \
>        for (elem = ARRAY_TYPE_CAST_MODIFIABLE(array) \
> -                       buffer_get_modifiable_data((array)- 
> >arr.buffer, NULL)) + \
> +			buffer_get_modifiable_data((array)->arr.buffer, NULL) + \

Thanks, fixed. But why is your compiler taking that code path?

#if (defined(__STDC__) && __STDC_VERSION__ >= 199901L)

I think that should test that you're using C99 compiler, and gcc  
definitely is one. I'd think clang would also test success there.

> Second, Mac OS X can't link loadable modules against other loadable  
> modules (http://www.finkproject.org/doc/porting/porting.en.html#shared.lib-and-mod 
> ):

Again it seems to work in my Leopard + gcc. Or actually loading e.g.  
imap_quota without quota gives dlopen() error, but the compiling part  
works fine. It doesn't matter much that this happens, with OSes that  
support it it would have simply given a nicer error message:

Error: Can't load plugin imap_quota_plugin: Plugin quota must be  
loaded also

So are you saying that the compiling part also fails with you? What  
are you then doing differently? Anyway, if this needs to be disabled I  
guess I'll have to add a configure check for it. Any idea how that  
would work?

> Third, for cross-compiling the value of WORDS_BIGENDIAN needs to be  
> tested, not its presence:

Fixed.


More information about the dovecot mailing list