Subject: | Unit tests don't build on 32-bit systems when configured with --enable-developer |
To: | bind9-public@isc.org |
From: | stephen@isc.org |
Date: | Thu, 19 Oct 2017 14:33:34 +0000 |
FreeBSD 11 (i386) and also Ubuntu 12.04 (32 bit):
After configuring BIND with --enable-developer (and --disable-atomic to overcome the issue identified in #46324), "make" failed with:
ht_test.c: In function 'test_ht_full':
ht_test.c:63:36: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
result = isc_ht_add(ht, key, 16, (void *) i);
^
In file included from /home/stephen/bind9/unit/atf/include/atf-c.h:34:0,
from ht_test.c:13:
ht_test.c:74:21: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
ATF_REQUIRE_EQ(i, (isc_int64_t) f);
^
/home/stephen/bind9/unit/atf/include/atf-c/macros.h:136:15: note: in definition of macro 'ATF_REQUIRE_MSG'
if (!(x)) \
^
... and several other similar errors in the same file.
True, --enable-developer promotes warnings to errors and the unit tests can be built without this flag. However, the test appears to be assuming a particular pointer size.