Bug 252661 - benchmarks/stress-ng fails to build if libinotify is installed
Summary: benchmarks/stress-ng fails to build if libinotify is installed
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Luca Pizzamiglio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-14 07:20 UTC by dewayne
Modified: 2021-01-15 23:39 UTC (History)
0 users

See Also:
pizzamig: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dewayne 2021-01-14 07:20:11 UTC
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.
Comment 1 Luca Pizzamiglio freebsd_committer freebsd_triage 2021-01-14 20:38:07 UTC
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
Comment 2 Luca Pizzamiglio freebsd_committer freebsd_triage 2021-01-15 13:01:39 UTC
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.
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-01-15 23:37:59 UTC
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
Comment 4 Luca Pizzamiglio freebsd_committer freebsd_triage 2021-01-15 23:39:55 UTC
I've added libinotify as dependency and fixed the build.