Building on FreeBSD 13.2-STABLE/amd64 from late May with "FreeBSD Clang 15.0.7 (https://github.com/llvm/llvm-project.git llvmorg-15.0.7-0-g8dfdcc7b7bf6)", the build fails in out/Release as below. I've had a look at the pre-processed intermediate ("-dD -E") and there's nothing obvious. The relevant code has a patch that wraps it in: #if BUILDFLAG(IS_OPENBSD) || (BUILDFLAG(IS_FREEBSD) && (_LIBCPP_VERSION > 15000)) that was added in https://cgit.freebsd.org/ports/commit/?id=010eff12e836eec1163a43a71439732c2a561213 Compilation failure: FAILED: obj/components/webauthn/core/browser/browser/passkey_sync_bridge.o c++ -MMD -MF obj/components/webauthn/core/browser/browser/passkey_sync_bridge.o.d -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_56 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56 -DBASE_USE_PERFETTO_CLIENT_LIBRARY=1 -DLIBYUV_DISABLE_NEON -DUSE_EGL -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_WAYLAND_KHR -DUSE_SYSTEM_LIBEVENT=1 -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0 -DHAVE_PTHREAD -DUSING_SYSTEM_ICU=1 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -DU_FINAL=final -DU_NOEXCEPT=noexcept -DU_OVERRIDE=override -DU_IMPORT=U_EXPORT -DWEBRTC_ENABLE_AVX2 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DWEBRTC_BSD -DABSL_ALLOCATOR_NOTHROW=1 -DWEBRTC_USE_X11 -DLOGGING_INSIDE_WEBRTC -DSK_ENABLE_SKSL -DSK_UNTIL_CRBUG_1187654_IS_FIXED -DSK_USER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\" -DSK_WIN_FONTMGR_NO_SIMULATIONS -DSK_DISABLE_LEGACY_SKSURFACE_METHODS -DSK_DISABLE_LEGACY_GRAPHITE_IMAGE_FACTORIES -DSK_DISABLE_LEGACY_GRAPHITE_IMAGE_METHODS -DSK_DISABLE_LEGACY_SKSURFACE_FACTORIES -DSK_DISABLE_LEGACY_SKSURFACE_FLUSH -DSK_DISABLE_LEGACY_SKSURFACE_AS_IMAGE -DSK_DISABLE_LEGACY_SKSURFACE_DISPLAYLIST -DSK_CODEC_DECODES_JPEG -DSK_CODEC_DECODES_PNG -DSK_CODEC_DECODES_WEBP -DSK_ENCODE_JPEG -DSK_ENCODE_PNG -DSK_ENCODE_WEBP -DSK_HAS_WUFFS_LIBRARY -DSK_GANESH -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DSK_GL -DSK_VULKAN=1 -DSK_GRAPHITE -DLEVELDB_PLATFORM_CHROMIUM=1 -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 -Igen/shim_headers/libpng_shim -Igen/shim_headers/libwebp_shim -I../../third_party/libyuv/include -I../../third_party/jsoncpp/source/include -Igen/shim_headers/opus_shim -Igen/shim_headers/openh264_shim -Igen/shim_headers/dav1d_shim -I../../third_party/vulkan-deps/vulkan-headers/src/include -I../../third_party/wayland/src/src -I../../third_party/wayland/include/src -Igen/third_party/dawn/include -I../../third_party/dawn/include -I../../third_party/khronos -I../../gpu -Igen/shim_headers/flac_shim -Igen/shim_headers/snappy_shim -Igen/third_party/private_membership/src -Igen/third_party/shell-encryption/src -Igen/components/policy/proto -I../../third_party/abseil-cpp -I../../third_party/boringssl/src/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/ipcz/include -I../../net/third_party/quiche/overrides -I../../net/third_party/quiche/src/quiche/common/platform/default -I../../net/third_party/quiche/src -Igen/net/third_party/quiche/src -I../../third_party/ced/src -I../../third_party/webrtc_overrides -I../../third_party/webrtc -Igen/third_party/webrtc -I../../third_party/skia -Igen/third_party/skia -I../../third_party/wuffs/src/release/c -I../../third_party/vulkan/include -I../../third_party/libwebm/source -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../third_party/libaom/source/libaom -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=ssp-buffer-size=4 -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=pattern -O2 -fdata-sections -ffunction-sections -fno-unique-section-names -fno-omit-frame-pointer -g0 -fprofile-use=../../chrome/build/pgo_profiles/chrome-linux-5845-1692121706-2581e1554c78da1b495c99d060301e969463dc3a.profdata -Wno-profile-instr-unprofiled -Wno-profile-instr-out-of-date -Wno-backend-plugin -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -Wno-redundant-parens -DPROTOBUF_ALLOW_DEPRECATED=1 -I/usr/local/include -I/usr/local/include/nss -I/usr/local/include/nspr -I/usr/local/include -I/usr/local/include -Wno-redundant-parens -std=c++20 -Wno-trigraphs -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -O2 -pipe -march=znver1 -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -c ../../components/webauthn/core/browser/passkey_sync_bridge.cc -o obj/components/webauthn/core/browser/browser/passkey_sync_bridge.o ../../components/webauthn/core/browser/passkey_sync_bridge.cc:272:20: error: no member named 'find_if' in namespace 'std::ranges' std::ranges::find_if(data_, [&credential_id](const auto& passkey) { ~~~~~~~~~~~~~^ ../../components/webauthn/core/browser/passkey_sync_bridge.cc:328:20: error: no member named 'find_if' in namespace 'std::ranges' std::ranges::find_if(data_, [&credential_id](const auto& passkey) { ~~~~~~~~~~~~~^ 2 errors generated. ninja: build stopped: subcommand failed. *** Error code 1 Stop. make[1]: stopped in /usr/ports/www/chromium *** Error code 1 Stop. make: stopped in /usr/ports/www/chromium
_LIBCPP_VERSION is defined in /usr/include/c++/v1/__config and on 13.2 it should be: #define _LIBCPP_VERSION 14000
Note that I'm using 13-STABLE, not 13.2-RELEASE. The current value for 13-STABLE is actually 160006 (see https://cgit.freebsd.org/src/tree/contrib/llvm-project/libcxx/include/__config?h=stable/13#n41) - I'm a couple of months behind. It was bumped from 14000 to 15000 in https://cgit.FreeBSD.org/src/commit/?id=255d6c9fe5a7577c6caf78004034f2555bd0cba0 and has been regularly updated since then (note that the format changed between LLVM 15 and LLVM 16).
(In reply to Peter Jeremy from comment #2) But libc++ 16.0.6 which is in 13-STABLE should have ranges::find_if, so please update and retry.
I also get the same thing on a May releng/13, which has # define _LIBCPP_VERSION 15007
std::ranges requires libc++ >= 16 per https://github.com/llvm/llvm-project/commit/b8cb1dc9ea87. libc++ 15 has -fexperimental-library to expose std::ranges but the support may be incomplete (unlike libc++ 16) for some consumers. Besides disabling features for libc++ < 16 one can use devel/range-v3 like editors/imhex/files/patch-lib_libimhex_source_api_imhex__api.cpp or bundle libc++ like emulators/yuzu and x11-wm/hyprland. (In reply to fullermd from comment #4) releng/13 doesn't exist as releng/* always contains minor version. stable/13 is moving target, so old snapshots are not supported by re@ or portmgr@. The package cluster always updates base system before building for -STABLE (new major version preparation) and -CURRENT (unstable API/ABI but mitigated via symbol versioning... except OpenSSL). $ cd /usr/src $ git branch -r --list origin/releng/13\* origin/releng/13.0 origin/releng/13.1 origin/releng/13.2 $ git grep -w '_LIBCPP_VERSION [[:digit:]]*' $(git branch -r --list origin/releng/13\*) origin/stable/13 contrib/llvm-project/libcxx/include/__config origin/releng/13.0:contrib/llvm-project/libcxx/include/__config:#define _LIBCPP_VERSION 11000 origin/releng/13.1:contrib/llvm-project/libcxx/include/__config:#define _LIBCPP_VERSION 13000 origin/releng/13.2:contrib/llvm-project/libcxx/include/__config:#define _LIBCPP_VERSION 14000 origin/stable/13:contrib/llvm-project/libcxx/include/__config:# define _LIBCPP_VERSION 160006
Created attachment 244415 [details] v1 (apply via "git am") Untested but probably what comment 0 wanted. Given _LIBCPP_VERSION conditional has to be kept until FreeBSD 13.2 reaches EOL (around 2024-05-01) may as well adjust it to be slightly more correct.
(In reply to Jan Beich from comment #6) I can't reproduce this issue at all on 14-ALPHA or 13-STABLE, so someone else would have to test.
Created attachment 244419 [details] 0001-www-chromium-bump-_LIBCPP_VERSION-check-to-160000-an.patch Hi As Jan suggested the attached patch bumps the check to 160000 which should be okay and falls back to using base::ranges which is also available in the chromium source tree. Hopefully this will fix all the issues related to this.
(In reply to Jan Beich from comment #5) Yes, sorry, stable/13. Apparently I still have CVS on the brain. (In reply to Robert Nagy from comment #8) Builds and seems to run normally for me with that patch.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=f14f291a6dfea6d167aa9800a5ea05125c4b776f commit f14f291a6dfea6d167aa9800a5ea05125c4b776f Author: Robert Nagy <rnagy@FreeBSD.org> AuthorDate: 2023-08-28 12:57:23 +0000 Commit: Robert Nagy <rnagy@FreeBSD.org> CommitDate: 2023-08-28 19:12:26 +0000 www/*chromium: bump _LIBCPP_VERSION check to 160000 and fallback to base::ranges the chromium source tree provides ranges functions so let's use them in case our libcxx is too old PR: 273376 www/chromium/Makefile | 1 + ...__manager_core_browser_ui_passwords__grouper.cc | 25 +++++--------- ..._webauthn_core_browser_passkey__sync__bridge.cc | 38 ++++++++-------------- www/ungoogled-chromium/Makefile | 1 + ...__manager_core_browser_ui_passwords__grouper.cc | 25 +++++--------- ..._webauthn_core_browser_passkey__sync__bridge.cc | 38 ++++++++-------------- 6 files changed, 46 insertions(+), 82 deletions(-)
A commit in branch 2023Q3 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=3c9a82210557fd280dff7216b48b50e9d090b55e commit 3c9a82210557fd280dff7216b48b50e9d090b55e Author: Robert Nagy <rnagy@FreeBSD.org> AuthorDate: 2023-08-28 12:57:23 +0000 Commit: Robert Nagy <rnagy@FreeBSD.org> CommitDate: 2023-08-28 19:12:50 +0000 www/*chromium: bump _LIBCPP_VERSION check to 160000 and fallback to base::ranges the chromium source tree provides ranges functions so let's use them in case our libcxx is too old PR: 273376 (cherry picked from commit f14f291a6dfea6d167aa9800a5ea05125c4b776f) www/chromium/Makefile | 1 + ...__manager_core_browser_ui_passwords__grouper.cc | 25 +++++--------- ..._webauthn_core_browser_passkey__sync__bridge.cc | 38 ++++++++-------------- www/ungoogled-chromium/Makefile | 1 + ...__manager_core_browser_ui_passwords__grouper.cc | 25 +++++--------- ..._webauthn_core_browser_passkey__sync__bridge.cc | 38 ++++++++-------------- 6 files changed, 46 insertions(+), 82 deletions(-)