Bug 244753 - lang/rexx-regutil: fix build problem with _WANT_SEMUN
Summary: lang/rexx-regutil: fix build problem with _WANT_SEMUN
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dmitry Marakasov
Keywords: buildisok
Depends on:
Reported: 2020-03-12 12:11 UTC by bob
Modified: 2021-03-15 00:18 UTC (History)
0 users

See Also:

Patches for Makefiles (1.24 KB, patch)
2020-03-12 12:11 UTC, bob
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description bob 2020-03-12 12:11:31 UTC
Created attachment 212347 [details]
Patches for Makefiles

The addition of _WANT_SEMUN in base has affected some builds of this port.

The attached patch bumps the PORTREVISION and explicitly sets _WANT_SEMUN in the port Makefile.
Comment 1 Automation User 2020-03-12 12:26:31 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/125658940
Comment 2 Dmitry Marakasov freebsd_committer 2021-02-16 21:49:11 UTC
-D_WANT_SEMUN was added in r463452, why is this change needed?
Comment 3 bob 2021-02-27 23:28:42 UTC
The Makefile in the distribution (Makefile.bsd) doesn't honour CFLAGS - it seems to be one of a set of portable Makefiles that use their own rules.

The patch adds -D_WANT_SEMUN to the port's Makefile.bsd. 

Without this, the build can fail. Tested on 12.2-RELEASE-p4 and the ports tree pulled today.
Comment 4 Dmitry Marakasov freebsd_committer 2021-03-14 19:17:16 UTC
(In reply to bob from comment #3)

The flag is correctly passed to the build:

===>  Building for rexx-regutil-1.26_2
cc  -O2 -pipe  -D_WANT_SEMUN -fstack-protector-strong -fno-strict-aliasing  -g   -fpic -pipe -D_SEMUN_DEFINED -DUSE_STATFS -DINCL_MOUNT -DHAS_F_MNTFROMNAME -DMMAP -DUSE_TERMCAP_DB -DHAS_GETBOOTFILE -DHAS_WCHAR -I /usr/local/include -c regfilesys.c -o regfilesys.o
cc  -O2 -pipe  -D_WANT_SEMUN -fstack-protector-strong -fno-strict-aliasing  -g   -fpic -pipe -D_SEMUN_DEFINED -DUSE_STATFS -DINCL_MOUNT -DHAS_F_MNTFROMNAME -DMMAP -DUSE_TERMCAP_DB -DHAS_GETBOOTFILE -DHAS_WCHAR -I /usr/local/include -c regini.c -o regini.o
cc  -O2 -pipe  -D_WANT_SEMUN -fstack-protector-strong -fno-strict-aliasing  -g   -fpic -pipe -D_SEMUN_DEFINED -DUSE_STATFS -DINCL_MOUNT -DHAS_F_MNTFROMNAME -DMMAP -DUSE_TERMCAP_DB -DHAS_GETBOOTFILE -DHAS_WCHAR -I /usr/local/include -c regmacrospace.c -o regmacrospace.o

It builds fine on all supported FreeBSD versions. I don't see why this change is needed.
Comment 5 bob 2021-03-14 23:53:17 UTC
OK, it was submitted a year ago so it may be fixed. Feel free to close this PR.

If I encounter the problem again here I will patch locally until someone else complains!