<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/102368>102368</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            libc fails to build on `error "Assumed value of MB_LEN_MAX wrong"`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            build-problem,
            libc
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          sylvestre
      </td>
    </tr>
</table>

<pre>
    On linux ubuntu mantic arm64:
https://llvm-jenkins.debian.net/job/llvm-toolchain-mantic-binaries/architecture=arm64,distribution=mantic,label=arm64/592/consoleFull

```

FAILED: libc/src/math/generic/CMakeFiles/libc.src.math.generic.daddf128.dir/daddf128.cpp.o
/build/source/build-llvm/./bin/clang++ --target=aarch64-unknown-linux-gnu -DLIBC_NAMESPACE=__llvm_libc_20_0_0_ -I/build/source/libc -isystem /build/source/build-llvm/runtimes/runtimes-bins/libc/include -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wno-unused-command-line-argument -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fdebug-prefix-map=/build/source/build-llvm/runtimes/runtimes-bins=../../../ -fdebug-prefix-map=/build/source/= -no-canonical-prefixes -ffile-prefix-map=/build/source/build-llvm/runtimes/runtimes-bins=../../../ -ffile-prefix-map=/build/source/= -no-canonical-prefixes -O3 -DNDEBUG -std=gnu++17 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -fpie -ffixed-point -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -DLIBC_COPT_PUBLIC_PACKAGING -MD -MT libc/src/math/generic/CMakeFiles/libc.src.math.generic.daddf128.dir/daddf128.cpp.o -MF libc/src/math/generic/CMakeFiles/libc.src.math.generic.daddf128.dir/daddf128.cpp.o.d -o libc/src/math/generic/CMakeFiles/libc.src.math.generic.daddf128.dir/daddf128.cpp.o -c /build/source/libc/src/math/generic/daddf128.cpp
In file included from /build/source/libc/src/math/generic/daddf128.cpp:10:
In file included from /build/source/libc/src/__support/FPUtil/generic/add_sub.h:17:
In file included from /build/source/libc/src/__support/FPUtil/BasicOperations.h:12:
In file included from /build/source/libc/src/__support/FPUtil/FEnvImpl.h:13:
In file included from /build/source/libc/hdr/math_macros.h:23:
In file included from /usr/lib/gcc/aarch64-linux-gnu/13/../../../../include/c++/13/math.h:36:
In file included from /usr/lib/gcc/aarch64-linux-gnu/13/../../../../include/c++/13/cmath:49:
In file included from /usr/lib/gcc/aarch64-linux-gnu/13/../../../../include/c++/13/bits/std_abs.h:38:
In file included from /usr/include/stdlib.h:1159:
/usr/include/aarch64-linux-gnu/bits/stdlib.h:86:3: error: "Assumed value of MB_LEN_MAX wrong"
   86 | # error "Assumed value of MB_LEN_MAX wrong"
      |   ^
1 error generated.
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEV11v2zrS_jX0DUHDpmwnvvCFY0WFcZImp22Q970SKHIkT0uRWn44yf76BSU5HwfZs22B4KCFYpHDZx7OzDMihffYGIANWV6QZT4RMRys2_gnfQQfHEwqq542N4ZqNPGRxiqaEGk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