AIX packaging: src/plugin/quota does not build
#stdout to /dev/null to see only the error messages
It comes down to more issues with how IBM xlc handles (less elegantly) Compound Literals compared to GCC.
michael@x071:[/data/prj/aixtools/github/dovecot/x071-test]make -i >/dev/null "../../../../src/x071-test/src/plugins/quota/quota.c", line 382.17: 1506-196 (S) Initialization between types "char* const" and "struct quota_param_parser" is not allowed. "../../../../src/x071-test/src/plugins/quota/quota.c", line 383.17: 1506-196 (S) Initialization between types "void(* const)(struct quota_root*,const char*)" and "struct quota_param_parser" is not allowed. "../../../../src/x071-test/src/plugins/quota/quota.c", line 384.17: 1506-196 (S) Initialization between types "char* const" and "struct quota_param_parser" is not allowed. "../../../../src/x071-test/src/plugins/quota/quota.c", line 385.17: 1506-196 (S) Initialization between types "void(* const)(struct quota_root*,const char*)" and "struct quota_param_parser" is not allowed. make[4]: [quota.lo] Error 1 (ignored)
The above issues I resolved by changing
/*
- Sigh, xlc and Compound Literals
- struct quota_param_parser quota_param_hidden = {.param_name = "hidden", .param_handler = hidden_param_handler}; struct quota_param_parser quota_param_ignoreunlimited = {.param_name = "ignoreunlimited", .param_handler = ignoreunlim_param_handler}; struct quota_param_parser quota_param_noenforcing = {.param_name = "noenforcing", .param_handler = noenforcing_param_handler}; struct quota_param_parser quota_param_ns = {.param_name = "ns=", .param_handler = ns_param_handler}; */
to
#define quota_param_hidden {.param_name = "hidden", .param_handler = hidden_param_handler} #define quota_param_ignoreunlimited {.param_name = "ignoreunlimited", .param_handler = ignoreunlim_param_handler} #define quota_param_noenforcing {.param_name = "noenforcing", .param_handler = noenforcing_param_handler} #define quota_param_ns {.param_name = "ns=", .param_handler = ns_param_handler}
Unfortunately, this did not help quota-fs.c, so I move the defines to quota.h.
However, since hidden_param_handler() is defined as a static routine, it is not visible outside of quota.c. As such the error messages change from:
"../../../../src/x071-test/src/plugins/quota/quota-fs.c", line 125.17:
1506-196 (S) Initialization between types "char* const" and "struct
quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-fs.c", line 125.37:
1506-196 (S) Initialization between types "void(* const)(struct
quota_root*,const char*)" and "struct quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-fs.c", line 125.62:
1506-196 (S) Initialization between types "char* const" and "struct
quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-fs.c", line 126.18:
1506-515 (S) Member designator cannot be applied to an object of type
"const struct quota_param_parser[]".
make[4]: [quota-fs.lo] Error 1 (ignored)
"../../../../src/x071-test/src/plugins/quota/quota-dict.c", line 47.17:
1506-196 (S) Initialization between types "char* const" and "struct
quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-dict.c", line 47.37:
1506-196 (S) Initialization between types "void(* const)(struct
quota_root*,const char*)" and "struct quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-dict.c", line 47.66:
1506-196 (S) Initialization between types "char* const" and "struct
quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-dict.c", line 47.91:
1506-196 (S) Initialization between types "void(* const)(struct
quota_root*,const char*)" and "struct quota_param_parser" is not allowed.
make[4]: [quota-dict.lo] Error 1 (ignored)
"../../../../src/x071-test/src/plugins/quota/quota-imapc.c", line 66.17:
1506-196 (S) Initialization between types "char* const" and "struct
quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-imapc.c", line 67.18:
1506-515 (S) Member designator cannot be applied to an object of type
"const struct quota_param_parser[]".
make[4]: [quota-imapc.lo] Error 1 (ignored)
libtool: error: 'quota.lo' is not a valid libtool object
make[4]: [lib10_quota_plugin.la] Error 1 (ignored)
libtool: error: 'quota.lo' is not a valid libtool object
make[4]: [quota-status] Error 1 (ignored)
make[4]: *** No rule to make target ../quota/lib10_quota_plugin.la', needed by
lib11_imap_quota_plugin.la'. Stop.
make[3]: [all-recursive] Error 1 (ignored)
to:
michael@x071:[/data/prj/aixtools/github/dovecot/x071-test/src/plugins/quota]make -i >/dev/null "../../../../src/x071-test/src/plugins/quota/quota-fs.c", line 125.17: 1506-045 (S) Undeclared identifier hidden_param_handler. "../../../../src/x071-test/src/plugins/quota/quota-fs.c", line 126.17: 1506-045 (S) Undeclared identifier noenforcing_param_handler. "../../../../src/x071-test/src/plugins/quota/quota-fs.c", line 127.17: 1506-045 (S) Undeclared identifier ns_param_handler. make: [quota-fs.lo] Error 1 (ignored) "../../../../src/x071-test/src/plugins/quota/quota-dict.c", line 47.17: 1506-045 (S) Undeclared identifier hidden_param_handler. "../../../../src/x071-test/src/plugins/quota/quota-dict.c", line 47.37: 1506-045 (S) Undeclared identifier ignoreunlim_param_handler. "../../../../src/x071-test/src/plugins/quota/quota-dict.c", line 47.66: 1506-045 (S) Undeclared identifier noenforcing_param_handler. "../../../../src/x071-test/src/plugins/quota/quota-dict.c", line 47.91: 1506-045 (S) Undeclared identifier ns_param_handler. make: [quota-dict.lo] Error 1 (ignored) "../../../../src/x071-test/src/plugins/quota/quota-imapc.c", line 66.17: 1506-045 (S) Undeclared identifier ns_param_handler. make: [quota-imapc.lo] Error 1 (ignored) libtool: error: 'quota-fs.lo' is not a valid libtool object make: [lib10_quota_plugin.la] Error 1 (ignored) libtool: error: 'quota-fs.lo' is not a valid libtool object make: [quota-status] Error 1 (ignored)
For me, this is a procedure declaration issue I may not resolve on my own - I must assume there is a reason that these routines are "static".
Michael
p.s. Once this is resolved I hope to be able to use "make check". I had to massage the Makefiles to get gnulib/getopt to link into dovecot. Once I can run "make check" I'll request help on how to get a new directory included in the Makefile list, and also assistance with making sure it can also work with out-of-tree builds.
participants (1)
-
Michael Felt