building out-of-tree fails with dnstap enabled
Summary
Building BIND 9.11.11 and 9.14.6 out-of-tree fails with dnstap enabled.
It fails to compile dnstap.proto
.
BIND version used
BIND 9.11.11 (Extended Support Version) <id:4ae9ff1>
running on Linux x86_64 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u5 (2019-08-11)
built by make with '--enable-dnstap' '--without-python'
compiled by GCC 6.3.0 20170516
compiled with OpenSSL version: OpenSSL 1.1.0k 28 May 2019
linked to OpenSSL version: OpenSSL 1.1.0k 28 May 2019
compiled with libxml2 version: 2.9.4
linked to libxml2 version: 20904
compiled with zlib version: 1.2.8
linked to zlib version: 1.2.8
threads support is enabled
BIND 9.14.6 (Stable Release) <id:efd3496>
running on Linux x86_64 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u5 (2019-08-11)
built by make with '--enable-dnstap' '--without-python' '--disable-linux-caps'
compiled by GCC 6.3.0 20170516
compiled with OpenSSL version: OpenSSL 1.1.0k 28 May 2019
linked to OpenSSL version: OpenSSL 1.1.0k 28 May 2019
compiled with libxml2 version: 2.9.4
linked to libxml2 version: 20904
compiled with zlib version: 1.2.8
linked to zlib version: 1.2.8
threads support is enabled
default paths:
named configuration: /etc/named.conf
rndc configuration: /etc/rndc.conf
DNSSEC root key: /etc/bind.keys
nsupdate session key: /var/run/named/session.key
named PID file: /var/run/named/named.pid
named lock file: /var/run/named/named.lock
Steps to reproduce
- download tarball and build out-of-tree
$ tar -xzf bind-9.14.6.tar.gz
$ mkdir bind-9.14.6.obj
$ cd bind-9.14.6.obj
$ ../bind-9.14.6/configure --enable-dnstap
$ make
What is the current bug behavior?
It fails to compile dnstap.proto
.
/usr/bin/protoc-c --c_out=. --proto_path ../../../bind-9.14.6/lib/dns dnstap.proto
dnstap.proto: No such file or directory
What is the expected correct behavior?
It should finish building successfully.
Relevant configuration files
(Not applicable)
Relevant logs and/or screenshots
(See above)
Possible fixes
--proto_path
option is only applied to imports: not effective as proto file path specified in the argument.
The proto file path should be specified explicitly.
--- lib/dns/Makefile.in.orig 2019-09-09 23:51:54.000000000 +0900
+++ lib/dns/Makefile.in 2019-09-21 01:35:29.793993190 +0900
@@ -211,7 +211,7 @@
dnstap.@O@: dnstap.c dnstap.pb-c.c
dnstap.pb-c.c dnstap.pb-c.h: dnstap.proto
- $(PROTOC_C) --c_out=. --proto_path ${srcdir} dnstap.proto
+ $(PROTOC_C) --c_out=. --proto_path ${srcdir} ${srcdir}/dnstap.proto
dnstap.pb-c.@O@: dnstap.pb-c.c