From nobody Mon Jul 22 09:17:36 2024 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WSF6m6Ylbz5QHLB for ; Mon, 22 Jul 2024 09:17:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WSF6m42D9z4Yj2 for ; Mon, 22 Jul 2024 09:17:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721639856; a=rsa-sha256; cv=none; b=SMvSuErNllxoIYa47o0fOW/UnSM30l9iaMaK2HgV2au4l4YPlcTzoRc10BDBL6Vw4cqfGr i8j9rfukJetqyIvrZcOC2o69J8xIofgj+ncDxtUuCoNHJbMgKC/I35eVq+PPkG+jZXN3yS 0ejS7xn4OglraqqQ3g9A5ux8ue2jkZ17lZ5osdGhpqEwmcemuBEutBBNMfR8LWMdYAAi3V LEeb4+15HMuG7vhV9FEx1GxTNeQs+Y8an4aqInF96PhyENeNF+voVFPTLPUo6bruZDysW9 qD7QkcuZ8Ta9yZbCt6jI6HJX8lMToe8m6tGkuLzMX0L3AUwusGDs0u9cK8jD2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721639856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UjgjMNNO6+3sEHxJ7a63Yd1+JKqfwhdVmDrPD/T8624=; b=ePl0TBKwjy+Wjb9l3m3Tj8380IZ0hoMAIE9Op7GuKQ/hbzkWccfvfPcBpR2t9acNEGCPn+ yqn/q5DAzz8xKebbv/SezOX8esJNxLNk2aV35l0LXy8L4KWcD2X+7lwZyWBI5AOvKkDIAe hJBT9Qj0tSA3BYQguGN3WyL+vCWahLWirIYFtAv9xoqfADowmSakRLYvtCo5+JrKJv5ofx 4kY19G4uncxsA/lsXATTYwBUURO6Gr3ptzyBXhAPcVrtRX8EAE+aVXvlA54ENJ8v6/LWaC n6nk26MVpLnPH6/HCc3PHPAg5iBNEsUzY+pmFOmFcjHxlzK4ovPVToUSsUr3ig== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WSF6m3ZtszfX1 for ; Mon, 22 Jul 2024 09:17:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 46M9HaoB077749 for ; Mon, 22 Jul 2024 09:17:36 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 46M9HaNP077748 for ports-bugs@FreeBSD.org; Mon, 22 Jul 2024 09:17:36 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 280396] Mk/Uses/cmake.mk: Disallow USE_CSTD and USE_CXXSTD Date: Mon, 22 Jul 2024 09:17:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Ports Framework X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jhale@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: kde@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ports-bugs@freebsd.org Sender: owner-freebsd-ports-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D280396 Jason E. Hale changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jhale@FreeBSD.org --- Comment #4 from Jason E. Hale --- Created attachment 252220 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D252220&action= =3Dedit POC: Convert USE_C*STD to CMake native In concept, I think this a good idea, but I'm not sold on the execution. For example, your "BROKEN" message is not in the correct place, because it won't apply to any ports that have fortran, noninja or run as arguments passed to USES=3Dcmake. The run argument isn't important in this case, though. Now, I'd be more of a buyer if the "BROKEN=3D" message were converted to a "WARNING+=3D" or "DEV_WARNING+=3D" message since while having conflicting -= std=3D* arguments passed to the compiler isn't exactly ideal, I don't think that warrants automatically marking a port as BROKEN when it has presumably been building just fine prior to this change. Automatically marking ports BROKEN just because they don't strictly conform to a fabricated ideal is, quite frankly, absurd. As a side note: The *WARNING variables, unlike the BROKEN variable, require their contents to be double quoted and very much do not l= ike their contents to contain parentheses (or round brackets if you're a weirdo j/k)...anyways, these things -> (). Now that I'm thinking...instead of marking everything BROKEN, painstakingly iterating through the entire ports tree pounding on countless individual po= rts to make them submit, banishing use of standard bsd.port.mk variables, or potentially adding WARNINGs that could make use of CMake seem even more off-putting than it already is to some, let's take a breather. Refocus. Per= haps we could be a bit more clever and handle this transparently entirely within= the CMake framework. The pseudocode I'm currently thinking about in cmake.mk is this: - Check if USE_C*STD is defined - If so, save the contents of USE_C*STD to a "private" temporary variable - Undefine USE_C*STD, so that it isn't used in bsd.port.mk - Determine the standard and if extensions are needed from that "private" variable - Pass above information to the appropriate CMake variables I've attached an almost not tested proof of concept that doesn't include any error checking, but bsd.port.mk doesn't either with regard to the USE_C*STD variables. For example, if one defines USE_CXXSTD=3Dc++42069 in a port Make= file, that will simply be added to CXXFLAGS with a "-std=3D" slapped in front of = it. Port maintainers and especially committers are expected to know better. Defining this wouldn't pass the configure stage, anyways, at least with CMa= ke. I don't believe my POC would require other changes in the ports tree. To me, this would be much less intrusive and the idea of not being able to use standard bsd.port.mk variables in ports that use CMake just really puts a b= ad taste in my mouth. Open for feedback. --=20 You are receiving this mail because: You are on the CC list for the bug.=