DHCP fails to build on arm. Reproducible: Always Steps to Reproduce: 1.build dhcp on ARM Actual Results: build failure Expected Results: clean build Failure: arm-linux-gnueabihf-gcc -I/var/tmp/portage/net-misc/dhcp-4.4.2-r2/work/dhcp-4.4.2/bind/bind-9.11.14 -I../.. -I./unix/include -I./nothreads/include -I./noatomic/include -I./include -I./include -I/var/tmp/portage/net-misc/dhcp-4.4.2-r2/work/dhcp-4.4.2/bind/bind-9.11.14/lib/dns/include -I../../lib/dns/include -DPK11_LIB_LOCATION=\"undefined\" -D_GNU_SOURCE -O2 -pipe -fomit-frame-pointer -fPIC -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing -fno-delete-null-pointer-checks -c stats.c stats.c: In function ‘setcounter’: stats.c:300:29: error: ‘val’ undeclared (first use in this function); did you mean ‘value’? 300 | stats->counters[counter] = val; | ^~~ | value stats.c:300:29: note: each undeclared identifier is reported only once for each function it appears in stats.c:286:20: warning: unused parameter ‘value’ [-Wunused-parameter] 286 | const uint64_t value) | ~~~~~~~~~~~~~~~^~~~~ make[1]: *** [Makefile:290: stats.o] Error 1 A peek into the source: static inline void setcounter(isc_stats_t *stats, const isc_statscounter_t counter, const uint64_t value) { #if ISC_PLATFORM_HAVESTDATOMIC atomic_store_explicit(&stats->counters[counter], value, memory_order_relaxed); #elif ISC_STATS_HAVEATOMICQ isc_atomic_storeq((int64_t *)&stats->counters[counter], value); #else # if ISC_STATS_USEMULTIFIELDS isc_atomic_store((int32_t *)&stats->counters[counter].hi, (uint32_t)((value >> 32) & 0xffffffff)); isc_atomic_store((int32_t *)&stats->counters[counter].lo, (uint32_t)(value & 0xffffffff)); # else stats->counters[counter] = val; # endif #endif } So obviously, yes there's no val and this should probably read value.
The problem lies in the bundled bind source, as can be seen here: https://gitlab.isc.org/isc-projects/bind9/-/blob/v9_11_20/lib/isc/stats.c That line was changed in later 9.11 versions (however still the broken 9.11 gets bundled with dhcp.
So I guess, this: https://gitlab.isc.org/isc-projects/bind9/-/commit/261c84d91d1b4581df9f7f0ec031908299de7726.diff Should be included as patch, as long as dhcp bundles a broken bind?
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65f86cdce2f35d916c5f3c41fd41900f3bf6bedb commit 65f86cdce2f35d916c5f3c41fd41900f3bf6bedb Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2020-11-20 19:29:17 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2020-11-20 19:29:17 +0000 net-misc/dhcp: backport build fix Closes: https://bugs.gentoo.org/752402 Signed-off-by: Mike Gilbert <floppym@gentoo.org> net-misc/dhcp/dhcp-4.4.2-r3.ebuild | 1 + net-misc/dhcp/files/dhcp-4.4.2-variable-name.patch | 25 ++++++++++++++++++++++ 2 files changed, 26 insertions(+)