[Bug 276740] sysutils/syslog-ng: build fails when "IPv6 protocol support" config option is disabled

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 30 Jan 2024 20:59:51 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276740

            Bug ID: 276740
           Summary: sysutils/syslog-ng: build fails when "IPv6 protocol
                    support" config option is disabled
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: cy@FreeBSD.org
          Reporter: freebsd@shaunc.com
          Assignee: cy@FreeBSD.org
             Flags: maintainer-feedback?(cy@FreeBSD.org)

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

-- 
You are receiving this mail because:
You are the assignee for the bug.