Bug 277954 - net/openldap26-server: portmaster: build failure: invalid option -- D
Summary: net/openldap26-server: portmaster: build 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: Xin LI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-25 17:40 UTC by O. Hartmann
Modified: 2024-12-06 08:02 UTC (History)
2 users (show)

See Also:
ohartmann: maintainer-feedback+


Attachments
replace setenv with setenvi (815 bytes, patch)
2024-03-25 17:40 UTC, O. Hartmann
no flags Details | Diff
Fix portmaster issue (2nd) (1.39 KB, patch)
2024-11-29 08:57 UTC, O. Hartmann
ohartmann: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2024-03-25 17:40:07 UTC
Created attachment 249480 [details]
replace setenv with setenvi

On recent CURRENT with recent ports tree, building of port

net/openldap2[56]-server 

fails with bailing out with gmake synopsis.

Workaround/solution: repalce ${SETENV} with ${SETENVI} 

(see patch).
Comment 1 O. Hartmann 2024-03-25 17:43:22 UTC
Error is:

[...]
===>  Building for cyrus-sasl-gssapi-2.1.28
cd /usr/ports/security/cyrus-sasl2-gssapi/work/cyrus-sasl-2.1.28/include && gmake
: invalid option -- D
Comment 2 O. Hartmann 2024-03-25 17:55:17 UTC
(In reply to O. Hartmann from comment #1)

Sorry, error in comment #1 is of the same type, but with another failing port ...
Comment 3 Xin LI freebsd_committer freebsd_triage 2024-03-25 21:10:58 UTC
What is `MAKE_ENVI`?  We never had it in tree....

According to 572f2361692640bc27729191b1267aa3fcc354a7 it seems that we should be using ${SETENVI} ${WRK_ENV} so the line becomes:


```
		${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} \
```

no?
Comment 4 O. Hartmann 2024-03-25 22:06:56 UTC
(In reply to Xin LI from comment #3)

Sorry,, got confused, it is SETENV and SETENVI, in lines with MAKE_CMD usage.
Comment 5 Tijl Coosemans freebsd_committer freebsd_triage 2024-03-25 22:37:27 UTC
It says "invalid option -- D", but where is that -D coming from?  How are you building the port?
Comment 6 O. Hartmann 2024-03-26 04:47:05 UTC
(In reply to Tijl Coosemans from comment #5)

Building with ports-mgmt/portmaster.

I recall, that portmaster was the culprit, building/installing via "make" directly worked fine.
Comment 7 Tijl Coosemans freebsd_committer freebsd_triage 2024-03-26 19:03:58 UTC
(In reply to O. Hartmann from comment #6)
Is this with portmaster-3.29_2?  If so, can you provide the exact command line that causes the problem?
Comment 8 O. Hartmann 2024-03-27 15:34:19 UTC
It is recent portmaster-3.29_2 (ports-mgmt/portmaster).

Usually I perform a "git pull" in /usr/ports:

# git pull;portmaster -da

That way I found several "foul" ports suffering from the reported issue.

I this specific case I was rebuilding everything for xorg, nss-ldap, openldap and so on vi

portmaster -df

and ran into several ports not building with regard to the reported issue after a while.

I could reproduce this behaviour on different CURRENT installation with a clean ports tree and base system (from buildworld buildkernel) installed via:

# cd devel/gnulib OR cd net/openldap26-server
# make rmconfig config (I do that whenever an issue arises due to some remnants sometimes)
# portmaster -d

I run then with portmaster into the failure. When performing a 

make all

and then 

portmaster -dC

in most cases everything runs smooth.

Hope this info suffice.
Comment 9 O. Hartmann 2024-04-07 07:05:56 UTC
Addednun:

[...]
gmake[1]: Leaving directory '/usr/ports/net/openldap26-server/work/openldap-2.6.7/doc'
 
: invalid option -- D
Usage: gmake [options] [target] ...
Comment 10 O. Hartmann 2024-11-29 08:11:19 UTC
The problem is still present.
Comment 11 O. Hartmann 2024-11-29 08:57:45 UTC
Created attachment 255525 [details]
Fix portmaster issue (2nd)

Following blindly the application instruction in /usr/ports/CHANGES according to the comment made at

20240229:
AUTHOR: tijl@FreeBSD.org

replacing all occurences of SETNEV with the suggested form of SETNEVI and additions, the port net/openldap26-server built with portmaster as expected.

Same might be true for net/openldap24-server.
Comment 12 O. Hartmann 2024-12-04 19:19:03 UTC
Hello?
Comment 13 commit-hook freebsd_committer freebsd_triage 2024-12-06 08:02:51 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=21efd158793b5530fb82e507eaa580dcd268e9be

commit 21efd158793b5530fb82e507eaa580dcd268e9be
Author:     O. Hartmann <ohartmann@walstatt.org>
AuthorDate: 2024-11-29 08:52:41 +0000
Commit:     Xin LI <delphij@FreeBSD.org>
CommitDate: 2024-12-06 07:59:13 +0000

    net/openldap2[56]-server: Use SETENVI instead of SETENV

    PR:             ports/277954

 net/openldap25-server/Makefile | 6 +++---
 net/openldap26-server/Makefile | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)