Dovecot 2.3.15 compilation fails
Andreas M. Kirchwitz
amk at krell.zikzak.de
Sun Jun 27 14:38:14 EEST 2021
Hello Dovecot users and developers!
Up to Dovecot 2.3.14.1 manual compilation of Dovecot sources was fine, I have an old 32-bit Linux server with GCC 4.4.7 where I compile almost all things manually. Works fine, never had problems with GCC versions.
env LDFLAGS="-Wl,--no-as-needed" ./configure --prefix=/usr/local/dovecot --with-ssl=openssl --with-ssldir=/usr/local/dovecot/etc/dovecot/certs
make
Unfortunately, Dovecot 2.3.15 fails to compile at test-smtp-params.c (works with a recent GCC 11.1.1 on my desktop, but servers usually come with older stuff). I know a little bit of programming but that's above my head what goes wrong here and how I could fix it to continue (so I don't know if that's the only problem or if there will be more).
See below (at the end) for the exact error message.
I assume this compilation issue was not an intentional change/requirement between 2.3.14(.1) and 2.3.15, it just happened.
I don't think that the problem is in "test-smtp-params.c" itself but some declarations somewhere else are missing, but I'm no expert here. There were too many changes in the src/lib-smtp source tree to understand what may have caused this (or maybe it's even somewhere else).
Any help is highly appreciated. I'd be happy to help and try out any ideas or patches. I'd like to see that Dovecot can be compiled on as many platforms as possible, as long as there are no fundamental requirements making this impossible.
Thanks a lot in advance and keep up the good work,
Andreas
[last lines of compilation process when error happens]
gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib -I../../src/lib-test -I../../src/lib-settings -I../../src/lib-master -I../../src/lib-sasl -I../../src/lib-ssl-iostream -I../../src/lib-dns -I../../src/lib-program-client -I../../src/lib-mail -DTEST_BIN_DIR=\"/usr/local/src/dovecot-2.3.15/src/lib-smtp/test-bin\" -std=gnu99 -g -O2 -fstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -mfunction-return=keep -mindirect-branch=keep -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 -I/usr/local/OpenSSL-1.1.1/include -MT test-smtp-params.o -MD -MP -MF .deps/test-smtp-params.Tpo -c -o test-smtp-params.o test-smtp-params.c
test-smtp-params.c:29: error: unknown field ‘data’ specified in initializer
test-smtp-params.c:29: warning: missing braces around initializer
test-smtp-params.c:29: warning: (near initialization for ‘test_params_buffer1.<anonymous>’)
test-smtp-params.c:30: warning: missing initializer
test-smtp-params.c:30: warning: (near initialization for ‘test_params_buffer1.<anonymous>.<anonymous>.used’)
test-smtp-params.c:30: error: unknown field ‘used’ specified in initializer
test-smtp-params.c:31: warning: excess elements in struct initializer
test-smtp-params.c:31: warning: (near initialization for ‘test_params_buffer1’)
test-smtp-params.c:33: error: unknown field ‘data’ specified in initializer
test-smtp-params.c:33: warning: missing braces around initializer
test-smtp-params.c:33: warning: (near initialization for ‘test_params_buffer2.<anonymous>’)
test-smtp-params.c:34: warning: missing initializer
test-smtp-params.c:34: warning: (near initialization for ‘test_params_buffer2.<anonymous>.<anonymous>.used’)
test-smtp-params.c:34: error: unknown field ‘used’ specified in initializer
test-smtp-params.c:35: warning: excess elements in struct initializer
test-smtp-params.c:35: warning: (near initialization for ‘test_params_buffer2’)
make[3]: *** [test-smtp-params.o] Error 1
make[3]: Leaving directory `/usr/local/src/dovecot-2.3.15/src/lib-smtp'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/dovecot-2.3.15/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/dovecot-2.3.15'
make: *** [all] Error 2
More information about the dovecot
mailing list