lib/dns/gen.c:29:26: fatal error: isc/platform.h: No such file or directory
In OpenIndiana (an illumos distribution) we build BIND out-of-tree and BIND 9.14.9 fails to build for me with:
making all in /userland/ws/oi-userland/components/network/bind/build/amd64/lib/dns
make[3]: Entering directory '/userland/ws/oi-userland/components/network/bind/build/amd64/lib/dns'
/usr/gcc/6/bin/gcc -m64 -O3 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 -D_XPG6 -D_POSIX_PTHREAD_SEMANTICS -pthread -I/usr/include/libxml2 -fPIC -I/userland/ws/oi-userland/components/network/bind/bind-9.14.9/lib/isc/include \
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
-m64 -Wl,-ztext -o gen /userland/ws/oi-userland/components/network/bind/bind-9.14.9/lib/dns/gen.c \
-lnsl -lsocket -lscf -ljson-c -llmdb -lxml2 -lz -llzma -lpthread -lm -lsocket -lnsl
/userland/ws/oi-userland/components/network/bind/bind-9.14.9/lib/dns/gen.c:29:26: fatal error: isc/platform.h: No such file or directory
#include <isc/platform.h>
^
The culprit seems to originated in d10fbdec.
I was able to make the problem away with the following patch:
--- bind-9.14.9/lib/dns/Makefile.in 2019-12-12 07:12:17.000000000 +0000
+++ bind-9.14.9/lib/dns/Makefile.in 2019-12-22 15:48:17.354544762 +0000
@@ -172,7 +172,7 @@ code.h: gen
./gen -s ${srcdir} > code.h || { rm -f $@ ; exit 1; }
gen: gen.c
- ${BUILD_CC} ${BUILD_CFLAGS} -I${top_srcdir}/lib/isc/include \
+ ${BUILD_CC} ${BUILD_CFLAGS} -I../../lib/isc/include \
${LFS_CFLAGS} ${LFS_LDFLAGS} \
${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c \
${BUILD_LIBS} ${LFS_LIBS}
If it's indeed an out-of-tree build issue, respective CI job might we worth.