cookies module fails to load when built as DSO
I built the 2.7.0 release with most modules compiled as DSOs. knot failed to start with the following error:
2018-08-15T17:25:07 error: module, failed to open '/home/redmonds/.install/stow/knot-2.7.0/lib/knot/cookies.so' (/home/redmonds/.install/stow/knot-2.7.0/lib/knot/cookies.so: undefined symbol: memzero) 2018-08-15T17:25:07 critical: failed to open configuration database '' (not exists)
It looks like the cookies DSO needs to be linked against libcontrib.la, i.e.:
--- a/src/knot/modules/cookies/Makefile.inc +++ b/src/knot/modules/cookies/Makefile.inc @@ -8,5 +8,6 @@ endif if SHARED_MODULE_cookies knot_modules_cookies_la_LDFLAGS = $(KNOTD_MOD_LDFLAGS) knot_modules_cookies_la_CPPFLAGS = $(KNOTD_MOD_CPPFLAGS) +knot_modules_cookies_la_LIBADD = libcontrib.la pkglib_LTLIBRARIES += knot/modules/cookies.la endif
I would also suggest that dlopen() failures like this not be fatal to the server, unless the module is actually required by the configuration, otherwise a buggy module in the module directory would cause knot to fail to start up.