[Bug 275958] benchmarks/stress-ng: namespace collision for crypt_data if libxcrypt installed

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 27 Dec 2023 05:09:25 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275958

            Bug ID: 275958
           Summary: benchmarks/stress-ng: namespace collision for
                    crypt_data if libxcrypt installed
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: pizzamig@freebsd.org
          Reporter: jcfyecrayz@liamekaens.com
             Flags: maintainer-feedback?(pizzamig@freebsd.org)
          Assignee: pizzamig@freebsd.org

Created attachment 247278
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=247278&action=edit
[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).

-- 
You are receiving this mail because:
You are the assignee for the bug.