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

    <tr>
        <th>Summary</th>
        <td>
            Error when building llvm 16.0.0-rc2
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    ```c++
+ /usr/bin/cmake .. -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64 -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 -DCMAKE_SKIP_RPATH:BOOL=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF '-DCMAKE_MODULE_LINKER_FLAGS=-O2 -fomit-frame-pointer -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -m64 -mtune=generic  -Wno-ignored-optimization-argument -Wl,-O2 -Wl,--no-undefined   -Wl,--unresolved-symbols=ignore-all' -G Ninja -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_BUILD_TYPE=RelWithDebInfo '-DLLVM_ENABLE_PROJECTS:STRING=clang;clang-tools-extra;polly;lld;lldb;' -DBUILD_SHARED_LIBS:BOOL=OFF -DLLVM_LIBDIR_SUFFIX=64 -DCLANG_LIBDIR_SUFFIX=64 '-DCLANG_REPOSITORY_STRING=ROSA 16.0.0~rc2-6' -DWITH_POLLY:BOOL=ON -DLINK_POLLY_INTO_TOOLS:BOOL=ON -DLLVM_ENABLE_FFI:BOOL=ON -DLLVM_ENABLE_RTTI:BOOL=ON -DLLVM_BINUTILS_INCDIR=/usr/include -DLLVM_INCLUDE_UTILS:BOOL=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DOCAMLFIND=NOTFOUND -DLLVM_INSTALL_UTILS:BOOL=ON -DLLVM_UTILS_INSTALL_DIR:PATH=/usr/bin -DLLVM_INCLUDE_DOCS:BOOL=ON -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON -DLLVM_LINK_LLVM_DYLIB:BOOL=ON -DLLVM_BUILD_DOCS:BOOL=ON -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_EXTERNAL_LIT=/usr/bin/lit -DLLVM_INCLUDE_BENCHMARKS=OFF ../llvm
-- The C compiler identification is Clang 16.0.0
-- The CXX compiler identification is Clang 16.0.0
-- The ASM compiler identification is Clang
-- Found assembler: /usr/bin/clang
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- bolt project is disabled
-- clang project is enabled
-- clang-tools-extra project is enabled
-- compiler-rt project is disabled
-- cross-project-tests project is disabled
-- libc project is disabled
-- libclc project is disabled
-- lld project is enabled
-- lldb project is enabled
-- mlir project is disabled
-- openmp project is disabled
-- polly project is enabled
-- pstl project is disabled
-- flang project is disabled
-- Found Python3: /usr/bin/python3.8 (found suitable version "3.8.13", minimum required is "3.6") found components: Interpreter 
-- Performing Test LLVM_LIBSTDCXX_MIN
-- Performing Test LLVM_LIBSTDCXX_MIN - Failed
CMake Error at cmake/modules/CheckCompilerVersion.cmake:88 (message):
  libstdc++ version must be at least 7.1.
Call Stack (most recent call first):
  cmake/config-ix.cmake:15 (include)
 CMakeLists.txt:848 (include)
-- Configuring incomplete, errors occurred!
See also "/builddir/build/BUILD/llvm-project-llvmorg-16.0.0-rc2/build/CMakeFiles/CMakeOutput.log".
See also "/builddir/build/BUILD/llvm-project-llvmorg-16.0.0-rc2/build/CMakeFiles/CMakeError.log".
RPM build errors:
```

When building llvm 16.0.0-rc clang 15, the build is successful. When I start to rebuild the clang 16 project, the build crashes.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8WMty4jwWfhplo5ILZCBhwcLYuNvTxqaM00lm4_JFBv2RLY8kd3f-xTz7lGxDAyGkZxZTRRGL8537RcdJpaS7mpAFmC7B1LlLW7XnYpGxNH_NBZfyYXaX8eJtAWaj_pMDvNSfkQNGFsBLCLDbSgGwm9EaYDev0lcCDQMix15b31aJF2xjy_eTTbRyvWdgWhsr_gpMp-d7B_O9peNFlzCAXUaz2QQixwts_9H5zXAdTeuctQWByPG95SfYg-Tty9YOA_dDNFG5Rn21os-8AtiV-1Qc1G8f3Q7kdGp6f7ffvE0S9VzWMgx9YDphcCR_X0XLcLtK9MH1_NUFaPno-U7SmeLokG2v02Mr9uxLuutCgO8Pitah8-ivEt8Lvq2ixPWtL1tgOijEEJW8ogqVIq0IajitFREQ7YqfqSjRBKInqQTNFUoZTSWtd8B0MEQNbQhETyUXVaogeiJCcAFMp_8BSZK3gqo3iJzEDaPYc1-SbfgY2auevdx4NkSlVGn-ihrBFckVF0gqwesdRKhJRVoB05GyQVlblkQgSf8mwHQmEFU6vpVqa33ekZoImkOInmqO6K7mghSIN4pW9O9UUV6jVOzaitTaTAaw3TndP6Gao7YuSElrUkB4_LmtBZGc_SAFkm9VxpkEptPLRiljAN9D9AUGtP4rPabSTuxwvfH8VXRaH0O3sFS7dUA-P3-G7bvvyNHnOX7Z6PBFhD1RtXdI5tUl75Ps-9_XySqwlv4q2UThP1Z2rGthG0de8AWYTi_UXHZ_keKcSUR-KZECc9lwxt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