Created attachment 233739 [details] Poudriere build log for collectd5-5.12.0_5 Sysutils/nut was recently updated to version 2.8.0. After the update, collectd5-5.12.0_5 fails to build when the NUT plugin is enabled (NUTUPS=on) with the following error: libtool: compile: cc -DHAVE_CONFIG_H -I. -I./src -I./src -I./src/daemon -DPREFIX=\"/usr/local\" -DCONFIGFILE=\"/usr/local/etc/collectd.conf\" -DLOCALSTATEDIR=\"/var\" -DPKGLOCALSTATEDIR=\"/var/db/collectd\" -DPLUGINDIR=\"/usr/local/lib/collectd\" -DPKGDATADIR=\"/usr/local/share/collectd\" -I/usr/local/include -Wall -I/usr/local/include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -MT src/nut_la-nut.lo -MD -MP -MF src/.deps/nut_la-nut.Tpo -c src/nut.c -fPIC -DPIC -o src/.libs/nut_la-nut.o src/nut.c:40:2: error: "Unable to determine the UPS connection type." #error "Unable to determine the UPS connection type." ^ src/nut.c:46:3: error: unknown type name 'collectd_upsconn_t' collectd_upsconn_t *conn; ^ src/nut.c:89:66: warning: incompatible pointer types passing 'int *' to parameter of type 'uint16_t *' (aka 'unsigned short *') [-Wincompatible-pointer-types] status = upscli_splitname(name, &ups->upsname, &ups->hostname, &ups->port); ^~~~~~~~~~ /usr/local/include/upsclient.h:109:14: note: passing argument to parameter 'port' here uint16_t *port); ^ 1 warning and 2 errors generated. gmake[2]: *** [Makefile:8330: src/nut_la-nut.lo] Error 1 gmake[2]: Leaving directory '/wrkdirs/usr/ports/net-mgmt/collectd5/work/collectd-5.12.0' gmake[1]: *** [Makefile:5455: all] Error 2 gmake[1]: Leaving directory '/wrkdirs/usr/ports/net-mgmt/collectd5/work/collectd-5.12.0' *** Error code 1 Please see the attached Poudriere build log for more details. When NUT is downgraded to version 2.7.4_20 (from Quarterly) the port (and plugin) builds fine.
What can I say? I've checked collectd github repository. I did not find any issues relating to newer version of nut. So I think we should make some patches which will support new version of nut. Because main github repo seems very stable - there is one commit per month... @Petteri: do you have some ideas what to change?
Have you checked config.log? It should tell you what the problem is.
Created attachment 233781 [details] This will fix it This will fix your problem. I'll push this commit sometime Monday or Tuesday.
Created attachment 233782 [details] Use this patch instead. There was something odd about the previous patch. It didn't take into account the post-patch target. This one is correct.
@Krzysztof, These outside of the scope of this PR but it's recommended that these be fixed these too. ====> Running Q/A tests (stage-qa) Error: /usr/local/lib/collectd/cpu.so is linked to /usr/local/lib/libstatgrab.so.10 from devel/libstatgrab but it is not declared as a dependency Warning: you need LIB_DEPENDS+=libstatgrab.so:devel/libstatgrab Error: /usr/local/lib/collectd/dns.so is linked to /usr/local/lib/libpcap.so.1 from net/libpcap but it is not declared as a dependency Warning: you need LIB_DEPENDS+=libpcap.so:net/libpcap ====> Checking for pkg-plist issues (check-plist)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=91943263b3fab0662169ae5b4a73488022ec6ee1 commit 91943263b3fab0662169ae5b4a73488022ec6ee1 Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2022-05-07 02:22:31 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2022-05-09 17:49:53 +0000 net-mgmt/collectd5: Chase 31418910e0f4, update sysutils/nut to 2.8.0 Nut upsclient.h no longer includes time.h. Apps which build against upsclient.h must now include time.h or fail to detect nut libraries due to missing time_t. PR: 263791 Reported by: Petteri Valkonen <petteri.valkonen@iki.fi> net-mgmt/collectd5/files/patch-configure.ac | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
Created attachment 233833 [details] Poudriere build log for collectd5-5.12.0_5 w/ configure failure
@Cy, the port is still failing to build for me on Poudriere, albeit now with a different error. Firstly, configure is saying that it doesn't recognise the 'with-upsclient' option: configure: WARNING: unrecognized options: --disable-lvm, --without-liblvm2app, --without-libjvm, --without-libnotify, --with-upsclient, --without-perl, --without-postgresql, --without-python, --disable-rabbitmq, --without-libsigrok, --without-virt, --without-libzookeeper Which results in an error later on: nut . . . . . . . . . no (pkg-config doesn't know libupsclient) (dependency error) ... configure: error: "Some plugins are missing dependencies - see the summary above for details" ===> Script "configure" failed unexpectedly. I've attached the Poudriere build log again.
Created attachment 233834 [details] Config.log for configure failure Here's the config.log for the failing build.