Downstream in Debian (but for sure related to the new bind9 version) bind-dyndb-ldap fails to build against BIND 9.18.10, while it worked in BIND 9.18.8.
There is #215 to build against BIND 9.18.9, that follow the changed signature of isc_error_fatal and isc_error_unexpected, but 9.18.10 changes a few more functions.
Build against BIND 9.18.10
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../src -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -Werror -std=gnu99 -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wno-uninitialized -fvisibility=hidden -fno-delete-null-pointer-checks -std=gnu11 -c ../../src/ldap_driver.c -fPIC -DPIC -o .libs/ldap_la-ldap_driver.o In file included from ../../src/zone_register.h:8, from ../../src/ldap_convert.c:28: /usr/include/dns/zt.h:171:28: error: unknown type name ‘isc_rwlocktype_t’; did you mean ‘isc_rwlock_t’? 171 | dns_zt_apply(dns_zt_t *zt, isc_rwlocktype_t lock, bool stop, isc_result_t *sub, | ^~~~~~~~~~~~~~~~ | isc_rwlock_t ../../src/ldap_driver.c: In function ‘allrdatasets’: ../../src/ldap_driver.c:474:71: error: passing argument 5 of ‘dns_db_allrdatasets’ makes integer from pointer without a cast [-Werror=int-conversion] 474 | return dns_db_allrdatasets(ldapdb->rbtdb, node, version, now, iteratorp); | ^~~~~~~~~ | | | dns_rdatasetiter_t ** {aka struct dns_rdatasetiter **} In file included from ../../src/ldap_driver.c:22: /usr/include/dns/db.h:1162:57: note: expected ‘isc_stdtime_t’ {aka ‘unsigned int’} but argument is of type ‘dns_rdatasetiter_t **’ {aka ‘struct dns_rdatasetiter **’} 1162 | unsigned int options, isc_stdtime_t now, | ~~~~~~~~~~~~~~^~~ ../../src/ldap_driver.c:474:16: error: too few arguments to function ‘dns_db_allrdatasets’ 474 | return dns_db_allrdatasets(ldapdb->rbtdb, node, version, now, iteratorp); | ^~~~~~~~~~~~~~~~~~~ /usr/include/dns/db.h:1161:1: note: declared here 1161 | dns_db_allrdatasets(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, | ^~~~~~~~~~~~~~~~~~~ ../../src/ldap_driver.c: In function ‘node_isempty’: ../../src/ldap_driver.c:517:62: error: passing argument 5 of ‘dns_db_allrdatasets’ makes integer from pointer without a cast [-Werror=int-conversion] 517 | result = dns_db_allrdatasets(db, node, version, now, &rds_iter); | ^~~~~~~~~ | | | dns_rdatasetiter_t ** {aka struct dns_rdatasetiter **} /usr/include/dns/db.h:1162:57: note: expected ‘isc_stdtime_t’ {aka ‘unsigned int’} but argument is of type ‘dns_rdatasetiter_t **’ {aka ‘struct dns_rdatasetiter **’} 1162 | unsigned int options, isc_stdtime_t now, | ~~~~~~~~~~~~~~^~~ ../../src/ldap_driver.c:517:18: error: too few arguments to function ‘dns_db_allrdatasets’ 517 | result = dns_db_allrdatasets(db, node, version, now, &rds_iter); | ^~~~~~~~~~~~~~~~~~~ /usr/include/dns/db.h:1161:1: note: declared here 1161 | dns_db_allrdatasets(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, | ^~~~~~~~~~~~~~~~~~~ make[3]: *** [Makefile:592: ldap_la-ldap_convert.lo] Error 1 make[3]: *** Waiting for unfinished jobs.... ../../src/ldap_driver.c: At top level: ../../src/ldap_driver.c:950:9: error: initialization of ‘isc_result_t (*)(dns_db_t *, dns_dbnode_t *, dns_dbversion_t *, unsigned int, isc_stdtime_t, dns_rdatasetiter_t **)’ {aka ‘enum isc_result (*)(struct dns_db *, void *, void *, unsigned int, unsigned int, struct dns_rdatasetiter **)’} from incompatible pointer type ‘isc_result_t (*)(dns_db_t *, dns_dbnode_t *, dns_dbversion_t *, isc_stdtime_t, dns_rdatasetiter_t **)’ {aka ‘enum isc_result (*)(struct dns_db *, void *, void *, unsigned int, struct dns_rdatasetiter **)’} [-Werror=incompatible-pointer-types] 950 | allrdatasets, | ^~~~~~~~~~~~ ../../src/ldap_driver.c:950:9: note: (near initialization for ‘ldapdb_methods.allrdatasets’) ../../src/ldap_driver.c: In function ‘allrdatasets’: ../../src/ldap_driver.c:475:1: error: control reaches end of non-void function [-Werror=return-type] 475 | } | ^ cc1: all warnings being treated as errors
Plugin version: 11.10
Version of BIND: 9.18.10
Distribution and version (i.e. including updates): Debian Sid
Architecture: amd64
Do you use bind-dyndb-ldap as part of FreeIPA installation? no
AFAICT two of the commits causing this are
https://gitlab.isc.org/isc-projects/bind9/-/commit/1de9c052107a6f24e565441f53e4d8b33bb2e30a https://gitlab.isc.org/isc-projects/bind9/-/commit/6f998bbe518ae629685404bcfddcfd6067176660
@tjaalton @bschmidt I have created https://pagure.io/bind-dyndb-ldap/pull-request/217 to address these issues. We don't use dns_zt_apply() at all but dns/zt.h now uses RW lock type which is defined in isc/rwlock.h but not included. So any include of dns/zt.h should be prefaced with include of isc/rwlock.h.
dns_zt_apply()
dns/zt.h
isc/rwlock.h
The second issue is solved by adding a macro that injects a new parameter when needed.
Ok, we went back and forth with @tjaalton and compilation issues now addressed. @bschmidt, let me know if that PR works for you, then I'll merge it.
dns_db_allrdatasets
9.16.36
Hi and FYI,
Have successfully built this package branch "[47902df] Handle dns_db_allrdatasets() backports too" on Manjaro aarch64 (updated 26 Jan 2023) against "extra/bind 9.18.10-1" and "core/openldap 2.6.3-2".
Have been running with this build for several days without issue - have modified several LDAP records and tested name resolution in general with success.
Metadata Update from @pemensik: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.