Hi Compiling dovecot 2.2.36.1 with the native compiler on Solaris 10 is giving the error below. Can anyone advise a compiler option or code change to resolve this please. Thanks. Roderick Johnstone # make make all-recursive Making all in . /bin/bash ./update-version.sh . . Making all in src Making all in lib-test Making all in lib make all-am source='sha3.c' object='sha3.lo' libtool=yes \ DEPDIR=.deps depmode=none /bin/bash ../../depcomp \ /bin/bash ../../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I../.. -I/export/home/exim_build_20190605/build_local/include -m64 -c -o sha3.lo sha3.c libtool: compile: cc -DHAVE_CONFIG_H -I. -I../.. -I/export/home/exim_build_20190605/build_local/include -m64 -c sha3.c -KPIC -DPIC -o .libs/sha3.o "sha3.h", line 49: warning: unnamed struct member "sha3.c", line 142: improper member use: s "sha3.c", line 142: improper member use: s "sha3.c", line 166: improper member use: s "sha3.c", line 173: improper member use: s "sha3.c", line 197: improper member use: s "sha3.c", line 200: improper member use: s "sha3.c", line 227: improper member use: s "sha3.c", line 231: improper member use: s "sha3.c", line 233: improper member use: s "sha3.c", line 259: improper member use: sb "sha3.c", line 268: improper member use: sb cc: acomp failed for sha3.c *** Error code 1
On 10/06/2019 14:40, Roderick Johnstone via dovecot wrote:> Compiling dovecot 2.2.36.1 with the native compiler on Solaris 10 is > giving the error below....> -m64 -c -o sha3.lo sha3.c > libtool: compile:? cc -DHAVE_CONFIG_H -I. -I../.. > -I/export/home/exim_build_20190605/build_local/include -m64 -c sha3.c > -KPIC -DPIC -o .libs/sha3.o > "sha3.h", line 49: warning: unnamed struct member... Untested: try naming the union. My own builds (dovecot 2.3.6) get through this. What compiler version? 12.6 is current and does not issue the unnamed struct warning, eg, 12.3 does. struct sha3_ctx { uint64_t saved; /* the portion of the input message that we * didn't consume yet */ union { /* Keccak's state */ uint64_t s[SHA3_KECCAK_SPONGE_WORDS]; uint8_t sb[SHA3_KECCAK_SPONGE_WORDS * 8]; } XXXXX;
On 10/06/2019 17:50, James via dovecot wrote:> On 10/06/2019 14:40, Roderick Johnstone via dovecot wrote: > >> Compiling dovecot 2.2.36.1 with the native compiler on Solaris 10 is >> giving the error below. > ... >> -m64 -c -o sha3.lo sha3.c >> libtool: compile:? cc -DHAVE_CONFIG_H -I. -I../.. >> -I/export/home/exim_build_20190605/build_local/include -m64 -c sha3.c >> -KPIC -DPIC -o .libs/sha3.o >> "sha3.h", line 49: warning: unnamed struct member > ... > > Untested: try naming the union. My own builds (dovecot 2.3.6) get > through this.? What compiler version? 12.6 is current and does not issue > the unnamed struct warning, eg, 12.3 does. > > struct sha3_ctx { > ??? uint64_t saved;? /* the portion of the input message that we > ????????????? * didn't consume yet */ > ??? union {????? /* Keccak's state */ > ??????? uint64_t s[SHA3_KECCAK_SPONGE_WORDS]; > ??????? uint8_t sb[SHA3_KECCAK_SPONGE_WORDS * 8]; > ??? } XXXXX;Hi James Thanks for the confirmation it builds fine with 12.6. We seem to have an ancient studio version (the original 12 release). We'll be updating the compilers to resolve this. Thanks again. Roderick