"make package" for rsyslog 8.28 Build terminates with error, missing linux/types.h # uname -aKU;make -C /usr/ports/sysutils/rsyslog8 -DUSE_K8 showconfig | grep =on FreeBSD b2.hs 11.1-BETA3 FreeBSD 11.1-BETA3 #0 r320255M: Fri Jun 23 22:42:06 AEST 2017 root@hathor:/110007/D/K8/hqdev-amd64-smp-vga amd64 1100514 1100514 DOCS=on: Build and/or install documentation GCRYPT=on: Enable support for encrypted logfiles GNUTLS=on: GNUTLS module for rsyslog RELP=on: RELP input/output module for rsyslog
I cannot reproduce this problem. Builds fine for me with exactly the same options settings on 11.0 and 10.3. How are you building rsyslog? Can you show me 'poudriere testport' or similar output?
(In reply to Matthew Seaman from comment #1) For rsyslog8 8.27.0_1 - successfully builds on FreeBSD 11.1 Beta3 b2# find /var/ports/usr/ports/sysutils/rsyslog8/work/rsyslog-8.27.0/ -name \*.c | xargs grep linux/types.h b2# rsyslog8 8.28 on same machine: The error /bin/sh ../../libtool --tag=CC --mode=compile /usr/local/libexec/ccache/cc -DHAVE_CONFIG_H -I. -I. libtool: compile: /usr/local/libexec/ccache/cc -DHAVE_CONFIG_H -I. -I../.. -I../.. -pthread -I../../ imfile.c:41:10: fatal error: 'linux/types.h' file not found #include <linux/types.h> ^~~~~~~~~~~~~~~ 1 error generated. *** Error code 1 So do we have linux/types.h? # find /usr/include/ -name types.h /usr/include/rpc/types.h /usr/include/sys/types.h b2# find /usr/local/include/ -name types.h /usr/local/include/dns/types.h /usr/local/include/irs/types.h /usr/local/include/isc/types.h /usr/local/include/isccc/types.h /usr/local/include/webp/types.h /usr/local/include/libhashkit-1.0/types.h /usr/local/include/libmemcached-1.0/types.h /usr/local/include/opkele/types.h /usr/local/include/libwmf/types.h /usr/local/include/net-snmp/library/types.h /usr/local/include/net-snmp/types.h /usr/local/include/ntfs-3g/types.h No. Is it required? b2# find /var/ports/usr/ports/sysutils/rsyslog8/work/rsyslog-8.28.0/ -name \*.c | xargs grep linux/types.h /var/ports/usr/ports/sysutils/rsyslog8/work/rsyslog-8.28.0/plugins/imfile/imfile.c:#include <linux/types.h> Yes. It appears that you may have unwittingly added the requirement for linux compat into rsyslog8 during your platform's build, or ~# find /usr/src/ -name types.h /usr/src/sys/dev/isci/types.h /usr/src/sys/cddl/compat/opensolaris/sys/types.h /usr/src/sys/sys/types.h /usr/src/sys/compat/linuxkpi/common/include/linux/types.h /usr/src/sys/compat/linuxkpi/common/include/asm/types.h /usr/src/sys/rpc/types.h /usr/src/lib/libnetbsd/sys/types.h /usr/src/crypto/heimdal/appl/telnet/telnet/types.h /usr/src/contrib/telnet/telnet/types.h /usr/src/contrib/ntp/lib/isc/include/isc/types.h /usr/src/contrib/sendmail/include/sm/types.h /usr/src/contrib/ofed/include/infiniband/types.h Perhaps poudriere doesn't provide the clean environment that's often touted... ;)
Inclusion of <linux/types.h> is conditional on having inotify installed: ``` #ifdef HAVE_SYS_INOTIFY_H #include <sys/inotify.h> #include <linux/types.h> #endif ``` rsyslog cannot use inotify on FreeBSD, but there is no configure option to completely disable it. Simply having it installed will break the build of rsyslog. This is why we recommend using a clean-room build system like poudriere. I shall add a CONFLICTS_BUILD setting.
A commit references this bug: Author: matthew Date: Fri Jun 30 22:02:24 UTC 2017 New revision: 444784 URL: https://svnweb.freebsd.org/changeset/ports/444784 Log: rsyslog cannot use the Inotify emulation provided by the devel/libinotify port -- the kqueue based emulation does not persist over forking, unlike the genuine linux inotify. However, the presence of certain header files will cause rsyslog to attempt to unconditionally compile in Inotify support, and this breaks the build. Use CONFLICTS_BUILD to mark the incompatibility. PR: 220376 Submitted by: dewayne@heuristicsystems.com.au Changes: head/sysutils/rsyslog8/Makefile
(In reply to commit-hook from comment #4) Thanks Matthew. I appreciate your explanation. For the time-being I've changed the build sequence order (in my env) moving rsyslog8 before samba46 (with File Alteration Monitor). Clearly the right course is to feedback to samba-technical that there is more efficient solution for *BSD. Also seems that I should reconsider poudriere.
This should have been closed weeks ago.