Command issued after updated ports tree: portmaster -da Error is: [...] ===> Building for postgresql15-contrib-15.7 : invalid option -- D Usage: gmake [options] [target] ... Options: -b, -m Ignored for compatibility. -B, --always-make Unconditionally make all targets. -C DIRECTORY, --directory=DIRECTORY ports-mgmt/portmaster fails to operate on this port according to According to ports/CHANGES: 20240229: AUTHOR: tijl@FreeBSD.org (btw: same for client, server)
Hi! I cannot reproduce the error using poudriere. Can you please supply more info, perhaps the config.log or the build log? What are your config options? Version of gmake (mine is 4.4.1). this -D option seems to be the culprit, can we find out where it comes from?
The problem is well known, I provided for other ports some patches by simply respecting the remark mentioned in CHANGES, see posting. The background seems to be overlapping and conflictiong environments. A sensistive replacing of ${SETENV} in build tags with ${SETENVI} will provide the correct mitigation of the problem. There is a reason why I mentioned "portmaster"! Building the port via poudriere or via classical make/make install will not show this problem. It is also possible this is a portmaster bug.
Created attachment 250570 [details] SETENV -> SETENVI Ah, that was new to me. Thanks for pointing it out. Does this patch fix your problem?
Fix committed. Thanks for the report!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=43c0fa7a8f885172bf58c9af743b1aaab8237cf8 commit 43c0fa7a8f885172bf58c9af743b1aaab8237cf8 Author: Palle Girgensohn <girgen@FreeBSD.org> AuthorDate: 2024-05-11 07:04:16 +0000 Commit: Palle Girgensohn <girgen@FreeBSD.org> CommitDate: 2024-05-11 07:09:05 +0000 postgresql??-*: Build with a clean environment The fix in 572f236169264, PR 276478, suggest a change SETENV->SETENVI. Implement this for the PostgreSQL builds. This should fix builds problems for some when building using portmaster. PR: 278889 Reported by: O. Hartmann databases/postgresql16-server/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
(In reply to Palle Girgensohn from comment #4) Sorry for being too slow for the pace. I'll check the patch as soon as my box has finished compiling the latest llvm and firefox, which takes a time on methusalem hardware. Thank you in advance for fixing this. oh