Bug 293465 - sysutils/rsyslog8: does not build with KAFKA option
Summary: sysutils/rsyslog8: does not build with KAFKA option
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Matthew Seaman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-02-26 12:59 UTC by Palle Girgensohn
Modified: 2026-02-28 15:30 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Palle Girgensohn freebsd_committer freebsd_triage 2026-02-26 12:59:00 UTC
When building with KAFKA option turned on, it fails:

strict-aliasing -I/usr/local/include/libfastjson  -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -Werror=implicit-function-declaration -g -pthread -I/usr/local/include  -O2 -pipe  -I/usr/local/include -I/usr/local/include -fstack-protector-strong -fno-strict-aliasing  -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g -MT imkafka_la-imkafka.lo -MD -MP -MF .deps/imkafka_la-imkafka.Tpo -c -o imkafka_la-imkafka.lo `test -f 'imkafka.c' || echo './'`imkafka.c
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../runtime -I../.. -I../../grammar -O2 -pipe -I/usr/local/include -I/usr/local/include -fstack-protector-strong -fno-strict-aliasing -I/usr/local/include/libfastjson -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -Werror=implicit-function-declaration -g -pthread -I/usr/local/include -O2 -pipe -I/usr/local/include -I/usr/local/include -fstack-protector-strong -fno-strict-aliasing -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g -MT imkafka_la-imkafka.lo -MD -MP -MF .deps/imkafka_la-imkafka.Tpo -c imkafka.c  -fPIC -DPIC -o .libs/imkafka_la-imkafka.o
In file included from imkafka.c:42:
/usr/local/include/librdkafka/rdkafka.h:8404:1: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
 8404 | const int rd_kafka_TopicPartitionInfo_partition(
      | ^~~~~
In file included from imkafka.c:54:
In file included from ../../runtime/ruleset.h:28:
In file included from ../../runtime/rsconf.h:28:
../../runtime/lookup.h:126:1: error: unknown type name 'uint'
  126 | uint lookupPendingReloadCount(void);
      | ^
In file included from imkafka.c:59:
../../runtime/datetime.h:58:82: error: unknown type name 'uint'
   58 |     int (*formatUnixTimeFromTime_t)(time_t time, const char *format, char *pBuf, uint pBufMax);
      |                                                                                  ^
imkafka.c:373:16: error: call to undeclared function 'timegm'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
  373 |         return timegm(&tm);
      |                ^
imkafka.c:373:16: note: did you mean 'time'?
/usr/include/time.h:129:8: note: 'time' declared here
  129 | time_t time(time_t *);
      |        ^
1 warning and 3 errors generated.
*** [imkafka_la-imkafka.lo] Error code 1

make[2]: stopped making "all" in /wrkdirs/usr/ports/sysutils/rsyslog8/work/rsyslog-8.2602.0/plugins/imkafka
make[2]: 1 error

make[2]: stopped making "all" in /wrkdirs/usr/ports/sysutils/rsyslog8/work/rsyslog-8.2602.0/plugins/imkafka

make[1]: stopped making "all-recursive" in /wrkdirs/usr/ports/sysutils/rsyslog8/work/rsyslog-8.2602.0

make: stopped making "all" in /wrkdirs/usr/ports/sysutils/rsyslog8/work/rsyslog-8.2602.0
===> Compilation failed unexpectedly.
Comment 1 Palle Girgensohn freebsd_committer freebsd_triage 2026-02-26 12:59:54 UTC
# freebsd-version -ku
15.0-RELEASE-p2
15.0-RELEASE-p2


running in poudriere
Comment 2 Matthew Seaman freebsd_committer freebsd_triage 2026-02-26 13:29:14 UTC
Yeah.  The options adding access to various other software setups do not get exercised that frequently.  I shall investigate after work.
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-02-28 15:30:00 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=37be2a3a820750b3892eeb3f544033ab56b74bea

commit 37be2a3a820750b3892eeb3f544033ab56b74bea
Author:     Matthew Seaman <matthew@FreeBSD.org>
AuthorDate: 2026-02-28 15:02:02 +0000
Commit:     Matthew Seaman <matthew@FreeBSD.org>
CommitDate: 2026-02-28 15:29:05 +0000

    sysutils/rsyslog8: Fix compilation when KAFKA option selected

    Add #define __BSD_VISIBLE to get the uint typedef in sys/types.h

    PR:     293465
    Reported by:    girgen

 sysutils/rsyslog8/Makefile                                    |  1 +
 sysutils/rsyslog8/files/patch-plugins_imkafka_imkafka.c (new) | 10 ++++++++++
 2 files changed, 11 insertions(+)
Comment 4 Matthew Seaman freebsd_committer freebsd_triage 2026-02-28 15:30:22 UTC
Committed, thanks!