From nobody Thu Dec 14 23:53:57 2023 X-Original-To: freebsd-ports@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 4Srq1y5Z14z53xy4 for ; Thu, 14 Dec 2023 23:53:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Srq1y57xlz3QFV; Thu, 14 Dec 2023 23:53:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702598038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=S0+TWzuAY7bUqd+8JlByZBARbNVoRf0EeQO0GIWaBQY=; b=JwW6zzctQBI0AiC8mHHYCD0aF8KeaHbbQ4d/bX2sabtvGJuHEGLrqFPnxAJiHjBku74/7H d0/EBqwouXj8eJKWGwM5e9xbalBSui8FN6s2lwvVnWFga7ZspzBye9uM4q7tfxXm1v+MXo igRqOIpQtvDmGshSOSxYuVNQPmYsmUDDX64LTLb4FZim4eI8F+HqTHGLFGfZJme99p7vQo 7G+Q6is3gqxlAA2lXfuvJATfJ+XBmghGEOhp7VuAy3ltTdH9bH+L0zFg1tloLuFTIundeC gaQ0xbKuwvkdsFVsfylc5iYf4oR2Rv8J5pfpBh/ET8w2u3RnA+H191So9Szizw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702598038; a=rsa-sha256; cv=none; b=EY7jcO0zcef4ERe5vxM0+bDtq40v7O+wjdIEP4vxNPG60ZPLCKib2u07wobjfasJJk84do bMPtGfvhwJIJfK3JcYKUT+rdqD2xSItKFL7SsvtMq0PGeZ1bnJMMrORb3btTnFkwP8RaVJ ggzc455TlPDdF89dByY9XrNv+3oW+ah6XYVIT3BeIeA/hAgJAdSy/oY9ywljB8wwQCcOKI 7eYR9N0paU8T+Nt7T3/dusZb/Q4xY3d8uY4V0GT/hGT/GGvimR7mefwt2G1KKSkLWYUYw8 ADtl79LuReY2/aZLStRT+WVkaZWiUwBKD1lH9aD5u7RMKmHqx9Cgcgt7UBtUvA== 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=1702598038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=S0+TWzuAY7bUqd+8JlByZBARbNVoRf0EeQO0GIWaBQY=; b=UYobkxMasNyD6wmIS8r7EarmZ9PKpfeeIB0M0LB5b3uhSQC0vFi0ig3l35iKJ1343e/UqG WPntendy/WXCSItoloM8Lmjj1//NF5gELJmc26L8pA5dKfFiyPHG+bBMu4/al8nIj5a/dn W8lkEmth8n2rO5EobkqGUbbQ7s++9FFJXzC4aQXb3zy+IopTJz0zwL9gq2uenZ/L1o2U1C Na6DY6UTsohe/c3ZAVWPuUujj0Gom+o4x/qDNBD9jxffKIFFHO7+85AY/yiokow15zyBWp tSLEUEBWPDVuPdSw/awpHKtsKRSp+Zv0RczoYVN8BAu/i++Q0C/RSfj6DgD3ZA== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (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 (2048 bits) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Srq1y3TwZzyVk; Thu, 14 Dec 2023 23:53:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.home.andric.com [192.168.0.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 42EA348903; Fri, 15 Dec 2023 00:53:57 +0100 (CET) From: Dimitry Andric Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_E170E80B-E40A-47B2-A677-4CA8E136395D" List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: devel/electron25: Build failure on CURRENT with clang17 Date: Fri, 15 Dec 2023 00:53:57 +0100 In-Reply-To: <3A903343-1A21-474D-82A2-ACE40DCE19D3@FreeBSD.org> Cc: "" , FreeBSD Mailing List To: Rainer Hurling References: <3A903343-1A21-474D-82A2-ACE40DCE19D3@FreeBSD.org> X-Mailer: Apple Mail (2.3731.700.6) --Apple-Mail=_E170E80B-E40A-47B2-A677-4CA8E136395D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 14 Dec 2023, at 21:23, Dimitry Andric wrote: >=20 > On 14 Dec 2023, at 20:49, Rainer Hurling wrote: >>=20 >> On my FreeBSD 15.0-CURRENT amd64 boxes with clang 17 as base compiler = I get: >>=20 >> =3D=3D=3D> Building for electron25-25.9.8_1 >> ninja: Entering directory `out/Release' >> [ 0% 1/32805] c++ -MMD -MF obj/base/base/reentry_guard.o.d = -DBASE_IMPLEMENTATION -DIS_RAW_PTR_IMPL -DSYSTEM_NATIVE_UTF8 = -DUSE_SYMBOLIZE -DUSE_AURA=3D1 -DUSE_GLIB=3D1 -DUSE_OZONE=3D1 = -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS = -D_FORTIFY_SOURCE=3D2 -D_FILE_OFFSET_BITS=3D64 -D_LARGEFILE_SOURCE = -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DNDEBUG = -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=3D0 -DIS_MAS_BUILD\(\)=3D0 = -DGLIB_VERSION_MAX_ALLOWED=3DGLIB_VERSION_2_56 = -DGLIB_VERSION_MIN_REQUIRED=3DGLIB_VERSION_2_56 -DUSE_SYSTEM_LIBEVENT=3D1 = -DGLOG_EXPORT=3D -DUSING_SYSTEM_ICU=3D1 >> -DICU_UTIL_DATA_IMPL=3DICU_UTIL_DATA_STATIC -DU_FINAL=3Dfinal = -DU_NOEXCEPT=3Dnoexcept -DU_OVERRIDE=3Doverride -DU_IMPORT=3DU_EXPORT = -I../.. -Igen -I../../third_party/perfetto/include = -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto = -Igen/shim_headers/libevent_shim -Igen/shim_headers/icui18n_shim = -Igen/shim_headers/icuuc_shim -I../../third_party/abseil-cpp = -I../../third_party/boringssl/src/include = -I../../third_party/protobuf/src -Igen/protoc_out -Wall -Wextra = -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive = -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter = -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration = -Wenum-compare-conditional -Wno-ignored-pragma-optimize -Wshadow = -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing = --param=3Dssp-buffer-size=3D4 -fstack-protector -fno-unwind-tables = -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics = -fmerge-all-constants -m64 -msse3 -Xclang -fdebug-compilation-dir = -Xclang . -no-canonical-prefixes -ftrivial-auto-var-init=3Dpattern = -fno-omit-frame-pointer -g0 -fvisibility=3Dhidden -Wheader-hygiene = -Wstring-conversion -Wtautological-overlap-compare -Wshorten-64-to-32 = -Wimplicit-int-conversion -Wsign-compare -Wsign-conversion = -Wtautological-unsigned-zero-compare -Wexit-time-destructors = -Wglobal-constructors -I/usr/local/include -I/usr/local/include/glib-2.0 = -I/usr/local/lib/glib-2.0/include -O2 -fdata-sections = -ffunction-sections -fno-unique-section-names = -DPROTOBUF_ALLOW_DEPRECATED=3D1 -I/usr/local/include = -I/usr/local/include -std=3Dc++20 -Wno-trigraphs -fno-exceptions = -fno-rtti -fvisibility-inlines-hidden -O2 -pipe -fstack-protector-strong = -isystem /usr/local/include -fno-strict-aliasing -isystem = /usr/local/include -c ../../base/allocator/dispatcher/reentry_guard.cc = -o obj/base/base/reentry_guard.o >> FAILED: obj/base/base/reentry_guard.o >> c++ -MMD -MF obj/base/base/reentry_guard.o.d -DBASE_IMPLEMENTATION = -DIS_RAW_PTR_IMPL -DSYSTEM_NATIVE_UTF8 -DUSE_SYMBOLIZE -DUSE_AURA=3D1 = -DUSE_GLIB=3D1 -DUSE_OZONE=3D1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS = -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=3D2 -D_FILE_OFFSET_BITS=3D64 = -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES = -D_GNU_SOURCE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=3D0 = -DIS_MAS_BUILD\(\)=3D0 -DGLIB_VERSION_MAX_ALLOWED=3DGLIB_VERSION_2_56 = -DGLIB_VERSION_MIN_REQUIRED=3DGLIB_VERSION_2_56 -DUSE_SYSTEM_LIBEVENT=3D1 = -DGLOG_EXPORT=3D -DUSING_SYSTEM_ICU=3D1 = -DICU_UTIL_DATA_IMPL=3DICU_UTIL_DATA_STATIC -DU_FINAL=3Dfinal = -DU_NOEXCEPT=3Dnoexcept -DU_OVERRIDE=3Doverride -DU_IMPORT=3DU_EXPORT = -I../.. -Igen -I../../third_party/perfetto/include = -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto = -Igen/shim_headers/libevent_shim -Igen/shim_headers/icui18n_shim = -Igen/shim_headers/icuuc_shim -I../../third_party/abseil-cpp = -I../../third_party/boringssl/src/include = -I../../third_party/protobuf/src -Igen/protoc_out -Wall -Wextra = -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive = -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter = -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration = -Wenum-compare-conditional -Wno-ignored-pragma-optimize -Wshadow = -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing = --param=3Dssp-buffer-size=3D4 -fstack-protector -fno-unwind-tables = -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics = -fmerge-all-constants -m64 -msse3 -Xclang -fdebug-compilation-dir = -Xclang . -no-canonical-prefixes -ftrivial-auto-var-init=3Dpattern = -fno-omit-frame-pointer -g0 -fvisibility=3Dhidden -Wheader-hygiene = -Wstring-conversion -Wtautological-overlap-compare -Wshorten-64-to-32 = -Wimplicit-int-conversion -Wsign-compare -Wsign-conversion = -Wtautological-unsigned-zero-compare -Wexit-time-destructors = -Wglobal-constructors -I/usr/local/include -I/usr/local/include/glib-2.0 = -I/usr/local/lib/glib-2.0/include -O2 -fdata-sections = -ffunction-sections -fno-unique-section-names = -DPROTOBUF_ALLOW_DEPRECATED=3D1 -I/usr/local/include = -I/usr/local/include -std=3Dc++20 -Wno-trigraphs -fno-exceptions = -fno-rtti -fvisibility-inlines-hidden -O2 -pipe -fstack-protector-strong = -isystem /usr/local/include -fno-strict-aliasing -isystem = /usr/local/include -c ../../base/allocator/dispatcher/reentry_guard.cc = -o obj/base/base/reentry_guard.o >> 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< >> | ^ >> 1 error generated. >> ninja: build stopped: subcommand failed. >> *** Error code 1 >=20 > This is the same problem that I fixed for qt6-webengine here: > = https://cgit.freebsd.org/ports/commit/?id=3D660b01aa59ee1266ce0faf5718dc5c= 90abfa4f31 >=20 > I'll take a look. I haven't yet been able to build the port itself as my test machine is swamped with jobs, but the patch from qt6-webengine applied without fuzz. Can you please try the attached diff? -Dimitry --Apple-Mail=_E170E80B-E40A-47B2-A677-4CA8E136395D Content-Disposition: attachment; filename=devel__electron25-fix-libcxx17-build-1.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="devel__electron25-fix-libcxx17-build-1.diff" Content-Transfer-Encoding: 7bit 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_ --Apple-Mail=_E170E80B-E40A-47B2-A677-4CA8E136395D Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_E170E80B-E40A-47B2-A677-4CA8E136395D--