Bug 281732

Summary: ports-mgmt/portmaster: fails to build ports with gmake error: : invalid option -- D
Product: Ports & Packages Reporter: O. Hartmann <ohartmann>
Component: Individual Port(s)Assignee: Stefan Eßer <se>
Status: New ---    
Severity: Affects Many People CC: emaste, rhurlin
Priority: --- Flags: bugzilla: maintainer-feedback? (se)
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://github.com/freebsd/portmaster/commit/4ae49e4ecd0c0988a8deb682c3c2e336c34b90be
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277518
Bug Depends on:    
Bug Blocks: 277961, 278198, 280076, 281730    

Description O. Hartmann 2024-09-26 19:12:51 UTC
Several ports can not be build using ports-mgmt/portmaster resulting in an error ending in 

: invalid option -- D; see for instance 

PR #281730, #280076, #277954, #278684, #278887 (and more already solved)

In most cases, a workaround is to replace in build target sections according to /usr/ports/CHANGES:

20240229:
AUTHOR: tijl@FreeBSD.org
[...]

replacing used ${SETENV} by ${SETENVI} ${WRK_ENV}.

While portmaster fails on the reported ports, poudriere and native build via make works as expected. portmaster does well, as poudriere and make, after patching according to the scheme mentioned above.
Comment 1 Ed Maste freebsd_committer freebsd_triage 2025-01-15 15:04:57 UTC
URL above is the portmaster patch for this issue. It's still likely the case that individual ports should migrate to ${SETENVI} for robustness.