Open robn opened 2 years ago
I wonder if it's enough to wrap all of imap/jmap_util.h
in #ifdef USE_HTTPD
, or if the problem goes deeper than that
It goes deeper. Here's what I get after doing that:
In file included from imap/caldav_util.h:51,
from imap/jmap_util.c:55:
imap/httpd.h:48:10: fatal error: libxml/tree.h: No such file or directory
#include <libxml/tree.h>
^~~~~~~~~~~~~~~
Weird that we're trying to build imap/jmap_util.c when httpd is disabled. I guess it's probably listed in the wrong spot in the Makefile.am. Will keep digging...
Much deeper...
imap/mboxevent.c: In function ‘threadid’:
imap/mboxevent.c:918:20: error: ‘JMAP_THREADID_SIZE’ undeclared (first use in this function); did you mean ‘SORT_THREADID’?
static char id[JMAP_THREADID_SIZE];
^~~~~~~~~~~~~~~~~~
SORT_THREADID
imap/mboxevent.c:918:20: note: each undeclared identifier is reported only once for each function it appears in
imap/mboxevent.c:924:9: warning: implicit declaration of function ‘jmap_set_threadid’ [-Wimplicit-function-declaration]
jmap_set_threadid(cid, id);
^~~~~~~~~~~~~~~~~
imap/mboxevent.c: In function ‘jmap_email’:
imap/mboxevent.c:932:18: error: ‘JMAP_EMAILID_SIZE’ undeclared (first use in this function); did you mean ‘EVP_MAX_MD_SIZE’?
char emailid[JMAP_EMAILID_SIZE];
^~~~~~~~~~~~~~~~~
EVP_MAX_MD_SIZE
imap/mboxevent.c:934:5: warning: implicit declaration of function ‘jmap_set_emailid’; did you mean ‘jmap_email’? [-Wimplicit-function-declaration]
jmap_set_emailid(guid, emailid);
^~~~~~~~~~~~~~~~
jmap_email
imap/mboxevent.c:939:32: warning: implicit declaration of function ‘jmap_header_as_date’ [-Wimplicit-function-declaration]
"sentAt", jmap_header_as_date(body->date),
^~~~~~~~~~~~~~~~~~~
imap/mboxevent.c:940:33: warning: implicit declaration of function ‘jmap_header_as_text’; did you mean ‘hash_iter_has_next’? [-Wimplicit-function-declaration]
"subject", jmap_header_as_text(body->subject),
^~~~~~~~~~~~~~~~~~~
hash_iter_has_next
imap/mboxevent.c:942:22: warning: implicit declaration of function ‘jmap_emailaddresses_from_addr’ [-Wimplicit-function-declaration]
jmap_emailaddresses_from_addr(body->from,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
imap/mboxevent.c:943:52: error: ‘HEADER_FORM_ADDRESSES’ undeclared (first use in this function)
HEADER_FORM_ADDRESSES),
^~~~~~~~~~~~~~~~~~~~~
imap/mboxevent.c:960:22: warning: implicit declaration of function ‘jmap_header_as_messageids’; did you mean ‘message_get_messageid’? [-Wimplicit-function-declaration]
jmap_header_as_messageids(body->in_reply_to),
^~~~~~~~~~~~~~~~~~~~~~~~~
message_get_messageid
imap/mboxevent.c: In function ‘mboxevent_extract_record’:
imap/mboxevent.c:1022:33: error: ‘JMAP_EMAILID_SIZE’ undeclared (first use in this function); did you mean ‘EVP_MAX_MD_SIZE’?
char *emailid = xmalloc(JMAP_EMAILID_SIZE);
^~~~~~~~~~~~~~~~~
EVP_MAX_MD_SIZE
imap/mboxevent.c: In function ‘mboxevent_extract_msgrecord’:
imap/mboxevent.c:1197:33: error: ‘JMAP_EMAILID_SIZE’ undeclared (first use in this function); did you mean ‘EVP_MAX_MD_SIZE’?
char *emailid = xmalloc(JMAP_EMAILID_SIZE);
^~~~~~~~~~~~~~~~~
EVP_MAX_MD_SIZE
Ahh, mboxevent used to be an optional component, but hasn't been since 9bdf3b198b. And I guess mboxevent needs to do JMAP stuff now for whatever reason (scheduled send?), so if you configure without httpd/etc you end up with a mess.
We've been talking about making httpd/jmap non-optional for a while... maybe it's time to just do it.
Annoyingly, there's similar (but not identical) problems on 3.6. Which is weird, because I'm usually pretty careful about making sure an optionless build succeeds on the stable branches, but apparently I've been missing it.
Anyway I think the fix for this for master will be to make httpd/jmap mandatory, like we planned to anyway. Meanwhile, I'll see if I can concoct a separate set of fixes specially for 3.6.
Compiling with no options to configure fails to build:
Configure was: