'key_mutex' undeclared in geoip2.c with threads disabled
Configuring v9_11
with --with-geoip2=auto
and --disable-threads
fails the build of geoip2.c
:
libtool: compile: gcc -I/home/newman/isc/ws/bind9 -I../.. -I. -I../../lib/dns -Iinclude -I/home/newman/isc/ws/bind9/lib/dns/include -I../../lib/dns/include -I/home/newman/isc/ws/bind9/lib/isc/include -I../../lib/isc -I../../lib/isc/include -I../../lib/isc/unix/include -I../../lib/isc/nothreads/include -I../../lib/isc/x86_32/include -I/usr/include -DUSE_MD5 -DOPENSSL -DGSSAPI -DUSE_ISC_SPNEGO -DISC_LIST_CHECKINIT=1 -D_GNU_SOURCE -g -O2 -I/usr/include/libxml2 -fPIC -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing -fno-delete-null-pointer-checks -Wshadow -Werror -c geoip2.c -fPIC -DPIC -o .libs/geoip2.o
In file included from /home/newman/isc/ws/bind9/lib/isc/include/isc/assertions.h:19,
from /home/newman/isc/ws/bind9/lib/isc/include/isc/list.h:15,
from /home/newman/isc/ws/bind9/lib/isc/include/isc/types.h:33,
from /home/newman/isc/ws/bind9/lib/isc/include/isc/result.h:19,
from ../../lib/isc/nothreads/include/isc/mutex.h:15,
from /home/newman/isc/ws/bind9/lib/isc/include/isc/mem.h:22,
from geoip2.c:25:
geoip2.c: In function ‘set_state’:
geoip2.c:195:9: error: ‘key_mutex’ undeclared (first use in this function)
195 | LOCK(&key_mutex);
| ^~~~~~~~~
/home/newman/isc/ws/bind9/lib/isc/include/isc/likely.h:23:52: note: in definition of macro ‘ISC_LIKELY’
23 | #define ISC_LIKELY(x) __builtin_expect((x), 1)
| ^
/home/newman/isc/ws/bind9/lib/isc/include/isc/util.h:315:30: note: in expansion of macro ‘ISC_ERROR_RUNTIMECHECK’
315 | #define RUNTIME_CHECK(cond) ISC_ERROR_RUNTIMECHECK(cond)
| ^~~~~~~~~~~~~~~~~~~~~~
/home/newman/isc/ws/bind9/lib/isc/include/isc/util.h:100:2: note: in expansion of macro ‘RUNTIME_CHECK’
100 | RUNTIME_CHECK(isc_mutex_lock((lp)) == ISC_R_SUCCESS); \
| ^~~~~~~~~~~~~
/home/newman/isc/ws/bind9/lib/isc/include/isc/util.h:100:16: note: in expansion of macro ‘isc_mutex_lock’
100 | RUNTIME_CHECK(isc_mutex_lock((lp)) == ISC_R_SUCCESS); \
| ^~~~~~~~~~~~~~
geoip2.c:195:3: note: in expansion of macro ‘LOCK’
195 | LOCK(&key_mutex);
| ^~~~
geoip2.c:195:9: note: each undeclared identifier is reported only once for each function it appears in
195 | LOCK(&key_mutex);
| ^~~~~~~~~
/home/newman/isc/ws/bind9/lib/isc/include/isc/likely.h:23:52: note: in definition of macro ‘ISC_LIKELY’
23 | #define ISC_LIKELY(x) __builtin_expect((x), 1)
| ^
/home/newman/isc/ws/bind9/lib/isc/include/isc/util.h:315:30: note: in expansion of macro ‘ISC_ERROR_RUNTIMECHECK’
315 | #define RUNTIME_CHECK(cond) ISC_ERROR_RUNTIMECHECK(cond)
| ^~~~~~~~~~~~~~~~~~~~~~
/home/newman/isc/ws/bind9/lib/isc/include/isc/util.h:100:2: note: in expansion of macro ‘RUNTIME_CHECK’
100 | RUNTIME_CHECK(isc_mutex_lock((lp)) == ISC_R_SUCCESS); \
| ^~~~~~~~~~~~~
/home/newman/isc/ws/bind9/lib/isc/include/isc/util.h:100:16: note: in expansion of macro ‘isc_mutex_lock’
100 | RUNTIME_CHECK(isc_mutex_lock((lp)) == ISC_R_SUCCESS); \
| ^~~~~~~~~~~~~~
geoip2.c:195:3: note: in expansion of macro ‘LOCK’
195 | LOCK(&key_mutex);
| ^~~~
make[2]: *** [Makefile:346: geoip2.lo] Error 1
@marka this blocks #2323 (closed).