Linking failure on macOS 12.2
Summary
bind9.18.0 fails to build on macOS 12.2 when linking filter_aaaa
BIND version used
9.18.0
Steps to reproduce
Attempt to build on macOS 12.2.x
What is the current bug behavior?
build fails due to missing symbols when linking
What is the expected correct behavior?
build succeeds
Possible fixes
This patch is what I'm currently using to fix the MacPorts build (although you probably want to patch the .am files instead of the .in files):
+++ bin/plugins/Makefile.in 2022-02-16 15:00:47.000000000 -0500
@@ -478,8 +478,8 @@
pkglib_LTLIBRARIES = filter-aaaa.la filter-a.la
filter_aaaa_la_SOURCES = filter-aaaa.c
filter_a_la_SOURCES = filter-a.c
-filter_aaaa_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
-filter_a_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+filter_aaaa_la_LDFLAGS = $(LIBISC_LIBS) $(LIBISCCFG_LIBS) $(LIBDNS_LIBS) $(LIBNS_LIBS) -avoid-version -module -shared -export-dynamic
+filter_a_la_LDFLAGS = $(LIBISC_LIBS) $(LIBISCCFG_LIBS) $(LIBDNS_LIBS) $(LIBNS_LIBS) -avoid-version -module -shared -export-dynamic
all: all-am
.SUFFIXES:
--- bin/tests/system/dyndb/driver/Makefile.in.orig 2022-02-16 15:24:01.000000000 -0500
+++ bin/tests/system/dyndb/driver/Makefile.in 2022-02-16 15:24:20.000000000 -0500
@@ -457,7 +457,7 @@
util.h \
zone.h
-sample_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath $(abs_builddir)
+sample_la_LDFLAGS = $(LIBISC_LIBS) $(LIBISCCFG_LIBS) $(LIBDNS_LIBS) $(LIBNS_LIBS) -avoid-version -module -shared -export-dynamic -rpath $(abs_builddir)
all: all-am
.SUFFIXES:
--- bin/tests/system/dlzexternal/driver/Makefile.in.orig 2022-02-16 15:42:36.000000000 -0500
+++ bin/tests/system/dlzexternal/driver/Makefile.in 2022-02-16 15:43:01.000000000 -0500
@@ -442,7 +442,7 @@
driver.c \
driver.h
-dlzexternal_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath $(abs_builddir)
+dlzexternal_la_LDFLAGS = $(LIBISC_LIBS) -avoid-version -module -shared -export-dynamic -rpath $(abs_builddir)
all: all-am
.SUFFIXES:
--- bin/tests/system/hooks/driver/Makefile.in.orig 2022-02-16 15:48:28.000000000 -0500
+++ bin/tests/system/hooks/driver/Makefile.in 2022-02-16 15:49:02.000000000 -0500
@@ -439,7 +439,7 @@
check_LTLIBRARIES = test-async.la
test_async_la_SOURCES = test-async.c
-test_async_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath $(abs_builddir)
+test_async_la_LDFLAGS = $(LIBISC_LIBS) $(LIBNS_LIBS) -avoid-version -module -shared -export-dynamic -rpath $(abs_builddir)
all: all-am
.SUFFIXES: