BIND 9.18 fails to configure on NetBSD
Summary
BIND 9.18.8 fails to configure on NetBSD (-current or 9.3).
BIND version used
Source code for 9.18.8.
Steps to reproduce
./configure --with-libxml2=yes --with-tuning=large --sysconfdir=/etc --localstatedir=/var
What is the current bug behavior?
The above configure
line fails with
checking for jemalloc/jemalloc.h... no
configure: WARNING: jemalloc not found; performance will be reduced
configure: error: You cannot compile without jemalloc; jemalloc is the system allocator on NetBSD
and config.log contains
configure:24692: result: no
configure:24692: checking jemalloc/jemalloc.h presence
configure:24692: gcc -E conftest.c
conftest.c:143:10: fatal error: jemalloc/jemalloc.h: No such file or directory
143 | #include <jemalloc/jemalloc.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
configure:24692: $? = 1
and
configure:24692: result: no
configure:24692: checking for jemalloc/jemalloc.h
configure:24692: result: no
configure:24873: WARNING: jemalloc not found; performance will be reduced
configure:24888: error: You cannot compile without jemalloc; jemalloc is the system allocator on NetBSD
Trying the above configure
line with --with-jemalloc=yes
doesn't really change this, I still get
checking for jemalloc/jemalloc.h... no
configure: error: jemalloc not found
Trying the above configure
line with --with-jemalloc=no
also doesn't succeed, then I get:
configure: error: You cannot compile without jemalloc; jemalloc is the system allocator on NetBSD
What is the expected correct behavior?
While some of the text above is correct, i.e. that the system malloc() implementation on NetBSD is based on jemalloc
, NetBSD does not ship with a header accessible as <jemalloc/jemalloc.h>
. I do see our man page for jemalloc(3)
does (incorrectly) mention that include file location in its SYNOPSIS, that's a separate (NetBSD) documentation bug.
It does however seem that BIND's configure script still insists on the presence of this header.
Not sure what FreeBSD does, looking at configure.ac
if it doesn't have <jemalloc/jemalloc.h>
either, it will be similarly affected.
Relevant configuration files
N/A
Relevant logs and/or screenshots
See above.
Possible fixes
So far this points towards configure.ac
. Not sure if there is also actual code which insists on <jemalloc/jemalloc.h>
.
One hurdle at a time...
...
It seems lib/isc/mem.c
is the only other file which (conditionally) wants this header.