Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2017-06-10 Thread Michael Felt

On 10/06/2017 17:26, Michael Felt wrote:

On 10/06/2017 17:23, Michael Felt wrote:

On 10/06/2017 14:42, Michael Felt wrote:


Next chapter in packaging.(Not meant to be extensive, only what I 
run across and is easy to report)


So, now in an attempt to report on where I am at...

mich...@x071.home.local:[/data/prj/aixtools/github/dovecot/x071-test]make 
-i >/dev/null
"../../../src/x071-test/src/doveadm/doveadm-cmd.c", line 434.24: 
1506-007 (S) "struct option" is undefined.
"../../../src/x071-test/src/doveadm/doveadm-cmd.c", line 516.9: 1506-285 
(S) The indirection operator cannot be applied to a pointer to an 
incomplete struct or union.
"../../../src/x071-test/src/doveadm/doveadm-cmd.c", line 536.37: 
1506-285 (S) The indirection operator cannot be applied to a pointer to 
an incomplete struct or union.
"../../../src/x071-test/src/doveadm/doveadm-cmd.c", line 548.37: 
1506-285 (S) The indirection operator cannot be applied to a pointer to 
an incomplete struct or union.

make[4]: [doveadm-cmd.o] Error 1 (ignored)
xlc_r: 1501-228 (W) input file doveadm-cmd.o not found
make[4]: [doveadm] Error 252 (ignored)
xlc_r: 1501-228 (W) input file doveadm-cmd.o not found
make[4]: [doveadm-server] Error 252 (ignored)
"../../../../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)
"../../../../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)
mich...@x071.home.local:[/data/prj/aixtools/github/dovecot/x071-test]

I am hoping the changes needed are "simple" - and I would rather bow to 
the expert rather than make things unduly messy.


Regards,

Michael

(And I am going to look up how to post to git (via a remote) to show you 
what I have modified to get this far.)


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2017-06-10 Thread Michael Felt

On 10/06/2017 17:23, Michael Felt wrote:

On 10/06/2017 14:42, Michael Felt wrote:


Next chapter in packaging.(Not meant to be extensive, only what I run 
across and is easy to report)


c)

  378 | int quota_root_default_init(struct quota_root *root, const 
char *args,

  379 | const char **error_r)
  380 | {
  381 | const struct quota_param_parser default_params[] = {
  382 | quota_param_hidden,
"../../../../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.

  383 | quota_param_ignoreunlimited,
"../../../../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 allowe

d.
  384 | quota_param_noenforcing,
"../../../../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.

  385 | quota_param_ns,
"../../../../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 allowe

d.
  386 | {.param_name = NULL}
  386 + {.param_name = 0}
  387 | };
  388 | return quota_parse_parameters(root, , 
error_r, default_params, FALSE);
  388 + return quota_parse_parameters(root, , 
error_r, default_params, 0);

  389 | }


More on this (the redirect to /dev/null is to remove all the verbosity)

mich...@x071.home.local:[/data/prj/aixtools/github/dovecot/x071-test/src/plugins/quota]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: [quota.lo] Error 1 (ignored)
"../../../../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: [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: [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: [quota-imapc.lo] Error 1 (ignored)
libtool:   error: 'quota.lo' is not a valid libtool object
make: [lib10_quota_plugin.la] Error 1 (ignored)
libtool:   error: 'quota.lo' is not a valid libtool object
make: [quota-status] Error 1 (ignored)
mich...@x071.home.local:[/data/prj/aixtools/github/dovecot/x071-test/src/plugins/quota]


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2017-06-10 Thread Michael Felt

On 10/06/2017 14:42, Michael Felt wrote:


Next chapter in packaging.(Not meant to be extensive, only what I run 
across and is easy to report)


c)

  378 | int quota_root_default_init(struct quota_root *root, const 
char *args,

  379 | const char **error_r)
  380 | {
  381 | const struct quota_param_parser default_params[] = {
  382 | quota_param_hidden,
"../../../../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.

  383 | quota_param_ignoreunlimited,
"../../../../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 allowe

d.
  384 | quota_param_noenforcing,
"../../../../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.

  385 | quota_param_ns,
"../../../../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 allowe

d.
  386 | {.param_name = NULL}
  386 + {.param_name = 0}
  387 | };
  388 | return quota_parse_parameters(root, , error_r, 
default_params, FALSE);
  388 + return quota_parse_parameters(root, , error_r, 
default_params, 0);

  389 | }


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2017-06-10 Thread Michael Felt

On 09/10/2016 21:48, Michael Felt wrote:
I finally decided it was really time to stop being lazy and really 
move away from gmail. After I have a server in my basement using 
power, etc.


So I turned on the imap provided - and did not quite cry - it will 
have to do for now, but imap2 is wanting.


Next chapter in packaging.

a) I have 'patched' several files to get around the 'limitation' of the 
xlc parsing of Compound Literals.


b) a bit more difficult is to figure out how to not need GNU C Library 
getopt(). Currently stuck at:


xlc_r -DHAVE_CONFIG_H -I. -I../../../src/x071-test/src/doveadm -I../.. 
-I../../../src/x071-test/src/lib -I../../../src/x071-test/src/lib-test 
-I../../../src/x071-test/src/lib-settings 
-I../../../src/x071-test/src/lib-auth 
-I../../../src/x071-test/src/lib-compression 
-I../../../src/x071-test/src/lib-dict 
-I../../../src/x071-test/src/lib-fs 
-I../../../src/x071-test/src/lib-ssl-iostream 
-I../../../src/x071-test/src/lib-master 
-I../../../src/x071-test/src/lib-mail 
-I../../../src/x071-test/src/lib-imap 
-I../../../src/x071-test/src/lib-index 
-I../../../src/x071-test/src/lib-storage 
-I../../../src/x071-test/src/lib-imap-storage 
-I../../../src/x071-test/src/lib-http 
-I../../../src/x071-test/src/lib-dcrypt 
-I../../../src/x071-test/src/auth -DMODULEDIR=\""/opt/lib/dovecot"\" 
-DAUTH_MODULE_DIR=\""/opt/lib/dovecot/auth"\" 
-DDOVEADM_MODULEDIR=\""/opt/lib/dovecot/doveadm"\" 
-DPKG_RUNDIR=\""/var/x071-test/run/dovecot"\" 
-DPKG_STATEDIR=\""/var/x071-test/lib/dovecot"\" 
-DPKG_LIBEXECDIR=\""/opt/libexec/dovecot"\" -DBINDIR=\""/opt/bin"\" 
-DMANDIR=\""/usr/share/man"\" -I/opt/include  -I/opt/include -O2 
-qmaxmem=-1 -qarch=pwr5  -c -o doveadm-cmd.o 
../../../src/x071-test/src/doveadm/doveadm-cmd.c
"../../../src/x071-test/src/doveadm/doveadm-cmd.c", line 434.24: 
1506-007 (S) "struct option" is undefined.
"../../../src/x071-test/src/doveadm/doveadm-cmd.c", line 516.9: 1506-285 
(S) The indirection operator cannot be applied to a pointer to an 
incomplete struct or union.
"../../../src/x071-test/src/doveadm/doveadm-cmd.c", line 536.37: 
1506-285 (S) The indirection operator cannot be applied to a pointer to 
an incomplete struct or union.
"../../../src/x071-test/src/doveadm/doveadm-cmd.c", line 548.37: 
1506-285 (S) The indirection operator cannot be applied to a pointer to 
an incomplete struct or union.

make[1]: *** [doveadm-cmd.o] Error 1

  +428  static void
  +429  doveadm_build_options(const struct doveadm_cmd_param par[],
  +430  string_t *shortopts,
  +431  ARRAY_TYPE(getopt_option_array) *longopts)
  +432  {
  +433  for(size_t i=0; par[i].name != NULL; i++) {
  +434  struct option longopt;
  +435
  +436  i_zero();
  +437  longopt.name = par[i].name;
  +438  if (par[i].short_opt != '\0') {
  +439  longopt.val = par[i].short_opt;
  +440  str_append_c(shortopts, par[i].short_opt);
  +441  if (par[i].type != CMD_PARAM_BOOL)
  +442  str_append_c(shortopts, ':');
  +443  }
  +444  if (par[i].type != CMD_PARAM_BOOL)
  +445  longopt.has_arg = 1;
  +446  array_append(longopts, , 1);
  +447  }
  +448  array_append_zero(longopts);
  +449  }

  +505  int doveadm_cmd_run_ver2(int argc, const char *const argv[],
  +506   struct doveadm_cmd_context *cctx)
  +507  {
  +508  struct doveadm_cmd_param *param;
  +509  ARRAY_TYPE(doveadm_cmd_param_arr_t) pargv;
  +510  ARRAY_TYPE(getopt_option_array) opts;
  +511  unsigned int pargc;
  +512  int c,li;
  +513  pool_t pool = pool_datastack_create();
  +514  string_t *optbuf = str_new(pool, 64);
  +515
  +516  p_array_init(, pool, 4);
  +517
  +518  // build parameters
  +519 doveadm_build_options(cctx->cmd->parameters, optbuf, );

  +530  while((c = getopt_long(argc, (char*const*)argv, 
str_c(optbuf), array_idx(, 0), )) > -1) {

  +531  switch(c) {
  +532  case 0:
  +533  for(unsigned int i = 0; i < 
array_count(); i++) {
  +534  const struct option *opt = 
array_idx(,li);
  +535  param = 
array_idx_modifiable(,i);

  +536  if (opt->name == param->name)
  +537 doveadm_fill_param(param, optarg, pool);
  +538  }
  +539  break;
  +540  case '?':
  +541  case ':':
  +542 doveadm_cmd_params_clean();
  +543  return -1;
  +544  default:
  +545  // hunt the option
  +546  for(unsigned int i = 0; i < pargc; i++) {
  +547

Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2017-06-08 Thread Michael Felt

On 07/06/2017 07:58, Aki Tuomi wrote:

The test summary says okay, but I see 'Error' in the diagnostics. Did
all go as expected? (p.s. this is not the only area where there is
'Error', but test says 'ok'.

Regards,

Michael

Those errors are expected errors, since the test is about making sure
that refused connection is handled correcty.

Aki


Was hoping you would say that! But wanted to be sure I was not doing 
anything incorrectly.


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2017-06-06 Thread Aki Tuomi


On 06.06.2017 21:30, Michael Felt wrote:
> On 09/10/2016 21:48, Michael Felt wrote:
>>
>> A real server yes, but not Linux. (Using linux would require another
>> server AND I would feel I am being lazy again).
>
> Well, I have been busy, and it is time to force move dovecot forward.
>
> Being 'lazy' I am doing some initial tests on my POWER platform using
> an old debian distro to build the latest (via git).
>
> That has been 'uneventful' - which is good, but I am confused by the
> output of "make check". An excerpt:
>
> test_program_setup ...
> : ok
> Debug: Trying to connect 127.0.0.1:52694 (timeout 5000 msecs)
> test_program_success .
> : ok
> Debug: Trying to connect 127.0.0.1:52694 (timeout 5000 msecs)
> test_program_io (async) ..
> : ok
> Debug: Trying to connect 127.0.0.1:52694 (timeout 5000 msecs)
> test_program_failure .
> : ok
> Debug: Trying to connect 127.0.0.1:52694 (timeout 5000 msecs)
> test_program_noreply .
> : ok
> Debug: Trying to connect [::1]:52694 (timeout 5000 msecs)
> test: random seed #1 was 1496876286
> Error: connect([::1]:52694) failed: Connection refused
> Debug: Trying to connect 127.0.0.3:52694 (timeout 5000 msecs)
> Error: connect(127.0.0.3:52694) failed: Connection refused
> Debug: Trying to connect 127.0.0.2:52694 (timeout 5000 msecs)
> Error: connect(127.0.0.2:52694) failed: Connection refused
> Debug: Trying to connect 127.0.0.1:52694 (timeout 5000 msecs)
> test_program_refused .
> : ok
> test_program_teardown 
> : ok
> 0 / 7 tests failed
>
> The test summary says okay, but I see 'Error' in the diagnostics. Did
> all go as expected? (p.s. this is not the only area where there is
> 'Error', but test says 'ok'.
>
> Regards,
>
> Michael

Those errors are expected errors, since the test is about making sure
that refused connection is handled correcty.

Aki


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2017-06-06 Thread Michael Felt

On 09/10/2016 21:48, Michael Felt wrote:


A real server yes, but not Linux. (Using linux would require another 
server AND I would feel I am being lazy again).


Well, I have been busy, and it is time to force move dovecot forward.

Being 'lazy' I am doing some initial tests on my POWER platform using an 
old debian distro to build the latest (via git).


That has been 'uneventful' - which is good, but I am confused by the 
output of "make check". An excerpt:


test_program_setup ... : ok
Debug: Trying to connect 127.0.0.1:52694 (timeout 5000 msecs)
test_program_success . : ok
Debug: Trying to connect 127.0.0.1:52694 (timeout 5000 msecs)
test_program_io (async) .. : ok
Debug: Trying to connect 127.0.0.1:52694 (timeout 5000 msecs)
test_program_failure . : ok
Debug: Trying to connect 127.0.0.1:52694 (timeout 5000 msecs)
test_program_noreply . : ok
Debug: Trying to connect [::1]:52694 (timeout 5000 msecs)
test: random seed #1 was 1496876286
Error: connect([::1]:52694) failed: Connection refused
Debug: Trying to connect 127.0.0.3:52694 (timeout 5000 msecs)
Error: connect(127.0.0.3:52694) failed: Connection refused
Debug: Trying to connect 127.0.0.2:52694 (timeout 5000 msecs)
Error: connect(127.0.0.2:52694) failed: Connection refused
Debug: Trying to connect 127.0.0.1:52694 (timeout 5000 msecs)
test_program_refused . : ok
test_program_teardown  : ok
0 / 7 tests failed

The test summary says okay, but I see 'Error' in the diagnostics. Did 
all go as expected? (p.s. this is not the only area where there is 
'Error', but test says 'ok'.


Regards,

Michael


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2017-05-24 Thread seema pandhre
Hi Micheal,

I am currently working on AIX + VAC + NTPv4 build. and I have also faced
same issues as mentioned by you in link

https://www.dovecot.org/list/dovecot/2016-October/105597.html

Wondering if you have got any resolution for above issue.

If yes, please help me with your guidance.

thanks in advance,
seema


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Michael Felt

On 10/10/2016 14:59, Stephan Bosch wrote:

It should be supported by AIX:

https://www.ibm.com/support/knowledgecenter/SSGH3R_13.1.3/com.ibm.xlcpp1313.aix.doc/language_ref/compound_literals.html 



OK - it is supported, but "not in the same way as gcc".


Getting it to simplified cases:

No GO is stated as: flexible array member cannot be used as a member of 
a structure - line25


   +23  struct yyy {
   +24  char *newLBL;
   +25  http_auth_param_t auth[];
   +26  };
   +27
   +28  struct yyy
   +29  YYY[] = {
   +30 (struct yyy) {
   +31.newLBL = "LBL1"
   +32 },
   +33 (struct yyy) {
   +34.newLBL = "LBL2"
   +35 }
   +36  };
!cc c99_comp_literal.c;
"c99_comp_literal.c", line 29.1: 1506-995 (S) An aggregate containing a 
flexible array member cannot be used as a member of a structure or as an 
array element.


So, to get it to work with a pointer "inside" the data needs to be 
initialized more like this:

(what was line 25, is now line 32)

   +11  struct xxx {
   +12  char *lbl;
   +13  http_auth_param_t a[];
   +14  };
   +15  struct xxx X1 = (struct xxx) {
   +16  .lbl = "labelX",
   +17  .a = {
   +18 (http_auth_param_t) { .p1 = "c1" },
   +19 (http_auth_param_t) { .p2 = "g2" },
   +20 (http_auth_param_t) { }
   +21  }
   +22  };
   +23  struct xxx X2 = (struct xxx) {
   +24  .lbl = "labelX",
   +25  .a = {
   +26 (http_auth_param_t) { .p1 = "z1" },
   +27 (http_auth_param_t) { }
   +28  }
   +29  };
   +30  struct yyy {
   +31  char *newLBL;
   +32  http_auth_param_t *auth;
   +33  };
   +34
   +35  struct yyy
   +36  YYY[] = {
   +37 (struct yyy) {
   +38.newLBL = "LBL1",
   +39.auth = X1.a
   +40 },
   +41 (struct yyy) {
   +42.newLBL = "LBL2",
   +43.auth = X2.a
   +44 },
   +45 { }
   +46  };

Shall work on a 'patch' asap (which might be in 24+ hours)

Michael


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Michael Felt

On 10/10/2016 19:44, Michael Felt wrote:

   +11  main()
   +12  {
   +13  http_auth_param_t b[] = {
   +14  (http_auth_param_t) { .p1 = "c1" },
   +15  (http_auth_param_t) { .p2 = "e2" }
   +16  };
   +17
   +18  printf("%s\n", a[0].p1);
   +19  printf("%s\n", b[1].p2);
   +20  }


Updated to:

+1  typedef struct {
+2  char * p1;
+3  char * p2;
+4  } http_auth_param_t;
+5
+6  http_auth_param_t a[] =
+7  { "a1", "a2",
+8"b1", "b2"
+9  };
   +10
   +11  struct xxx {
   +12  char *lbl;
   +13  http_auth_param_t a[];
   +14  };
   +15  struct xxx X = (struct xxx) {
   +16  .lbl = "labelX",
   +17  .a = {
   +18 (http_auth_param_t) { .p1 = "c1" },
   +19 (http_auth_param_t) { .p2 = "g2" },
   +20 (http_auth_param_t) { }
   +21  }
   +22  };
   +23  main()
   +24  {
   +25  http_auth_param_t b[] = {
   +26  (http_auth_param_t) { .p1 = "c1" },
   +27  (http_auth_param_t) { .p2 = "e2" },
   +28  (http_auth_param_t) { }
   +29  };
   +30
   +31  printf("%s\n", a[0].p1);
   +32  printf("%s\n", b[1].p2);
   +33  printf("%s\n", X.a[1].p2);
   +34  }

!cc c99_comp_literal.c; ./a.out
a1
e2
g2

The key element seems to be in the struct definition:

this works:

   +11  struct xxx {
   +12  char *lbl;
   +13  http_auth_param_t a[];
   +14  };

but

   +11  struct xxx {
   +12  char *lbl;
   +13  http_auth_param_t *a;
   +14  };

!cc c99_comp_literal.c; ./a.out
"c99_comp_literal.c", line 18.20: 1506-196 (S) Initialization between 
types "struct {...}*" and "struct {...}" is not allowed.
"c99_comp_literal.c", line 19.20: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"c99_comp_literal.c", line 20.20: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.


I (am guessing) think the reason is because *a could be an array of 
"random"(ized) pointers pointing to single instance, while [] says it 
will be an array of structs.


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Michael Felt

On 10/10/2016 17:29, Stephan Bosch wrote:



Op 10-10-2016 om 17:16 schreef Michael Felt:

On 10/10/2016 14:59, Stephan Bosch wrote:



Op 10-10-2016 om 14:39 schreef Michael Felt:

On 10-Oct-16 06:45, Aki Tuomi wrote:

Does your build end at some particular point?

See  DETAILS  for in depth (I hope enough!) study/report.


Aki


I would guess this is not "c99" way...


It seems to fail on a C99 feature called Compound Literal (see 
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf, Section 
6.5.2.5).


It should be supported by AIX:

https://www.ibm.com/support/knowledgecenter/SSGH3R_13.1.3/com.ibm.xlcpp1313.aix.doc/language_ref/compound_literals.html 



I have no idea why it would fail here.

Regards,

Stephan.


Well, if I had the budget to buy the latest version (version 13 is 
your doclink) - then maybe it would work for me. I do not have the 
resources to upgrade from v11. Sad day for me I guess.


Or lucky for me that "Compound Literal" is not used much - this is 
the first time I have run into it.


Well, older versions are supposed to support it too:

https://www.ibm.com/support/knowledgecenter/SSGH3R_11.1.0/com.ibm.xlcpp111.aix.doc/language_ref/compound_literals.html 

As I said, or implied - reading the code was new - as actually, normally 
I saw the C89 way to do things.


I wrote a simple test for myself to come to grips on the syntax expected 
- nothing nested, but seems to be passing test #1


+1  typedef struct {
+2  char * p1;
+3  char * p2;
+4  } http_auth_param_t;
+5
+6  http_auth_param_t a[] =
+7  { "a1", "a2",
+8"b1", "b2"
+9  };
   +10
   +11  main()
   +12  {
   +13  http_auth_param_t b[] = {
   +14  (http_auth_param_t) { .p1 = "c1" },
   +15  (http_auth_param_t) { .p2 = "e2" }
   +16  };
   +17
   +18  printf("%s\n", a[0].p1);
   +19  printf("%s\n", b[1].p2);
   +20  }

returns:
!cc c99_comp_literal.c; ./a.out
a1
e2



Regards,

Stephan.


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Michael Felt

On 10/10/2016 14:59, Stephan Bosch wrote:

It should be supported by AIX:

https://www.ibm.com/support/knowledgecenter/SSGH3R_13.1.3/com.ibm.xlcpp1313.aix.doc/language_ref/compound_literals.html 



I have no idea why it would fail here.


I see it is also in version 11 - so, maybe still syntax:

This is the doc:

The following example passes a constant structure variable of type point 
containing two integer members to the function drawline:


drawline((struct point){6,7});

While the code is:
.challenges = (struct http_auth_challenge_test []) {
{ .scheme = "Basic",
.data = NULL,
.params = (struct http_auth_param []) {
{ "realm", "WallyWorld" }, { NULL, NULL 
}
}
},{
.scheme = NULL
}

The difference I notice is that, much prettier btw, you are also specifying the 
struct .names, and perhaps, in
Compound literal syntax

   .-,.
   V  |

-(--/type_name/--)--{/initializer_list/-+--}-><


"initializer_list" is exclusive of (additional) declarers.

The messages seem to indicate the parser does not like them being there...
"test-http-auth.c", line 27.27: 1506-022 (S) "scheme" is not a member of "const 
struct http_auth_challenges_test".
"test-http-auth.c", line 27.37: 1506-196 (W) Initialization between types "struct 
http_auth_challenge_test* const" and "char*" is not allowed.
"test-http-auth.c", line 28.33: 1506-022 (S) "data" is not a member of "const struct 
http_auth_challenges_test".
"test-http-auth.c", line 28.41: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.
"test-http-auth.c", line 29.33: 1506-022 (S) "params" is not a member of "const 
struct http_auth_challenges_test".
"test-http-auth.c", line 30.43: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.
"test-http-auth.c", line 30.52: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.
"test-http-auth.c", line 30.70: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.
"test-http-auth.c", line 30.76: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.

To understand|study it, I simplified it to:

 +7  #include "http-auth.h"
+8
+9  struct http_auth_challenge_test {
   +10  const char *scheme;
   +11  const char *data;
   +12  struct http_auth_param *params;
   +13  };
   +14
   +15  struct http_auth_challenges_test {
   +16  const char *challenges_in;
   +17  struct http_auth_challenge_test *challenges;
   +18  };
   +19
   +20  /* Valid auth challenges tests */
   +21  static struct http_auth_challenges_test
   +22  valid_auth_challenges_tests[] = {
   +23  { "Basic realm=\"WallyWorld\"",
   +24  "Basic",
   +25  NULL,
   +26   "realm", "WallyWorld",
   +27   NULL, NULL
   +28  },{
   +29  NULL,
   +30  NULL,
   +31  NULL, NULL
   +32  }
   +33  };

(lots of experimenting!)
I got it down to these messages:
"test-http-auth.c", line 24.25: 1506-196 (W) Initialization between types "struct 
http_auth_challenge_test*" and "char*" is not allowed.
"test-http-auth.c", line 25.25: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.
"test-http-auth.c", line 26.26: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.
"test-http-auth.c", line 26.35: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.
"test-http-auth.c", line 27.26: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.
"test-http-auth.c", line 27.32: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.
"test-http-auth.c", line 31.25: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.
"test-http-auth.c", line 31.31: 1506-026 (S) Number of initializers cannot be 
greater than the number of aggregate members.

As 'it' kept complaining about the unnecessary opening { I am thinking that 
their design does not leave space fot nesting arrarys of initialization. And I 
would tend to agree with there being 'lazy'.
That does not fix my problem. Going to look for a - maybe less elegant - but 
workable (and if found I hope acceptable) work-around.


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Michael Felt

On 10/10/2016 17:29, Stephan Bosch wrote:



Op 10-10-2016 om 17:16 schreef Michael Felt:

On 10/10/2016 14:59, Stephan Bosch wrote:



Op 10-10-2016 om 14:39 schreef Michael Felt:

On 10-Oct-16 06:45, Aki Tuomi wrote:

Does your build end at some particular point?

See  DETAILS  for in depth (I hope enough!) study/report.


Aki


I would guess this is not "c99" way...


It seems to fail on a C99 feature called Compound Literal (see 
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf, Section 
6.5.2.5).


It should be supported by AIX:

https://www.ibm.com/support/knowledgecenter/SSGH3R_13.1.3/com.ibm.xlcpp1313.aix.doc/language_ref/compound_literals.html 



I have no idea why it would fail here.

Regards,

Stephan.


Well, if I had the budget to buy the latest version (version 13 is 
your doclink) - then maybe it would work for me. I do not have the 
resources to upgrade from v11. Sad day for me I guess.


Or lucky for me that "Compound Literal" is not used much - this is 
the first time I have run into it.


Well, older versions are supposed to support it too:

https://www.ibm.com/support/knowledgecenter/SSGH3R_11.1.0/com.ibm.xlcpp111.aix.doc/language_ref/compound_literals.html 



Regards,

Stephan.


I am trying to work on it. Hard to read until you know what you are 
looking at.


I had already seen that 11.1 also shows the link - I guess it does not 
like the nested form.


And, it looks as if you have too many {} pairs (one too many outside 
pairs) - the .info report was mentioning they were more than needed and 
'skipping' iirc.


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Stephan Bosch



Op 10-10-2016 om 17:16 schreef Michael Felt:

On 10/10/2016 14:59, Stephan Bosch wrote:



Op 10-10-2016 om 14:39 schreef Michael Felt:

On 10-Oct-16 06:45, Aki Tuomi wrote:

Does your build end at some particular point?

See  DETAILS  for in depth (I hope enough!) study/report.


Aki


I would guess this is not "c99" way...


It seems to fail on a C99 feature called Compound Literal (see 
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf, Section 
6.5.2.5).


It should be supported by AIX:

https://www.ibm.com/support/knowledgecenter/SSGH3R_13.1.3/com.ibm.xlcpp1313.aix.doc/language_ref/compound_literals.html 



I have no idea why it would fail here.

Regards,

Stephan.


Well, if I had the budget to buy the latest version (version 13 is 
your doclink) - then maybe it would work for me. I do not have the 
resources to upgrade from v11. Sad day for me I guess.


Or lucky for me that "Compound Literal" is not used much - this is the 
first time I have run into it.


Well, older versions are supposed to support it too:

https://www.ibm.com/support/knowledgecenter/SSGH3R_11.1.0/com.ibm.xlcpp111.aix.doc/language_ref/compound_literals.html

Regards,

Stephan.


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Michael Felt

On 10/10/2016 14:59, Stephan Bosch wrote:



Op 10-10-2016 om 14:39 schreef Michael Felt:

On 10-Oct-16 06:45, Aki Tuomi wrote:

Does your build end at some particular point?

See  DETAILS  for in depth (I hope enough!) study/report.


Aki


I would guess this is not "c99" way...


It seems to fail on a C99 feature called Compound Literal (see 
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf, Section 
6.5.2.5).


It should be supported by AIX:

https://www.ibm.com/support/knowledgecenter/SSGH3R_13.1.3/com.ibm.xlcpp1313.aix.doc/language_ref/compound_literals.html 



I have no idea why it would fail here.

Regards,

Stephan.


Well, if I had the budget to buy the latest version (version 13 is your 
doclink) - then maybe it would work for me. I do not have the resources 
to upgrade from v11. Sad day for me I guess.


Or lucky for me that "Compound Literal" is not used much - this is the 
first time I have run into it.


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Stephan Bosch



Op 10-10-2016 om 14:39 schreef Michael Felt:

On 10-Oct-16 06:45, Aki Tuomi wrote:

Does your build end at some particular point?

See  DETAILS  for in depth (I hope enough!) study/report.


Aki


I would guess this is not "c99" way...


It seems to fail on a C99 feature called Compound Literal (see 
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf, Section 6.5.2.5).


It should be supported by AIX:

https://www.ibm.com/support/knowledgecenter/SSGH3R_13.1.3/com.ibm.xlcpp1313.aix.doc/language_ref/compound_literals.html

I have no idea why it would fail here.

Regards,

Stephan.


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Michael Felt

On 10-Oct-16 06:45, Aki Tuomi wrote:

Does your build end at some particular point?

See  DETAILS  for in depth (I hope enough!) study/report.


Aki


I would guess this is not "c99" way...

Making all in lib-http
source='test-http-auth.c' object='test-http-auth.o' libtool=no  
DEPDIR=.deps depmode=xlc /bin/sh ../../depcomp  xlc_r -DHAVE_CONFIG_H 
-I. -I../..  -I../../src/lib -I../../src/lib-test  -I../../src/lib-dns 
-I../../src/lib-ssl-iostream  -I../../src/lib-master -I/opt/include 
-I/opt/buildaix/include  -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 
-I/opt/buildaix/includes  -c -o test-http-auth.o test-http-auth.c
"test-http-auth.c", line 27.27: 1506-022 (S) "scheme" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 27.37: 1506-196 (W) Initialization between 
types "struct http_auth_challenge_test* const" and "char*" is not allowed.
"test-http-auth.c", line 28.33: 1506-022 (S) "data" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 28.41: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 29.33: 1506-022 (S) "params" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 30.43: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 30.52: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 30.70: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 30.76: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 33.33: 1506-022 (S) "scheme" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 33.43: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 43.27: 1506-022 (S) "scheme" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 43.37: 1506-196 (W) Initialization between 
types "struct http_auth_challenge_test* const" and "char*" is not allowed.
"test-http-auth.c", line 44.33: 1506-022 (S) "data" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 44.41: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 45.33: 1506-022 (S) "params" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 46.43: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 46.52: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 47.43: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 47.50: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 48.43: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 48.52: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 49.43: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 49.53: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 50.43: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 50.49: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 53.33: 1506-022 (S) "scheme" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 53.43: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 60.27: 1506-022 (S) "scheme" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 60.37: 1506-196 (W) Initialization between 
types "struct http_auth_challenge_test* const" and "char*" is not allowed.
"test-http-auth.c", line 61.33: 1506-022 (S) "data" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 61.41: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 62.33: 1506-022 (S) "params" is not a member of 
"const struct http_auth_challenges_test".
"test-http-auth.c", line 63.43: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 63.52: 1506-026 (S) Number of initializers 
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 

Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Michael Felt

On 10-Oct-16 06:45, Aki Tuomi wrote:

We do already support various non-GNU platforms, but our code does expect C99 
conforming compiler these days. We also use autotools and libtool. rpcgen 
should be available, at least according to
http://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds4/rpcgen.htm


oops - this is in bos.net.nfs.server!

FYI:

root@x064:[/data/prj/aixtools/dovecot/dovecot-2.2.25]lslpp -w 
/usr/bin/rpcgen

  File Fileset   Type

  /usr/bin/rpcgen bos.net.nfs.serverFile


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-10 Thread Michael Felt

On 10-Oct-16 06:45, Aki Tuomi wrote:

We do already support various non-GNU platforms, but our code does expect C99 
conforming compiler these days. We also use autotools and libtool. rpcgen 
should be available, at least according to
http://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds4/rpcgen.htm

Does your build end at some particular point?


a) found rpcgen - not installed by default (it is included in 
bos.net.tcp.adt - recognizable for AIX admins). Thanks for the pointer! 
FYI, although the documentation is AIX 6.1, the program has been around 
much longer - only the web documentation is non existent.


b) yes, it ended at some point (was in first post), but I shall try 
again with rpcgen installed - see if that goes better.


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-09 Thread Aki Tuomi

> On October 10, 2016 at 3:57 AM Michael Felt  wrote:
> 
> 
> On 09-Oct-16 22:51, Aki Tuomi wrote:
> >>
> >> Michael
> >
> > Does the compiler support C99 standard?
> >
> > Aki 
> 
> Yes. Plus extended features. Key difference with GCC, e.g., are the 
> flags to the compiler, but autotools general manages those well.
> 
> Key difference with platform (well, of of) is that it is not GNU, and 
> how shared libraries are built. Again, libtool in particular, handles 
> this well.

We do already support various non-GNU platforms, but our code does expect C99 
conforming compiler these days. We also use autotools and libtool. rpcgen 
should be available, at least according to 
http://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds4/rpcgen.htm

Does your build end at some particular point? 

Aki


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-09 Thread Michael Felt

On 09-Oct-16 22:51, Aki Tuomi wrote:


Michael


Does the compiler support C99 standard?

Aki 


Yes. Plus extended features. Key difference with GCC, e.g., are the 
flags to the compiler, but autotools general manages those well.


Key difference with platform (well, of of) is that it is not GNU, and 
how shared libraries are built. Again, libtool in particular, handles 
this well.


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2016-10-09 Thread Aki Tuomi



On 09.10.2016 22:48, Michael Felt wrote:

Hi.

I finally decided it was really time to stop being lazy and really 
move away from gmail. After I have a server in my basement using 
power, etc.


So I turned on the imap provided - and did not quite cry - it will 
have to do for now, but imap2 is wanting.


A real server yes, but not Linux. (Using linux would require another 
server AND I would feel I am being lazy again).


So, I downloaded dovecot-2.2.25 and tried to build.

Configure (messages to stderr)

xlc is /usr/vacpp/bin/xlc
+ CPPFLAGS="-I/opt/include -I/opt/buildaix/include" 
CFLAGS="-I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 
-I/opt/buildaix/includes

./configure\
--prefix=/opt \
--sysconfdir=/var/dovecot/etc\
--sharedstatedir=/var/dovecot/com\
--localstatedir=/var/dovecot\
--mandir=/usr/share/man\
--infodir=/opt/share/info/dovecot \
> .buildaix/configure.out
xlc_r: 1501-216 (W) command option -dM is not recognized - passed to ld
xlc_r: 1501-228 (W) input file c not found
1506-297 (S) Unable to open input file null. No such file or directory.
./configure[25617]: rpcgen:  not found

messages to stderr by make:

I am quite willing to dig and dig - but I want to be know if there 
will be any interest and/or support for dovecot on AIX.



Sincerely,

Michael


Does the compiler support C99 standard?

Aki