Overview: Hi, one of the configuration options presented for syslog-ng is "IPv6 protocol support." Beginning with version 4.6.0, when this option is disabled, the build complains about undefined symbols (g_sockaddr_inet6_check and g_sockaddr_inet6_is_v4_mapped), then fails. Not sure whether this is a port issue or something upstream; figured I'd start here first. Thanks! System: FreeBSD 13.2-RELEASE-p9 releng/13.2-n254652-c78c31d2ef40 amd64 Steps to reproduce: [root@host ~]# cd /usr/ports/sysutils/syslog-ng [root@host syslog-ng]# make clean ===> Cleaning for syslog-ng-4.6.0 [root@host syslog-ng]# make config uncheck the "IPv6 protocol support" option, hit Enter to save (specifically, my config only has "DOCS" and "JSON" enabled) [root@host syslog-ng]# make ... ...snip some successful build output... ... syslog-ng Open Source Edition 4.6.0 configured Edition settings: Release type : stable Pretty version : 4 Combined vers. : 4 (4.6.0) Package name : syslog-ng Compiler options: compiler : cc compiler options : -O2 -g -pthread -O2 -pipe -march=amdfam10 -fstack-protector-strong -fno-strict-aliasing -I/usr/local/include -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_68 -I$(top_srcdir)/lib/eventlog/src -I$(top_builddir)/lib/eventlog/src -I/usr/local/include -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 ObjC compiler : clang C++ enabled : no linker flags : -fstack-protector-strong prefix : /usr/local linking mode : dynamic embedded crypto : no __thread keyword : yes Test dependencies: Criterion : no Unit tests : no Submodules: ivykis : system Features: Forced server mode : yes Debug symbols : no GCC profiling : no Memtrace : no IPV6 support : no spoof-source support : no tcp-wrapper support : no Linux capability support : no Env wrapper support : no systemd support : no (unit dir: none) systemd-journal support : no JSON support : yes Build options: Generate manual pages : yes Install manual pages : yes Modules: Module search path : ${exec_prefix}/lib/syslog-ng Sun STREAMS support (module): no Darwin OSL support (module) : no OpenBSD syslog (module) : no SQL support (module) : no PACCT module (EXPERIMENTAL) : no MongoDB destination (module): no JSON support (module) : yes SMTP support (module) : no HTTP support (module) : no AMQP destination (module) : no STOMP destination (module) : yes MQTT (module) : no GRPC (module) : no Cloud Auth (module) : no GEOIP2 support (module) : no Redis support (module) : no Kafka support (module) : no Riemann destination (module): no, microseconds: no Python : no (pkg-config package: none, packages: none) Python modules : no Java : no Java modules : no afsnmp module : no eBPF module : no native bindings : auto Example modules : yes ===> Building for syslog-ng-4.6.0 gmake[2]: Entering directory '/usr/ports/sysutils/syslog-ng/work/syslog-ng-4.6.0' ... ...snip some successful build output... ... libtool: compile: cc -DHAVE_CONFIG_H -I. -I./lib -I./modules -I./lib -I./modules -I/usr/local/include -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_68 -I./lib/eventlog/src -I./lib/eventlog/src -I/usr/local/include -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wshadow -Wno-stack-protector -Wno-unused-parameter -Wno-variadic-macros -O2 -g -pthread -O2 -pipe -march=amdfam10 -fstack-protector-strong -fno-strict-aliasing -MT lib/template/libsyslog_ng_la-macros.lo -MD -MP -MF lib/template/.deps/libsyslog_ng_la-macros.Tpo -c lib/template/macros.c -fPIC -DPIC -o lib/template/.libs/libsyslog_ng_la-macros.o lib/template/macros.c:280:7: warning: implicit declaration of function 'g_sockaddr_inet6_check' is invalid in C99 [-Wimplicit-function-declaration] if (g_sockaddr_inet6_check(msg->saddr)) ^ lib/template/macros.c:282:11: warning: implicit declaration of function 'g_sockaddr_inet6_is_v4_mapped' is invalid in C99 [-Wimplicit-function-declaration] if (g_sockaddr_inet6_is_v4_mapped(msg->saddr)) ^ 2 warnings generated. ... ...snip some successful build output... ... libtool: link: cc -Wshadow -Wno-stack-protector -Wno-unused-parameter -Wno-variadic-macros -O2 -g -O2 -pipe -march=amdfam10 -fstack-protector-strong -fno-strict-aliasing -fstack-protector-strong -o modules/correlation/pdbtool/.libs/pdbtool modules/correlation/pdbtool/pdbtool-pdbtool.o -Wl,--export-dynamic ./lib/.libs/libsyslog-ng.so ./modules/correlation/.libs/libsyslog-ng-patterndb.a /usr/ports/sysutils/syslog-ng/work/syslog-ng-4.6.0/lib/.libs/libsyslog-ng.so -L/usr/local/lib /usr/ports/sysutils/syslog-ng/work/syslog-ng-4.6.0/lib/eventlog/src/.libs/libevtlog.so /usr/ports/sysutils/syslog-ng/work/syslog-ng-4.6.0/lib/secret-storage/.libs/libsecret-storage.so -L/usr/lib -lcrypto -lssl -lm -lrt -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl ./lib/eventlog/src/.libs/libevtlog.so ./lib/secret-storage/.libs/libsecret-storage.so -lpcre2-8 -lregex -ldl -livykis -pthread -Wl,-rpath -Wl,/usr/local/lib ld: error: ./lib/.libs/libsyslog-ng.so: undefined reference to g_sockaddr_inet6_check [--no-allow-shlib-undefined] ld: error: ./lib/.libs/libsyslog-ng.so: undefined reference to g_sockaddr_inet6_is_v4_mapped [--no-allow-shlib-undefined] cc: error: linker command failed with exit code 1 (use -v to see invocation) gmake[4]: *** [Makefile:17093: modules/correlation/pdbtool/pdbtool] Error 1 gmake[3]: *** [Makefile:29058: all-recursive] Error 1 gmake[2]: *** [Makefile:12537: all] Error 2 gmake[2]: Leaving directory '/usr/ports/sysutils/syslog-ng/work/syslog-ng-4.6.0' *** Error code 1 Stop. make[1]: stopped in /usr/ports/sysutils/syslog-ng *** Error code 1 Stop. make: stopped in /usr/ports/sysutils/syslog-ng
I will ask our upstream, who actually maintains this port, to weigh in.
Thanks. I could reproduce it both on FreeBSD and Linux. So, I opened a bug upstream at: https://github.com/syslog-ng/syslog-ng/issues/4810
Great, thanks!
This bug is now fixed thanks to https://github.com/syslog-ng/syslog-ng/pull/4880 and will be part of the next syslog-ng release.
BTW: what is the use case behind disabling IPv6 support in syslog-ng? It does not pull in any additional dependencies.
Excellent, I appreciate it! The use case boils down to machines on IPv4-only networks, and my practice of turning knobs to disable things I don't have an explicit need for. If the config option for IPv6 were to go away, I wouldn't be troubled; it was there, so I used it.
Created attachment 249787 [details] Patch for the IPv6 issue: https://github.com/syslog-ng/syslog-ng/issues/4810 I made a patch for the issue. It's based on the https://github.com/syslog-ng/syslog-ng/pull/4880/commits/896d77dd949b52d6ea5798e5a038ba97d6b802be commit.
Confirmed fixed in syslog-ng-4.7.1. Thanks again!
Thank you to Peter and his team for the new syslog-ng release.