From nobody Sun Aug 25 11:33:08 2024 X-Original-To: dev-commits-ports-main@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 4WsBWS4XR7z5VqMc; Sun, 25 Aug 2024 11:33:08 +0000 (UTC) (envelope-from git@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 4WsBWS41CNz4SQQ; Sun, 25 Aug 2024 11:33:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724585588; 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; bh=fr2E4Be3YST4Ij5PdkeYyZ3IS/QnZEH91cX7nZxP4Lc=; b=jRQ6lgVNWtAH5WMHSRzVkYi28sCQ6zlx7O1lDoUG7hlmulHGBtztcbQSQ05PO4DpN9nf6z e00Sag01c3ozAeQVaVjAcirlU05BZFTeuiyXIvmJbF0kX4uY2bOlXNl6euczX5efeVUvXH jsljnJGpq++KgksLpLYlD+o3FqncdZvqdVkev0PtjGfbkSzy3IAz6cjyoFNch+hAPpSjxx ihptnwFf5T325wU824CHF1CvG2Am4/rgaWEfIKBpM4h2p3wEpDGxyJRq+x4+yNlSBoGKOe tgAxkcl32x3r5t8GNlZAF5mdxTN+i9xf3U2Kn+OAarXbpJHYlGKKNXfrFNVDdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724585588; a=rsa-sha256; cv=none; b=lILtf+37UNuXKvLkmQFx63FE1XKD12MhzO6ukZVGTxulwRv67t8Jow+oLMQuRSVWF/UNjN d22kYzfwm/wY+0/h6DQHzBzJJA+gAL0jK4+EY7szBpSAuC61Nyx0MFpIsKv8x0eNyys9d7 686bAy476qEn02aRVUrZ7UXeJBHmXEFHkkBA3TAqHqsH4kgeufeU1vcyAibqYaU41zP0bW I31nd2zUCmQVIiy1rbstwl/XPQ97Cy2ABLancjmW37TchC2asU6Gn/8cTRr+BnAT8Xw+Fz zxxp2+HXiOomqaH73P5chQDmywK9otOGmnYuU220dbUDHdTp28uv8S8Yzq2kXw== 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=1724585588; 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; bh=fr2E4Be3YST4Ij5PdkeYyZ3IS/QnZEH91cX7nZxP4Lc=; b=h4jOLIHN+dl3qpNVEwboZcD7WYNbPw9Xh+fUyWGAj1g3uoAGVLj6UTO29TtOl/QTyG5++6 hD2XaEPNF+kt2qFYEVCmEcwSrg1TSf2zJYdwYp1YpKQ/5fqIVSAVnv/Ltsb8/oK7Da0G1y g1+ZmtvW8AuOEb2bE60FegmFO4EkvJ00SLofVqAtBJwlQEzMDlN6neSXGgnBVXh/Jlhu/T cgwViiFl/hlw41w8QR+oZ/8IPbArzSlQZJHu788ycHL7hx+XSXC1i6VbqKzbFKwvMaN2Zg 1f73cIQqSO4gctjzbIrsmyfXCkZ5kkyPjndNkYN/Sfz4o2Sr8PUR8mHktTW9mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4WsBWS3ctJzLT3; Sun, 25 Aug 2024 11:33:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47PBX8il037024; Sun, 25 Aug 2024 11:33:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47PBX8kw037021; Sun, 25 Aug 2024 11:33:08 GMT (envelope-from git) Date: Sun, 25 Aug 2024 11:33:08 GMT Message-Id: <202408251133.47PBX8kw037021@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dimitry Andric Subject: git: ddd57b6891e7 - main - math/vtk9: fix build with clang and libc++ 19 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ddd57b6891e71d29dc4a471978df9c27fa8cd0a4 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=ddd57b6891e71d29dc4a471978df9c27fa8cd0a4 commit ddd57b6891e71d29dc4a471978df9c27fa8cd0a4 Author: Dimitry Andric AuthorDate: 2024-08-17 22:19:32 +0000 Commit: Dimitry Andric CommitDate: 2024-08-25 11:26:37 +0000 math/vtk9: fix build with clang and libc++ 19 As noted in the libc++ 19 release notes [1], std::char_traits<> is now only provided for char, char8_t, char16_t, char32_t and wchar_t, and any instantiation for other types will fail. This causes math/vtk9 to fail to compile with clang 19 and libc++ 19, resulting in errors similar to: /wrkdirs/usr/ports/math/vtk9/work/VTK-9.2.6/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/fmt/core.h:272:30: error: implicit instantiation of undefined template 'std::char_traits' 272 | : data_(s), size_(std::char_traits::length(s)) {} | ^ /wrkdirs/usr/ports/math/vtk9/work/VTK-9.2.6/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/fmt/format.h:487:9: note: in instantiation of member function 'fmt::basic_string_view::basic_string_view' requested here 487 | : basic_string_view(reinterpret_cast(s)) {} | ^ /usr/include/c++/v1/__string/char_traits.h:45:8: note: template is declared here 45 | struct char_traits; | ^ This is actually a problem in the vendored version of Victor Zverovich's fmt library [2]. More recent versions of this library have completely rewritten this part of the header, so work around the issue by making the basic_string_view part conditional on char8_t being actually available. (This is only in C++20 and later.) Clang 19 now also diagnoses incorrect member accesses, which causes errors similar to: /wrkdirs/usr/ports/math/vtk9/work/VTK-9.2.6/Utilities/octree/octree/octree_node.txx:210:16: error: no member named '_M_chilren' in 'octree_node'; did you mean 'm_children'? 210 | return this->_M_chilren[child]; | ^~~~~~~~~~ | m_children /wrkdirs/usr/ports/math/vtk9/work/VTK-9.2.6/Utilities/octree/octree/octree_node.h:37:23: note: 'm_children' declared here 37 | octree_node_pointer m_children; | ^ This was apparently a typo, and upstream vtk fixed this in . Apply that as a small patch. [1] https://libcxx.llvm.org/ReleaseNotes/19.html#deprecations-and-removals [2] https://fmt.dev/ PR: 280893 Approved by: yuri (maintainer) MFH: 2024Q3 --- ...hirdParty_diy2_vtkdiy2_include_vtkdiy2_fmt_format.h | 18 ++++++++++++++++++ .../patch-Utilities_octree_octree_octree__node.txx | 11 +++++++++++ 2 files changed, 29 insertions(+) diff --git a/math/vtk9/files/patch-ThirdParty_diy2_vtkdiy2_include_vtkdiy2_fmt_format.h b/math/vtk9/files/patch-ThirdParty_diy2_vtkdiy2_include_vtkdiy2_fmt_format.h new file mode 100644 index 000000000000..eb9c13efbe2f --- /dev/null +++ b/math/vtk9/files/patch-ThirdParty_diy2_vtkdiy2_include_vtkdiy2_fmt_format.h @@ -0,0 +1,18 @@ +--- ThirdParty/diy2/vtkdiy2/include/vtkdiy2/fmt/format.h.orig 2023-02-15 04:03:53 UTC ++++ ThirdParty/diy2/vtkdiy2/include/vtkdiy2/fmt/format.h +@@ -480,6 +480,7 @@ void buffer::append(const U* begin, const U* end) { + } + } // namespace internal + ++#ifdef __cpp_char8_t + // A UTF-8 string view. + class u8string_view : public basic_string_view { + public: +@@ -497,6 +498,7 @@ inline u8string_view operator"" _u(const char* s, std: + } + } // namespace literals + #endif ++#endif // __cpp_char8_t + + // The number of characters to store in the basic_memory_buffer object itself + // to avoid dynamic memory allocation. diff --git a/math/vtk9/files/patch-Utilities_octree_octree_octree__node.txx b/math/vtk9/files/patch-Utilities_octree_octree_octree__node.txx new file mode 100644 index 000000000000..de91955442bb --- /dev/null +++ b/math/vtk9/files/patch-Utilities_octree_octree_octree__node.txx @@ -0,0 +1,11 @@ +--- Utilities/octree/octree/octree_node.txx.orig 2023-02-15 04:03:53 UTC ++++ Utilities/octree/octree/octree_node.txx +@@ -207,7 +207,7 @@ const octree_node& octree_node + { + throw std::domain_error("Attempt to access children of an octree leaf node."); + } +- return this->_M_chilren[child]; ++ return this->m_children[child]; + } + + /**\brief Return a reference to a child node.