Bug 278889 - databases/postgresql15-contrib: portmaster failure: invalid option -- D
Summary: databases/postgresql15-contrib: portmaster failure: invalid option -- D
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: pgsql
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-10 08:21 UTC by O. Hartmann
Modified: 2024-05-11 08:27 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (pgsql)


Attachments
SETENV -> SETENVI (1.45 KB, patch)
2024-05-10 18:26 UTC, Palle Girgensohn
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2024-05-10 08:21:44 UTC
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)
Comment 1 Palle Girgensohn freebsd_committer freebsd_triage 2024-05-10 10:11:07 UTC
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?
Comment 2 O. Hartmann 2024-05-10 17:13:47 UTC
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.
Comment 3 Palle Girgensohn freebsd_committer freebsd_triage 2024-05-10 18:26:19 UTC
Created attachment 250570 [details]
SETENV -> SETENVI

Ah, that was new to me. Thanks for pointing it out.

Does this patch fix your problem?
Comment 4 Palle Girgensohn freebsd_committer freebsd_triage 2024-05-11 07:10:20 UTC
Fix committed. Thanks for the report!
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-05-11 07:10:28 UTC
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(-)
Comment 6 O. Hartmann 2024-05-11 08:27:46 UTC
(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