On FreeBSD12.2Stable on both amd64 and i386, # make -C /usr/ports/benchmarks/stress-ng clean package ... /usr/bin/ld: stress-resources.o: in function `stress_resources': stress-resources.c:(.text+0x5d2): undefined reference to `inotify_init' /usr/bin/ld: stress-resources.c:(.text+0x76b): undefined reference to `inotify_add_watch' collect2: error: ld returned 1 exit status However # pkg delete libinotify-20180201_2 # make -C /usr/ports/benchmarks/stress-ng clean package ... ===> Building package for stress-ng-0.12.01 :) I really don't know how this can be captured in the Makefile - its not really a conflict but it is a barrier. It seems that there are tests during the build around HAVE_INOTIFY which triggers if libinotify is installed. Aside: Changing my build sequence putting stress-ng before devel/libinotify is successful.
Thanks for reporting. Probably the configure script detect libinotify and tries to link to it. I'll check if I can force to not use it
Hi. I tried to repeat your error, but I failed. Do you have some environment variables or in make.conf, like CFLAGS, that are set to add /usr/local/include in the include path? In general, to avoid those kind of issues, I always suggest to use poudriere, that will use a clean jail to build packages. In any case, I can add libinotify as dependency while fixing the error, to make more tests available.
A commit references this bug: Author: pizzamig Date: Fri Jan 15 23:37:53 UTC 2021 New revision: 561681 URL: https://svnweb.freebsd.org/changeset/ports/561681 Log: benchmarks/stress-ng: Add and fix libinotify support stress-ng supports libinotify. A kevent based implementation can be used to provide support, fixing a build issue reported in PR 252661 PR: 252661 Reported by: dewayne@heuristicsystems.com.au Changes: head/benchmarks/stress-ng/Makefile
I've added libinotify as dependency and fixed the build.