Timo - is the v2.3.15 GCC limitation really necessarily or it's just a bug?
Mart Pirita
mart at e-positive.ee
Sat Jul 31 20:06:31 EEST 2021
Hi,
Compiled GCC 4.7.4 with options:
--enable-languages=c,c++ --disable-multilib
Compiled Dovecot v2.3.15 wih options:
export CC=/usr/local/gcc-4.7.4/bin/gcc
export CXX=/usr/local/gcc-4.7.4/bin/g++
./configure --prefix=/usr --with-ssl=openssl --with-ssldir=/etc/ssl --sysconfdir=/etc --with-pam --without-bsdauth --without-sql --without-nss --without-ldap --without-pgsql --without-mysql --without-sqlite --with-rundir=/var/run/dovecot --without-cassandra --without-lucene --without-solr --without-textcat --without-libcap --without-stemmer --disable-rpath --disable-dependency-tracking --disable-silent-rules --without-gssapi --without-cdb
Got error:
configure: error: fd passing is required for Dovecot to work
Added --disable-hardening and got further, but then with GCC 4.7.4, now I'm getting same old error, which I first got 4 years ago with version v2.2.30 and which Timo fixed - https://dovecot.org/list/dovecot/2017-June/108418.html
db-checkpassword.c: In function 'sigchld_handler':
db-checkpassword.c:426:6: error: assignment of read-only member '__in'
db-checkpassword.c:427:3: error: assignment of read-only member '__in'
db-checkpassword.c:431:13: error: assignment of read-only member '__in'
db-checkpassword.c:432:26: error: assignment of read-only member '__in'
make[3]: *** [db-checkpassword.lo] Error 1
Due GCC segmentation faults during compilation, so far I'm unable to compile any newer GCC, but got also same result with GCC 4.6.4.
Please advise?
Mart
Timo Sirainen wrote:
> On 29. Jul 2021, at 7.21, Mart Pirita <mart at e-positive.ee <mailto:mart at e-positive.ee>> wrote:
>>
>> Hello.
>>
>> So far I have successfully built Dovecot until v2.3.14 on Centos 4-6 (yes I know, they are old, but as they are remote servers, distros can't upgraded), and sometimes I have also met compilation issues, but after highlighting them, Timo have fixed the code.
>>
>> Found from similar thread (Dovecot 2.3.15 compilation fails https://dovecot.org/list/dovecot/2021-June/122412.html ) that new GCC is needed. However I can't find such requirement in v2.3.15 change log.
>
> Looks like we forgot to mention that.
>
>> As seems that I'm not the only one with compilation issues, then @Timo - can You please fix the code so that also v2.3.15 can compiled on older distros?
>
> Sorry, it's no longer possible. The buffer.h API had to be changed to fix some real bugs: https://github.com/dovecot/core/commit/1d9b4e14008b15b7a34b5c633b09b9670e866256
>
> The original way I changed it would have made the code more complex and it was also a huge change. The final method was much simpler, but it requires now compiler support for anonymous unions and anonymous structs, i.e. C11. Although some older GCCs should also support it, but I guess you've a too old version.
>
More information about the dovecot
mailing list