<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/117895>117895</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Mac build is failing due to ::wcsnrtombs_l and ::mbsnrtowcs_l
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ShabbyX
</td>
</tr>
</table>
<pre>
Hi! Since #113759, llvm rolling into ANGLE is failing build on mac. Example:
```
[3/2274] CXX obj/src/tests/angle_deqp_framework_xexml/xeDefs.o
FAILED: obj/src/tests/angle_deqp_framework_xexml/xeDefs.o
../../buildtools/reclient/rewrapper -cfg=../../buildtools/reclient_cfgs/chromium-browser-clang/rewrapper_mac.cfg -exec_root=/Volumes/Work/s/w/ir/cache/builder/angle/ ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/src/tests/angle_deqp_framework_xexml/xeDefs.o.d -DDCHECK_ALWAYS_ON=1 -DCR_XCODE_VERSION=1610 -DCR_CLANG_REVISION=\"llvmorg-20-init-9764-gb81d8e90-7\" -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -DCOMPONENT_BUILD -DCR_LIBCXX_REVISION=76cb1e3b4a69ccc6407c9a3aaab3aaba2432f868 -DTMP_REBUILD_HACK -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DANGLE_ASSERT_ALWAYS_ON -DANGLE_ENABLE_SHARE_CONTEXT_LOCK=1 -DANGLE_ENABLE_CONTEXT_MUTEX=1 -DANGLE_HAS_ASTCENC -DANGLE_DEBUG_LAYERS_ENABLED -DANGLE_OUTSIDE_WEBKIT -DANGLE_ENABLE_CL -DDEQP_SUPPORT_GLES31=1 -DDEQP_SUPPORT_GLES3=1 -DDEQP_SUPPORT_GLES2=1 -DDEQP_SUPPORT_EGL=1 -DDEQP_TARGET_NAME=\"angle\" -DDEQP_GLES31_RUNTIME_LOAD=1 -DDEQP_GLES3_RUNTIME_LOAD=1 -DDEQP_GLES2_RUNTIME_LOAD=1 -DQP_SUPPORT_PNG=1 -D_HAS_EXCEPTIONS=1 -D_MBCS -DANGLE_DEQP_DATA_DIR=\"gen/vk_gl_cts_data/data\" -D_XOPEN_SOURCE=600 -DDE_FENV_ACCESS_ON=_Pragma\(\"STDC\ FENV_ACCESS\ ON\"\) -I../../buildtools/third_party/libc++ -I../../include -I../../src -I../../third_party/VK-GL-CTS/src/executor -I../../third_party/VK-GL-CTS/src/execserver -I../../third_party/VK-GL-CTS/src/framework/platform/lnx -I../../third_party/VK-GL-CTS/src/framework/platform/lnx/X11 -I../../third_party/VK-GL-CTS/src/framework/platform/null -I../../third_party/VK-GL-CTS/src/framework/platform/win32 -I../../third_party/VK-GL-CTS/src/framework/xexml -I../../third_party/VK-GL-CTS/src/modules/gles2 -I../../third_party/VK-GL-CTS/src/modules/gles2/functional -I../../third_party/VK-GL-CTS/src/modules/gles2/accuracy -I../../third_party/VK-GL-CTS/src/modules/gles2/performance -I../../third_party/VK-GL-CTS/src/modules/gles2/stress -I../../third_party/VK-GL-CTS/src/modules/gles2/usecases -I../../third_party/VK-GL-CTS/src/modules/gles3 -I../../third_party/VK-GL-CTS/src/modules/gles3/functional -I../../third_party/VK-GL-CTS/src/modules/gles3/accuracy -I../../third_party/VK-GL-CTS/src/modules/gles3/performance -I../../third_party/VK-GL-CTS/src/modules/gles3/stress -I../../third_party/VK-GL-CTS/src/modules/gles3/usecases -I../../third_party/VK-GL-CTS/src/modules/gles31 -I../../third_party/VK-GL-CTS/src/modules/gles31/functional -I../../third_party/VK-GL-CTS/src/modules/gles31/stress -I../../third_party/VK-GL-CTS/src/modules/glusecases -I../../third_party/VK-GL-CTS/src/modules/egl -I../../third_party/glslang/src -I../../third_party/spirv-tools/src -I../../third_party/VK-GL-CTS/src/framework/delibs/decpp -I../../third_party/VK-GL-CTS/src/framework/delibs/debase -I../../third_party/VK-GL-CTS/src/framework/delibs/depool -I../../third_party/VK-GL-CTS/src/framework/delibs/dethread -I../../third_party/VK-GL-CTS/src/framework/delibs/deutil -I../../third_party/VK-GL-CTS/src/framework/delibs/destream -Wno-nonportable-include-path -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing -fstack-protector -femit-dwarf-unwind=no-compact-unwind -fcolor-diagnostics -fmerge-all-constants -fno-sized-deallocation -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -mllvm -split-threshold-for-reg-with-hint=0 -ffp-contract=off -fcomplete-member-pointers --target=x86_64-apple-macos -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -ffile-compilation-dir=. -no-canonical-prefixes -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -gdwarf-4 -g1 -gdwarf-aranges -isysroot ../../build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk -mmacos-version-min=11.0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -O2 -fno-math-errno -Wall -Wno-unused-variable -Wno-c++11-narrowing -Wno-unused-but-set-variable -Wno-misleading-indentation -Wunguarded-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration -Wno-cast-function-type -Wno-thread-safety-reference-return -Werror -std=c++20 -Wno-trigraphs -nostdinc++ -isystem../../third_party/libc++/src/include -isystem../../third_party/libc++abi/src/include -fvisibility-inlines-hidden -Wno-sizeof-array-div -Wno-string-conversion -Wno-unused-function -Wno-unused-local-typedef -Wno-unused-result -fwrapv -fexceptions -Wno-invalid-offsetof -Wenum-compare-conditional -Wno-c++11-narrowing-const-reference -Wno-missing-template-arg-list-after-template-kw -Wno-dangling-assignment-gsl -c ../../third_party/VK-GL-CTS/src/framework/xexml/xeDefs.cpp -o obj/src/tests/angle_deqp_framework_xexml/xeDefs.o
In file included from ../../third_party/VK-GL-CTS/src/framework/xexml/xeDefs.cpp:26:
In file included from ../../third_party/libc++/src/include/sstream:320:
In file included from ../../third_party/libc++/src/include/__ostream/basic_ostream.h:26:
In file included from ../../third_party/libc++/src/include/ios:220:
In file included from ../../third_party/libc++/src/include/__locale:14:
In file included from ../../third_party/libc++/src/include/__locale_dir/locale_base_api.h:33:
../../third_party/libc++/src/include/__locale_dir/locale_base_api/bsd_locale_defaults.h:50:12: error: no member named 'wcsnrtombs_l' in the global namespace
50 | return ::wcsnrtombs_l(__dest, __src, __nwc, __len, __ps, __loc);
| ~~^
../../third_party/libc++/src/include/__locale_dir/locale_base_api/bsd_locale_defaults.h:59:12: error: no member named 'mbsnrtowcs_l' in the global namespace
59 | return ::mbsnrtowcs_l(__dest, __src, __nms, __len, __ps, __loc);
| ~~^
2 errors generated.
```
As far as I can tell, this doesn't fail in Chromium itself. I see 200 files failing build, all coming from ANGLE's build of `VK-GL-CTS`, but I can't tell if that's the _only_ set of fails that would fail to build. Presumably there's a build flag affecting this?
@ldionne is there a fix/revert needed in llvm? Is there a way I could fix it in ANGLE itself? Link to failing roll into ANGLE: https://chromium-review.googlesource.com/c/angle/angle/+/6053769
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8WU9T47gS_zTmolLKsQkhBw4mdpjUQMImmYE9uWS77WiRJT9JSWAP-9lfteyEMDPsGwbmVVHEbqlb3b_-o5bFjOGVBLjwBpfeID5hG7tW-mK5Zln2dH-SqeLp4hP3gj5ZcpkD8YKw3w-Hg5EXjIkQ25poJQSXFeHSKhLNrq4Twg0pGXfUbMNFQZQkNct7JHlkdSPACyPPd39nfvfnR97gMvSCSRAMT71BTMb390Rlf3nBxOjcCyYWjDVeMGGyEpAW8J8mLTWrYaf0Q_oIj7XwgskjxFCanvL8aBJNr5PYC6Nfl0I8P-r1vGDi_jlLrFIC-TXkgoO07nGnWdOAJjQvKy-M_wdLmpcVvudrrWq-qWmm1c6AprlgsjoWmCJm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