multiple definition of `librpz_dnsrpzd_path'
Summary
during compilation, a link failure is returned because of multiple definitions of the librpz_dnsrpzd_path
symbol
BIND version used
source of 9.14.7
Steps to reproduce
compile with dnsrps enabled
What is the current bug behavior?
gcc -I/tmp/bind/trunk/src/bind-9.14.7 -I../.. -I. -I../../lib/dns -Iinclude -I/tmp/bind/trunk/src/bind-9.14.7/lib/dns/include -I../../lib/dns/include -I/tmp/bind/trunk/src/bind-9.14.7/lib/isc/include -I../../lib/isc -I../../lib/isc/include -I../../lib/isc/unix/include -I../../lib/isc/pthreads/include -I/usr/include -I/usr/include -DGSSAPI -DUSE_ISC_SPNEGO -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DDIG_SIGCHASE -I/usr/include -pthread -I/usr/include/libxml2 -fPIC -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing -fno-delete-null-pointer-checks -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -Wl,--export-dynamic -o libdns.la -rpath /usr/lib \
-version-info 1310:2:0 \
acl.lo adb.lo badcache.lo byaddr.lo cache.lo callbacks.lo catz.lo clientinfo.lo compress.lo db.lo dbiterator.lo dbtable.lo diff.lo dispatch.lo dlz.lo dns64.lo dnsrps.lo dnssec.lo ds.lo dyndb.lo ecs.lo fixedname.lo forward.lo ipkeylist.lo iptable.lo journal.lo keydata.lo keytable.lo lib.lo log.lo lookup.lo master.lo masterdump.lo message.lo name.lo ncache.lo nsec.lo nsec3.lo nta.lo order.lo peer.lo portlist.lo private.lo rbt.lo rbtdb.lo rcode.lo rdata.lo rdatalist.lo rdataset.lo rdatasetiter.lo rdataslab.lo request.lo resolver.lo result.lo rootns.lo rpz.lo rrl.lo rriterator.lo sdb.lo sdlz.lo soa.lo ssu.lo ssu_external.lo stats.lo tcpmsg.lo time.lo timer.lo tkey.lo tsec.lo tsig.lo ttl.lo update.lo validator.lo version.lo view.lo xfrin.lo zone.lo zonekey.lo zoneverify.lo zt.lo spnego.lo dst_api.lo dst_parse.lo dst_result.lo gssapi_link.lo gssapictx.lo hmac_link.lo openssl_link.lo openssldh_link.lo opensslecdsa_link.lo openssleddsa_link.lo opensslrsa_link.lo pkcs11rsa_link.lo pkcs11ecdsa_link.lo pkcs11eddsa_link.lo pkcs11.lo key.lo client.lo ecdb.lo geoip.lo ../../lib/isc/libisc.la -L/usr/lib -lcrypto -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -ljson-c -llmdb -lm -lGeoIP -L/usr/lib -lxml2 -lz -llzma -licui18n -licuuc -licudata -lm -ldl
libtool: link: gcc -shared -fPIC -DPIC .libs/acl.o .libs/adb.o .libs/badcache.o .libs/byaddr.o .libs/cache.o .libs/callbacks.o .libs/catz.o .libs/clientinfo.o .libs/compress.o .libs/db.o .libs/dbiterator.o .libs/dbtable.o .libs/diff.o .libs/dispatch.o .libs/dlz.o .libs/dns64.o .libs/dnsrps.o .libs/dnssec.o .libs/ds.o .libs/dyndb.o .libs/ecs.o .libs/fixedname.o .libs/forward.o .libs/ipkeylist.o .libs/iptable.o .libs/journal.o .libs/keydata.o .libs/keytable.o .libs/lib.o .libs/log.o .libs/lookup.o .libs/master.o .libs/masterdump.o .libs/message.o .libs/name.o .libs/ncache.o .libs/nsec.o .libs/nsec3.o .libs/nta.o .libs/order.o .libs/peer.o .libs/portlist.o .libs/private.o .libs/rbt.o .libs/rbtdb.o .libs/rcode.o .libs/rdata.o .libs/rdatalist.o .libs/rdataset.o .libs/rdatasetiter.o .libs/rdataslab.o .libs/request.o .libs/resolver.o .libs/result.o .libs/rootns.o .libs/rpz.o .libs/rrl.o .libs/rriterator.o .libs/sdb.o .libs/sdlz.o .libs/soa.o .libs/ssu.o .libs/ssu_external.o .libs/stats.o .libs/tcpmsg.o .libs/time.o .libs/timer.o .libs/tkey.o .libs/tsec.o .libs/tsig.o .libs/ttl.o .libs/update.o .libs/validator.o .libs/version.o .libs/view.o .libs/xfrin.o .libs/zone.o .libs/zonekey.o .libs/zoneverify.o .libs/zt.o .libs/spnego.o .libs/dst_api.o .libs/dst_parse.o .libs/dst_result.o .libs/gssapi_link.o .libs/gssapictx.o .libs/hmac_link.o .libs/openssl_link.o .libs/openssldh_link.o .libs/opensslecdsa_link.o .libs/openssleddsa_link.o .libs/opensslrsa_link.o .libs/pkcs11rsa_link.o .libs/pkcs11ecdsa_link.o .libs/pkcs11eddsa_link.o .libs/pkcs11.o .libs/key.o .libs/client.o .libs/ecdb.o .libs/geoip.o -Wl,-rpath -Wl,/tmp/bind/trunk/src/bind-9.14.7/lib/isc/.libs ../../lib/isc/.libs/libisc.so -L/usr/lib -lcrypto -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -ljson-c -llmdb -lGeoIP -lxml2 -lz -llzma -licui18n -licuuc -licudata -lm -ldl -march=x86-64 -mtune=generic -O2 -pthread -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--export-dynamic -pthread -Wl,-soname -Wl,libdns.so.1310 -o .libs/libdns.so.1310.0.2
/usr/bin/ld: .libs/rpz.o:(.bss+0x0): multiple definition of `librpz_dnsrpzd_path'; .libs/dnsrps.o:(.bss+0x80): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:580: libdns.la] Error 1
make[2]: Leaving directory '/tmp/bind/trunk/src/bind-9.14.7/lib/dns'
make[1]: *** [Makefile:84: subdirs] Error 1
make[1]: Leaving directory '/tmp/bind/trunk/src/bind-9.14.7/lib'
make: *** [Makefile:91: subdirs] Error 1
What is the expected correct behavior?
normal compile
Relevant configuration files
└─> grep -iP 'rp(s|z)' config.log config.h
config.log: $ ./configure --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --localstatedir=/var --disable-static --enable-fixed-rrset --enable-full-report --enable-dnsrps --with-python=/usr/bin/python --with-geoip --with-openssl --with-libidn2 --with-libjson --with-libxml2 --with-lmdb --with-libtool --with-dlz-postgres
config.log:configure:17485: checking for librpz __attribute__s
config.log:config.status:1482: creating bin/tests/system/rpz/Makefile
config.log:BIND9_CONFIGARGS='CONFIGARGS='\''--prefix=/usr'\'' '\''--sysconfdir=/etc'\'' '\''--sbindir=/usr/bin'\'' '\''--localstatedir=/var'\'' '\''--disable-static'\'' '\''--enable-fixed-rrset'\'' '\''--enable-full-report'\'' '\''--enable-dnsrps'\'' '\''--with-python=/usr/bin/python'\'' '\''--with-geoip'\'' '\''--with-openssl'\'' '\''--with-libidn2'\'' '\''--with-libjson'\'' '\''--with-libxml2'\'' '\''--with-lmdb'\'' '\''--with-libtool'\'' '\''--with-dlz-postgres'\'' '\''CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DDIG_SIGCHASE'\'' '\''LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'\'' '\''CPPFLAGS=-D_FORTIFY_SOURCE=0'\'''
config.log:#define LIBRPZ_HAVE_ATTR 1
config.log:#define DNSRPS_LIBRPZ_PATH "librpz.so"
config.log:#define DNSRPS_LIB_OPEN 2
config.log:#define USE_DNSRPS 1
config.h:/* dnsrps $librpz_name */
config.h:#define DNSRPS_LIBRPZ_PATH "librpz.so"
config.h:/* 0=no DNSRPS 1=static link 2=dlopen() */
config.h:#define DNSRPS_LIB_OPEN 2
config.h:/* have __attribute__s used in librpz.h */
config.h:#define LIBRPZ_HAVE_ATTR 1
config.h:#define USE_DNSRPS 1
Relevant logs and/or screenshots
└─> gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d --with-isl --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-install-libiberty --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-libunwind-exceptions --disable-werror gdc_include_dir=/usr/include/dlang/gdc Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.2.0 (GCC)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem.)