From nobody Sat Dec 16 12:18:57 2023 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 4SslW56Bvtz53rVY; Sat, 16 Dec 2023 12:18:57 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SslW55mBhz4R9l; Sat, 16 Dec 2023 12:18:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702729137; 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=52KkvoYHr8lXdnCvoh9RGqNGzHQXhcoVKGvAkabIuKA=; b=gGxs9KVqadyyeq1NM3XjY/SsfNQNJUuRVHu582gBcjx2c2fPonEbgvdM0/ZMmq23XJp/qB pjOuBy8CKJx/L2gcg+m2dXEMzHqZkzhkewhsETvageOGcpcFfd9QWQDcmZsyaQFJc/F0yS 4tNse7GZ0malA9wiG48FrXMVx84lc8AmA+llpzYarlwQcbPGMzwGXHuIk2NVEGe/PZcoiS TBEfwkBcq5f31Ox2GwPErd8kZ8zvt8EIMdr7G/TZCfodKVdhilSPdo+344ZWxMBCZ1X6/T VPWqLH9ur2lXfSD5iYXzfjdEMeFyaWj0p2pKacv4YP7s8tVGfT9F+OWfz5Kzsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702729137; a=rsa-sha256; cv=none; b=tFtkVSchgYHxOcJMeB1rFRgwQdoeHoKoU9oYte57W4R3txgWL3qfPT40hJcbyRmTTFwQaD TccvyCywwbDC8sV10I/dq2satsiDMwhJiuGFeghCWSq1wLagvO3LyF415Ou064wEIOdFuU XEKoXib/2PYcr5MPmmiMlabSHFAIkF1fb/ZksxcsdGktZT383g29h36H6LT6T9thbvqDN4 nO7/DgrMZsMIPu4esmFjSrwq8zGl+AU39A9fMBA4TG0nSglGLPNFNOClHH5vvex9Mu5Fnx 2ezzXNkSk1XhJWFO+R42Ccc7/21mIk9lngPSR98EFVsLf9j/GE0mWdx8lhYOqw== 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=1702729137; 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=52KkvoYHr8lXdnCvoh9RGqNGzHQXhcoVKGvAkabIuKA=; b=VOCuymjf9/gAY1380JfI27F5BDYEJLx8EUPa0rclzgyoxioMZJ+SGeMlsYT4LkN8nNU/lo Zejud/PPwSGgRh1kumXMFjS/w3j7C/yb3GLpgTKuRYOYJVJPlBBGwTwBN1B4ddh6VHCKHN kEOKIFN2iIHMg7dzwYMoFTXi4gGbbAZnX4DDUnlglQWsZn4bccoayWMiiRgT96qSs1tyCB dm6xt/ukiLS+lUqer4ztYjEuFlUdSZp2tl21aemy5dZavrY/Rax7N2u3hZRncJlVPRkHDK yHtgPD0nKK1HIK/2yu3NDCLUDSaoAeiofPA1VqA5kwUOIAihbkeCEAxKVrmUDg== 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 4SslW54jG8zt0S; Sat, 16 Dec 2023 12:18:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BGCIvNK062153; Sat, 16 Dec 2023 12:18:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BGCIvWI062150; Sat, 16 Dec 2023 12:18:57 GMT (envelope-from git) Date: Sat, 16 Dec 2023 12:18:57 GMT Message-Id: <202312161218.3BGCIvWI062150@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: d0c6c55d9fb0 - main - devel/electron25: fix build with libc++ 17 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: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: 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: d0c6c55d9fb02ec38d5525aab1dab583ded772a2 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=d0c6c55d9fb02ec38d5525aab1dab583ded772a2 commit d0c6c55d9fb02ec38d5525aab1dab583ded772a2 Author: Dimitry Andric AuthorDate: 2023-12-16 12:13:46 +0000 Commit: Dimitry Andric CommitDate: 2023-12-16 12:16:39 +0000 devel/electron25: fix build with libc++ 17 Building www/qt6-webengine with libc++ 17 results in the following compile errors: In file included from ../../base/allocator/dispatcher/reentry_guard.cc:9: In file included from ../../base/debug/crash_logging.h:16: In file included from ../../base/strings/string_number_conversions.h:15: In file included from ../../base/containers/span.h:19: ../../base/containers/checked_iterators.h:248:8: error: no template named '__is_cpp17_contiguous_iterator'; did you mean '__libcpp_is_contiguous_iterator'? 248 | struct __is_cpp17_contiguous_iterator<::base::CheckedContiguousIterator> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | __libcpp_is_contiguous_iterator /usr/include/c++/v1/__iterator/iterator_traits.h:476:8: note: '__libcpp_is_contiguous_iterator' declared here 476 | struct __libcpp_is_contiguous_iterator : _Or< | ^ This is because the copy of chromium in electron25 is missing an upstream fix for recent libc++ changes, in particular: https://chromium.googlesource.com/chromium/src/+/9bfbbffdba73668fdb483e5a850911d2b64c35d7 and its dependency: https://chromium.googlesource.com/chromium/src/+/5b5551edd3961481e617e510276b9f015a35b861 Apply these patches to work around the compile error. Reported by: Rainer Hurling Tested by: Rainer Hurling --- .../patch-base_containers_checked__iterators.h | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/devel/electron25/files/patch-base_containers_checked__iterators.h b/devel/electron25/files/patch-base_containers_checked__iterators.h new file mode 100644 index 000000000000..a5ad942a78cf --- /dev/null +++ b/devel/electron25/files/patch-base_containers_checked__iterators.h @@ -0,0 +1,75 @@ +--- base/containers/checked_iterators.h.orig 2023-08-12 07:07:10 UTC ++++ base/containers/checked_iterators.h +@@ -24,6 +24,9 @@ class CheckedContiguousIterator { + using pointer = T*; + using reference = T&; + using iterator_category = std::random_access_iterator_tag; ++#if __cplusplus >= 202002L ++ using iterator_concept = std::contiguous_iterator_tag; ++#endif + + // Required for converting constructor below. + template +@@ -31,10 +34,8 @@ class CheckedContiguousIterator { + + // Required for certain libc++ algorithm optimizations that are not available + // for NaCl. +-#if defined(_LIBCPP_VERSION) && !BUILDFLAG(IS_NACL) + template + friend struct std::pointer_traits; +-#endif + + constexpr CheckedContiguousIterator() = default; + +@@ -224,7 +225,6 @@ using CheckedContiguousConstIterator = CheckedContiguo + + } // namespace base + +-#if defined(_LIBCPP_VERSION) && !BUILDFLAG(IS_NACL) + // Specialize both std::__is_cpp17_contiguous_iterator and std::pointer_traits + // for CCI in case we compile with libc++ outside of NaCl. The former is + // required to enable certain algorithm optimizations (e.g. std::copy can be a +@@ -242,13 +242,35 @@ using CheckedContiguousConstIterator = CheckedContiguo + // [1] https://wg21.link/iterator.concept.contiguous + // [2] https://wg21.link/std.iterator.tags + // [3] https://wg21.link/pointer.traits.optmem +-namespace std { + ++#if defined(_LIBCPP_VERSION) ++ ++// TODO(crbug.com/1284275): Remove when C++20 is on by default, as the use ++// of `iterator_concept` above should suffice. ++_LIBCPP_BEGIN_NAMESPACE_STD ++ ++// TODO(crbug.com/1449299): https://reviews.llvm.org/D150801 renamed this from ++// `__is_cpp17_contiguous_iterator` to `__libcpp_is_contiguous_iterator`. Clean ++// up the old spelling after libc++ rolls. + template ++struct __is_cpp17_contiguous_iterator; ++template + struct __is_cpp17_contiguous_iterator<::base::CheckedContiguousIterator> + : true_type {}; + + template ++struct __libcpp_is_contiguous_iterator; ++template ++struct __libcpp_is_contiguous_iterator<::base::CheckedContiguousIterator> ++ : true_type {}; ++ ++_LIBCPP_END_NAMESPACE_STD ++ ++#endif ++ ++namespace std { ++ ++template + struct pointer_traits<::base::CheckedContiguousIterator> { + using pointer = ::base::CheckedContiguousIterator; + using element_type = T; +@@ -267,6 +289,5 @@ struct pointer_traits<::base::CheckedContiguousIterato + }; + + } // namespace std +-#endif + + #endif // BASE_CONTAINERS_CHECKED_ITERATORS_H_