I have been trying to get courier to compile on Mac OS X (v. 10.2.4) recently, but have been having no luck what so ever.

If anyone here is able to help me, I'd be most appreciative. -- I'm afraid that I am not all that good at software builds anymore. It's been too long since I bothered with any that didn't "just work." :)

First, unless I use the --with-waitfunc configure option, I can't even get the project to successfully configure itself. I eventually tried setting it to use "wait3" ... for no good reason at all, since I don't know which is likely to be correct on OS X. (Should I use "wait" instead?) And at that point it would finally make it past the waitlib portion of the configure operation.

Can anyone tell me if that was an acceptable solution... i.e. Will things actually work (if I get them to compile later) even though the waitlib's configure was telling me that neither wait nor wait3 functioned properly on OS X? -- If not, what can I do about it instead? I don't know how one goes about fixing the wait calls on a system. Do I have to figure out my own fix? ("Can we say 'uh-oh!' boys and girls!?") Or does anyone know of a patch for either or both of these calls on OS X?

Second, assuming I can leave it like that with some level of hope that things might be okay, or there's a fix that can be made... I then try to do a configure again, but this time get errors about not finding the mime.types files. I did a locate and found 2 of them: the one I knew of already for Apache, /private/etc/httpd/mime.types, and another at /private/etc/cups/mime.types

So, since /etc on OS X is a symlink to /private/etc, I added --enable-mimetypes=/etc/httpd/mime.types:/etc/cups/mime.types (since that's just more BSDish than /private/etc) and configured again... and YIPPEE! It finally configured successfully!!

3 warnings: expect, gpg and fax.
1) I don't plan on caring (at least not yet) about webmail password changes (since "expect" probably wouldn't suffice on OS X anyway, since it probably isn't advisable to use the command line password utilities anyway, what with Open Directory / NetInfo, etc.) ... so I just moved on from there and will not bother with that feature I suspect.
2) Is there any reason to believe that GPG 1.2.1 is not going to work? It complained that courier is only tested with 1.0.4-1.0.7, but I am hoping that's not likely to be a problem. Is it though?
3) Couldn't find ghostscript/sendfax/netpbm. -- I'm not worried about fax functionality for the time being. Maybe I'll recompile it in at a later date, if I ever manage to get courier to compile in the first place. :)


So, I think the configure part is all set, except maybe a problem with waitlib still. (Or gpg if someone knows that 1.2.1 is not compatible for some reason.)

But that's not good enough, because the very next thing I try (a simple "make", of course) fails miserably. And I'm afriad it's here that my compile/make skills really fall apart.

The bdbobj make breaks with the following error:

Compiling bdbobj.c
bdbobj.c: In function `bdbobj_open':
bdbobj.c:117: warning: passing arg 2 of pointer to function from incompatible pointer type
bdbobj.c:117: incompatible type for argument 4 of indirect function call
bdbobj.c:117: too few arguments to function
make[2]: *** [bdbobj.o] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1


...which I kinda understand in concept, but have no idea what to do about in practice.

Any thoughts?

Then, in my futility, I tried to manually do a "make" in some of the other sub-directories (just to see how bad off I was... i.e. was this the only thing holding me back)...

And sadly it turns out several others seem to have problems too. Apparently most are unrelated to this I believe.

Not quite sure of myself (and knowing that the farther I went along, the more likely something would be likely to break even if it wouldn't normally), I attempted to find a listing of which order things should be make'd in and tried this list from the main Makefile:

SUBDIRS = afx bdbobj numlib soxwrap md5 sha1 libhmac random128 unicode rfc822 \
rfc1035 rfc2045 liblock maildir userdb authlib waitlib tcpd threadlib \
makedat imap maildrop cgi http11 ldapaddressbook gpglib \
pcp webmail rootcerts webadmin courier


I've included details of those make attempts in an attachment, so as not to clutter up this email.

Again, I'm working on "make" in each of the subdirectories of the distribution which 
are in this list from the Makefile:

SUBDIRS = afx bdbobj numlib soxwrap md5 sha1 libhmac random128 unicode rfc822 \
        rfc1035 rfc2045 liblock maildir userdb authlib waitlib tcpd threadlib \
        makedat imap maildrop cgi http11 ldapaddressbook gpglib \
        pcp webmail rootcerts webadmin courier

And here are my results:

afx -- had succeeded during the original failed make, so I skipped it.
bdbobj -- is the one I next need help with, so I skipped it. but for reference, the 
error as listed in my email was:

Compiling bdbobj.c
bdbobj.c: In function `bdbobj_open':
bdbobj.c:117: warning: passing arg 2 of pointer to function from incompatible pointer 
type
bdbobj.c:117: incompatible type for argument 4 of indirect function call
bdbobj.c:117: too few arguments to function
make[2]: *** [bdbobj.o] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

numlib, soxwrap, md5, sha1, libhmac, random128, unicode, rfc822 -- these all worked 
flawlessly. YAY!
rfc1035 -- failed with the following error which (again) I'm not sure how to fix:

ld: Undefined symbols:
_rfc1035_default_resolver
make[1]: *** [testlookup] Error 1
make: *** [all] Error 2

rfc2045 -- worked just fine.
liblock -- failed with this error:

Compiling lockdaemon.c
lockdaemon.c:488: illegal expression, found `void'
lockdaemon.c:244: parse error in conditional expression
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
make[1]: *** [lockdaemon.o] Error 1
make: *** [all] Error 2

maildir -- failed with the error:

Compiling deliverquota.c
gcc  -g -O2 -Wall -I./.. -I..   -o deliverquota  deliverquota.o libmaildir.a 
../rfc822/librfc822.a ../numlib/libnumlib.a 
ld: ../numlib/libnumlib.a(strhdevt.o) literal C string section (__TEXT,__cstring) does 
not end with a '\0'
ld: ../numlib/libnumlib.a(strhinot.o) literal C string section (__TEXT,__cstring) does 
not end with a '\0'
make[1]: *** [deliverquota] Error 1
make: *** [all] Error 2

userdb -- failed with the following error:

Compiling userdbpw.c
userdbpw.c:160: illegal expression, found `void'
userdbpw.c:80: parse error in conditional expression
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
make[1]: *** [userdbpw.o] Error 1
make: *** [all] Error 2

authlib -- failed because bdbobj is not ready.
waitlib -- failed with this error:

Compiling waitlib2.c
waitlib2.c:56: illegal expression, found `void'
waitlib2.c:28: parse error in conditional expression
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
make[1]: *** [waitlib2.o] Error 1
make: *** [all] Error 2

tcpd -- failed with the errors:

Compiling tcpd.c
tcpd.c:376: illegal expression, found `void'
tcpd.c:188: parse error in conditional expression
tcpd.c:398: illegal expression, found `void'
tcpd.c:199: parse error in conditional expression
tcpd.c:1604: illegal expression, found `void'
tcpd.c:802: parse error in conditional expression
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
make[1]: *** [tcpd.o] Error 1
make: *** [all] Error 2

threadlib -- worked just fine.
makedat -- failed because bdbobj is not ready.
imap -- failed with the error:

Compiling mainloop.c
mainloop.c:60: illegal expression, found `void'
mainloop.c:30: parse error in conditional expression
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
make[1]: *** [mainloop.o] Error 1
make: *** [all] Error 2

maildrop -- failed because liblock is not ready.
cgi, http11, ldapaddressbook, gpglib -- all worked just fine.
pcp -- appeared to compile properly (although with a large number of messages every 
time libgnuintl.h was used), but seemingly failed to link, with the following error:

ld: Undefined symbols:
__USER_LABEL_PREFIX__libintl_gettext
__USER_LABEL_PREFIX__libintl_textdomain
make[2]: *** [pcp] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

webmail -- failed with the error:

Compiling sqwebmail.c
sqwebmail.c:3994: illegal expression, found `void'
sqwebmail.c:1997: parse error in conditional expression
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
make[2]: *** [sqwebmail.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

rootcerts -- succeeded, though I don't think that's significant, since it didn't 
appear to compile anything at all
webadmin -- worked flawlessly
courier -- failed with this error:

Compiling comsubmitclient.c
comsubmitclient.c:84: illegal expression, found `void'
comsubmitclient.c:42: parse error in conditional expression
comsubmitclient.c:808: illegal expression, found `void'
comsubmitclient.c:404: parse error in conditional expression
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
make[3]: *** [comsubmitclient.o] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2



Anyway, that's my flood of error messages. Obviously the later ones mean less, since I probably need to fix the early stuff first. ;) But it's interesting that "illegal expression, found 'void'" is such a common compile error. -- Is there a simple fix for that?

Thanks for any and all help, guys!

-James

Reply via email to