Bug 276740 - sysutils/syslog-ng: build fails when "IPv6 protocol support" config option is disabled
Summary: sysutils/syslog-ng: build fails when "IPv6 protocol support" config option is...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-30 20:59 UTC by Shaun Cummiskey
Modified: 2024-04-25 15:11 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (cy)


Attachments
Patch for the IPv6 issue: https://github.com/syslog-ng/syslog-ng/issues/4810 (423 bytes, patch)
2024-04-07 08:28 UTC, Volodymyr Pushkar
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shaun Cummiskey 2024-01-30 20:59:51 UTC
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
Comment 1 Cy Schubert freebsd_committer freebsd_triage 2024-01-30 21:37:27 UTC
I will ask our upstream, who actually maintains this port, to weigh in.
Comment 2 Peter Czanik 2024-01-31 08:02:25 UTC
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
Comment 3 Shaun Cummiskey 2024-01-31 21:21:58 UTC
Great, thanks!
Comment 4 Peter Czanik 2024-04-05 07:42:49 UTC
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.
Comment 5 Peter Czanik 2024-04-05 10:22:00 UTC
BTW: what is the use case behind disabling IPv6 support in syslog-ng? It does not pull in any additional dependencies.
Comment 6 Shaun Cummiskey 2024-04-06 00:31:01 UTC
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.
Comment 7 Volodymyr Pushkar 2024-04-07 08:28:02 UTC
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.
Comment 8 Shaun Cummiskey 2024-04-25 15:01:36 UTC
Confirmed fixed in syslog-ng-4.7.1. Thanks again!
Comment 9 Cy Schubert freebsd_committer freebsd_triage 2024-04-25 15:11:59 UTC
Thank you to Peter and his team for the new syslog-ng release.