Dovecot 2.2.30* compiling error
Hello.
I cant build 2.2.30*, but I can build fine version 2.2.29* with same options:
RedHat based customized distro, 2.6.28.10 kernel
Build options:
export CPPFLAGS export LDFLAGS
CPPFLAGS=-I/usr/local/ssl/include LDFLAGS=-L/usr/local/ssl/lib
./configure
--prefix=/usr
--with-ssl=openssl
--with-ssldir=/etc/ssl
--sysconfdir=/etc
--without-vpopmail
--with-pam
--without-bsdauth
--without-sql
--without-nss
--without-ldap
--without-pgsql
--without-mysql
--without-sqlite
--with-rundir=/var/run/dovecot
--without-deliver
--without-gssapi
Build error:
ltest_lib-test-bits.o: In function bits_required64': /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/bits.h:33: undefined reference to
__builtin_clzll'
/usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/bits.h:33: undefined
reference to __builtin_clzll' test_lib-test-bits.o: In function
test_bits_requiredXX':
/usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/test-bits.c:74: undefined
reference to __builtin_clzll' /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/test-bits.c:74: undefined reference to
__builtin_clzll'
/usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/test-bits.c:74: undefined
reference to __builtin_clzll' ./.libs/liblib.a(numpack.o): In function
numpack_decode':
/usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/numpack.c:43: undefined
reference to `__builtin_clz'
collect2: ld returned 1 exit status
Please advise?
-- Mart
Mart Pirita sysadmin@e-positive.ee wrote:
Hello.
I cant build 2.2.30*, but I can build fine version 2.2.29* with same options:
RedHat based customized distro, 2.6.28.10 kernel
[...]
Build error:
ltest_lib-test-bits.o: In function
bits_required64': /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/bits.h:33: undefined reference to
__builtin_clzll' /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/bits.h:33: undefined reference to__builtin_clzll' test_lib-test-bits.o: In function
test_bits_requiredXX': /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/test-bits.c:74: undefined reference to__builtin_clzll' /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/test-bits.c:74: undefined reference to
__builtin_clzll' /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/test-bits.c:74: undefined reference to__builtin_clzll' ./.libs/liblib.a(numpack.o): In function
numpack_decode': /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/numpack.c:43: undefined reference to `__builtin_clz' collect2: ld returned 1 exit status
Please advise? Time to upgrade ancient GCC?
Andrey Jr. Melnikov wrote:
Mart Pirita sysadmin@e-positive.ee wrote:
Hello. I cant build 2.2.30*, but I can build fine version 2.2.29* with same options: RedHat based customized distro, 2.6.28.10 kernel [...]
Build error: ltest_lib-test-bits.o: In function
bits_required64': /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/bits.h:33: undefined reference to
__builtin_clzll' /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/bits.h:33: undefined reference to__builtin_clzll' test_lib-test-bits.o: In function
test_bits_requiredXX': /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/test-bits.c:74: undefined reference to__builtin_clzll' /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/test-bits.c:74: undefined reference to
__builtin_clzll' /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/test-bits.c:74: undefined reference to__builtin_clzll' ./.libs/liblib.a(numpack.o): In function
numpack_decode': /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/numpack.c:43: undefined reference to `__builtin_clz' collect2: ld returned 1 exit status Please advise? Time to upgrade ancient GCC?
Well, I know it's old, but I didn't notice in changelog that something special new was added, so maybe this is somekind of bug?
Andrey Jr. Melnikov wrote:
Mart Pirita sysadmin@e-positive.ee wrote:
Hello. I cant build 2.2.30*, but I can build fine version 2.2.29* with same options: RedHat based customized distro, 2.6.28.10 kernel [...]
Build error: ltest_lib-test-bits.o: In function
bits_required64': /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/bits.h:33: undefined reference to
__builtin_clzll' /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/bits.h:33: undefined reference to__builtin_clzll' test_lib-test-bits.o: In function
test_bits_requiredXX': /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/test-bits.c:74: undefined reference to__builtin_clzll' /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/test-bits.c:74: undefined reference to
__builtin_clzll' /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/test-bits.c:74: undefined reference to__builtin_clzll' ./.libs/liblib.a(numpack.o): In function
numpack_decode': /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/numpack.c:43: undefined reference to `__builtin_clz' collect2: ld returned 1 exit status Please advise? Time to upgrade ancient GCC?
Well, I know it's old, but I didn't notice in changelog that something special new was added, so maybe this is somekind of bug?
Edit, tested with newer gcc and got new error:
db-checkpassword.c: In function 'sigchld_handler': db-checkpassword.c:434:6: error: assignment of read-only member '__in' db-checkpassword.c:437:26: error: assignment of read-only member '__in' db-checkpassword.c:439:13: error: assignment of read-only member '__in' db-checkpassword.c:440:26: error: assignment of read-only member '__in' make[3]: *** [db-checkpassword.lo] Error 1
Seems this is quite old error - https://dovecot.org/list/dovecot/2012-October/086033.html
On 21 Jun 2017, at 16.03, Mart Pirita sysadmin@e-positive.ee wrote:
ltest_lib-test-bits.o: In function
bits_required64': /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/bits.h:33: undefined reference to
__builtin_clzll'
This can be fixed with the attached patch.
Edit, tested with newer gcc and got new error:
db-checkpassword.c: In function 'sigchld_handler': db-checkpassword.c:434:6: error: assignment of read-only member '__in' db-checkpassword.c:437:26: error: assignment of read-only member '__in' db-checkpassword.c:439:13: error: assignment of read-only member '__in' db-checkpassword.c:440:26: error: assignment of read-only member '__in'
But this is weird. Why are your WIFSIGNALED(), WTERMSIG(), WIFEXITED() and WEXITSTATUS() macros trying to write to the status variable? Also this code hasn't even changed between 2.2.29 and 2.2.30.
Timo Sirainen wrote:
On 21 Jun 2017, at 16.03, Mart Pirita sysadmin@e-positive.ee wrote:
ltest_lib-test-bits.o: In function
bits_required64': /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/bits.h:33: undefined reference to
__builtin_clzll' This can be fixed with the attached patch.
Thanks, got this time new error, do You have fix for this:
test_lib-test-bits.o: In function bits_required16': /usr/src/redhat/BUILD/dovecot-2.2.30.2/src/lib/bits.h:41: undefined reference to
bits_required8'
/usr/src/redhat/BUILD/dovecot-2.2.30.2/src/lib/bits.h:41: undefined
reference to bits_required8' /usr/src/redhat/BUILD/dovecot-2.2.30.2/src/lib/bits.h:41: undefined reference to
bits_required8'
/usr/src/redhat/BUILD/dovecot-2.2.30.2/src/lib/bits.h:41: undefined
reference to bits_required8' /usr/src/redhat/BUILD/dovecot-2.2.30.2/src/lib/bits.h:41: undefined reference to
bits_required8'
test_lib-test-bits.o:/usr/src/redhat/BUILD/dovecot-2.2.30.2/src/lib/bits.h:41:
more undefined references to `bits_required8' follow
collect2: ld returned 1 exit status
make[4]: *** [test-lib] Error 1
Edit, tested with newer gcc and got new error:
db-checkpassword.c: In function 'sigchld_handler': db-checkpassword.c:434:6: error: assignment of read-only member '__in' db-checkpassword.c:437:26: error: assignment of read-only member '__in' db-checkpassword.c:439:13: error: assignment of read-only member '__in' db-checkpassword.c:440:26: error: assignment of read-only member '__in' But this is weird. Why are your WIFSIGNALED(), WTERMSIG(), WIFEXITED() and WEXITSTATUS() macros trying to write to the status variable? Also this code hasn't even changed between 2.2.29 and 2.2.30.
Like the previously included url said - "looks like this might be a bug in glibc 2.3.3". The previous builds was all made with older gcc and no such error.
-- Mart
On 21 Jun 2017, at 16.42, Mart Pirita sysadmin@e-positive.ee wrote:
Timo Sirainen wrote:
On 21 Jun 2017, at 16.03, Mart Pirita sysadmin@e-positive.ee wrote:
ltest_lib-test-bits.o: In function
bits_required64': /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/bits.h:33: undefined reference to
__builtin_clzll' This can be fixed with the attached patch.Thanks, got this time new error, do You have fix for this:
test_lib-test-bits.o: In function
bits_required16': /usr/src/redhat/BUILD/dovecot-2.2.30.2/src/lib/bits.h:41: undefined reference to
bits_required8'
Oh, didn't notice that one. Add the attached patch on top of the other patch.
Timo Sirainen wrote:
On 21 Jun 2017, at 16.42, Mart Pirita sysadmin@e-positive.ee wrote:
Timo Sirainen wrote:
On 21 Jun 2017, at 16.03, Mart Pirita sysadmin@e-positive.ee wrote:
ltest_lib-test-bits.o: In function
bits_required64': /usr/src/redhat/BUILD/dovecot-2.2.30/src/lib/bits.h:33: undefined reference to
__builtin_clzll' This can be fixed with the attached patch. Thanks, got this time new error, do You have fix for this:test_lib-test-bits.o: In function
bits_required16': /usr/src/redhat/BUILD/dovecot-2.2.30.2/src/lib/bits.h:41: undefined reference to
bits_required8' Oh, didn't notice that one. Add the attached patch on top of the other patch.
Timo - thank You! You fixed it, v2.2.30.2 compiled fine with gcc-3.3.6.
Also please add both patches into v2.2.31.
-- Mart
participants (3)
-
Andrey Jr. Melnikov
-
Mart Pirita
-
Timo Sirainen