Created attachment 247278 [details] [patch] avoid conflicting crypt_data definitions (crypt.h vs unistd.h) If libxcrypt is installed, the build for benchmarks/stress-ng fails (after the recent update to 0.17.03 - but it failed with 0.16.02, too). . . cc -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wall -Wextra -DVERSION='"0.17.03"' -std=gnu99 -fstack-protector-strong -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -c -o stress-cyclic.o stress-cyclic.c In file included from stress-crypt.c:24: /usr/local/include/crypt.h:73:8: error: redefinition of 'crypt_data' struct crypt_data ^ /usr/include/unistd.h:489:8: note: previous definition is here struct crypt_data { ^ 1 error generated. gmake[2]: *** [Makefile:618: stress-crypt.o] Error 1 The attached patch fixes this by preventing the build from using <localbase>/include/crypt.h While here, the patch adds do-configure so that the configure is a separate step than 'make build'. This is more typical of the way most FreeBSD ports work. But this change is not required to fix the crypt_data namespace conflict. No need for PORTREVISION bump as the resulting package is the same before and after the change (assuming your port build did not fail because of the problem described here).
QA: poudriere testport (bulk build including libxcrypt & stress-ng): ok portlint: no new warnings or errors portclippy: no new misordered lines portfmt: no new formatting improvement suggestions p.s. The previous patch includes a commented out USES line. Please just ignore that.
Hi, thanks for reporting. The patch forcibly disables this stressor, but it seems it's always the case. In any case, I need to bump the portrevision, as the hash of the package changes.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=c02edab71ed071ced61003291219f9e22c0dca8f commit c02edab71ed071ced61003291219f9e22c0dca8f Author: Luca Pizzamiglio <pizzamig@FreeBSD.org> AuthorDate: 2024-01-01 22:49:21 +0000 Commit: Luca Pizzamiglio <pizzamig@FreeBSD.org> CommitDate: 2024-01-01 22:49:21 +0000 benchmarks/stress-ng: disable crypt.h In case it's detected, it causes a conflict with a struct defined in unistd.h PR: 275958 Reported by: John Hein <jcfyecrayz@liamekaens.com> benchmarks/stress-ng/Makefile | 5 +++++ 1 file changed, 5 insertions(+)
FYI, I've pushed a commit to stress-ng to fix this build issue: https://github.com/ColinIanKing/stress-ng/commit/b4b810d2013cff2c3331db51ccd42c2d8c392cea Hopefully it won't be an issue for the next release next month.