From owner-freebsd-ports-bugs@freebsd.org Wed Sep 2 22:51:37 2015 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CCBA9C8BFB for ; Wed, 2 Sep 2015 22:51:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08C1C26C for ; Wed, 2 Sep 2015 22:51:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t82MpaF7029680 for ; Wed, 2 Sep 2015 22:51:36 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 202862] category/port: sysutils/rsyslog8 Date: Wed, 02 Sep 2015 22:51:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: fbsd.bugzilla@fenyo.net X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: brd@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2015 22:51:37 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202862 Bug ID: 202862 Summary: category/port: sysutils/rsyslog8 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: brd@FreeBSD.org Reporter: fbsd.bugzilla@fenyo.net Flags: maintainer-feedback?(brd@FreeBSD.org) Assignee: brd@FreeBSD.org rsyslog makes use of the inotify kernel mechanism when available. Linux and FreeBSD do not support the inotify mechanism the same way: - on Linux, inotify_init(2) is a system call; - on FreeBSD, inotify_init(3) is a library call defined in /usr/local/lib/libinotify.so, installed by the port named devel/libinotify. The configure.ac file of the rsyslog8 source distribution checks: - that there is a header file containing the inotify_init() prototype; - that a program can be linked to the external function symbol _inotify_init. BUT this configure.ac makes the assumption that this symbol is part of libc because it is a syscall, so it doesn't use AC_CHECK_LIB to check for the symbol in a particular library. As a consequence, if the port devel/libinotify is installed prior to sysutils/rsyslog8, the rsyslog8 configure script will find that: 1- the header file containing the prototype of inotify_init() is installed, thus it will add '#define HAVE_SYS_INOTIFY_H 1' in config.h 2- but the _inotify_init symbol is not available, so it will NOT add '#define HAVE_INOTIFY_INIT 1' in config.h On a FreeBSD system on which the libinotify port is not installed, both of HAVE_INOTIFY_INIT and HAVE_SYS_INOTIFY_H are undefined and the program compiles correctly. But on the contrary, on a FreeBSD system on which the libinotify port is already installed, the sysutils/rsyslog8 port creates a config.h only defining HAVE_INOTIFY_INIT. This produces a compilation error because the file work/rsyslog-8.11.0/plugins/imfile/imfile.c, after having been patched by the port when the port Makefile processes the diff file sysutils/rsyslog8/files/patch-plugins_imfile_imfile.c, makes use of HAVE_SYS_INOTIFY_H to avoid compiling some lines that need some data structures only defined previously when the inotify_init syscall is present. So the make command stops with the following error: imfile.c:1873:5: error: use of undeclared identifier 'dirs' if(dirs != NULL) { [...] ^ To avoid this behaviour, the sysutils/rsyslog8/files/patch-plugins_imfile_imfile.c must use both HAVE_INOTIFY_INIT and HAVE_SYS_INOTIFY_H, not only HAVE_SYS_INOTIFY_H. So to correct the port, you just need to replace the following line in sysutils/rsyslog8/files/patch-plugins_imfile_imfile.c: +#ifdef HAVE_SYS_INOTIFY_H by the following one: +#if defined HAVE_SYS_INOTIFY_H && defined HAVE_INOTIFY_INIT Sincerely, Alexandre Fenyo ps: this will let the port compile correctly, avoiding the compilation error, but this will not let the port be linked to libinotify even if previously installed. For the port to be able to be linked to libinotify, more work is necessary: 1- adding an option in the port Makefile (using OPTIONS_DEFINE, *LIB_DEPENDS, *CONFIGURE_ENABLE and *PLIST_FILES); 2- patching the rsyslog8 configure.ac file, to add AC_SEARCH_LIBS or AC_CHECK_LIB macro to prepend -linotify to the LIBS variable, when the library is available. -- You are receiving this mail because: You are the assignee for the bug.