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

    <tr>
        <th>Summary</th>
        <td>
            Copying CXX header __string/char_traits.h FAILED (Compiling LLVM)
        </td>
    </tr>

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

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

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

<pre>
    I have done a git pull on my current llvm-project clone and to configure it for installation I did this command:

`cmake -S llvm -B build -G Ninja -DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra;cross-project-tests;flang;libc;libclc;lld;lldb;openmp;polly' -DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi;compiler-rt;' -DLLVM_BUILD_DOCS=OFF -DLLVM_ENABLE_BINDINGS=OFF -DLIBCXX_CXX_ABI=libcxxabi`

However upon compiling I get the following warnings and error

```cmake
CMake Warning at /home/arshia/Desktop/llvm-project/compiler-rt/cmake/Modules/CompilerRTUtils.cmake:353 (message):
  llvm-config finding testingsupport failed with status 1
Call Stack (most recent call first):
  /home/arshia/Desktop/llvm-project/compiler-rt/CMakeLists.txt:71 (load_llvm_config)


-- LLVM_MAIN_SRC_DIR: "/home/arshia/Desktop/llvm-project/runtimes/../llvm"
-- Compiler-RT supported architectures: x86_64;i386
-- Supported architectures for crt: i386;x86_64
CMake Warning (dev) at /usr/share/cmake/Modules/ExternalProject.cmake:2148 (message):
  Policy CMP0114 is not set: ExternalProject step targets fully adopt their
  steps.  Run "cmake --help-policy CMP0114" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  ExternalProject target 'libcxx_msan_x86_64' would depend on the targets for
  step(s) 'clean' under policy CMP0114, but this is being left out for
  compatibility since the policy is not set.
Call Stack (most recent call first):
  /home/arshia/Desktop/llvm-project/compiler-rt/cmake/Modules/AddCompilerRT.cmake:721 (ExternalProject_Add_StepTargets)
  /home/arshia/Desktop/llvm-project/compiler-rt/lib/msan/tests/CMakeLists.txt:140 (add_custom_libcxx)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake/Modules/ExternalProject.cmake:2148 (message):
  Policy CMP0114 is not set: ExternalProject step targets fully adopt their
  steps.  Run "cmake --help-policy CMP0114" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  ExternalProject target 'libcxx_tsan_x86_64' would depend on the targets for
  step(s) 'clean' under policy CMP0114, but this is being left out for
  compatibility since the policy is not set.
Call Stack (most recent call first):
  /home/arshia/Desktop/llvm-project/compiler-rt/cmake/Modules/AddCompilerRT.cmake:721 (ExternalProject_Add_StepTargets)
  /home/arshia/Desktop/llvm-project/compiler-rt/lib/tsan/CMakeLists.txt:35 (add_custom_libcxx)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake/Modules/ExternalProject.cmake:2148 (message):
  Policy CMP0114 is not set: ExternalProject step targets fully adopt their
  steps.  Run "cmake --help-policy CMP0114" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  ExternalProject target 'libcxx_fuzzer_i386' would depend on the targets for
  step(s) 'clean' under policy CMP0114, but this is being left out for
  compatibility since the policy is not set.
Call Stack (most recent call first):
  /home/arshia/Desktop/llvm-project/compiler-rt/cmake/Modules/AddCompilerRT.cmake:721 (ExternalProject_Add_StepTargets)
  /home/arshia/Desktop/llvm-project/compiler-rt/lib/fuzzer/CMakeLists.txt:161 (add_custom_libcxx)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake/Modules/ExternalProject.cmake:2148 (message):
  Policy CMP0114 is not set: ExternalProject step targets fully adopt their
  steps.  Run "cmake --help-policy CMP0114" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  ExternalProject target 'libcxx_fuzzer_x86_64' would depend on the targets
  for step(s) 'clean' under policy CMP0114, but this is being left out for
  compatibility since the policy is not set.
Call Stack (most recent call first):
  /home/arshia/Desktop/llvm-project/compiler-rt/cmake/Modules/AddCompilerRT.cmake:721 (ExternalProject_Add_StepTargets)
  /home/arshia/Desktop/llvm-project/compiler-rt/lib/fuzzer/CMakeLists.txt:161 (add_custom_libcxx)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generated Sanitizer SUPPORTED_TOOLS list on "Linux" is "asan;lsan;msan;tsan;ubsan"
-- sanitizer_common tests on "Linux" will run against "asan;lsan;msan;tsan;ubsan"
-- Supported architectures for crt: i386;x86_64
-- check-shadowcallstack does nothing.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/arshia/Desktop/llvm-project/build/runtimes/runtimes-bins
[54/73] Performing build step for 'runtimes'
[5/1565] Copying CXX header __string/char_traits.h
FAILED: /home/arshia/Desktop/llvm-project/build/include/c++/v1/__string/char_traits.h
cd /home/arshia/Desktop/llvm-project/build/runtimes/runtimes-bins/libcxx/include && /usr/bin/cmake -E copy_if_different /home/arshia/Desktop/llvm-project/libcxx/include/__string/char_traits.h /home/arshia/Desktop/llvm-project/build/include/c++/v1/__string/char_traits.h
Error copying file (if different) from "/home/arshia/Desktop/llvm-project/libcxx/include/__string/char_traits.h" to "/home/arshia/Desktop/llvm-project/build/include/c++/v1/__string/char_traits.h".
[6/1565] Copying CXX header __string/extern_template_lists.h
FAILED: /home/arshia/Desktop/llvm-project/build/include/c++/v1/__string/extern_template_lists.h
cd /home/arshia/Desktop/llvm-project/build/runtimes/runtimes-bins/libcxx/include && /usr/bin/cmake -E copy_if_different /home/arshia/Desktop/llvm-project/libcxx/include/__string/extern_template_lists.h /home/arshia/Desktop/llvm-project/build/include/c++/v1/__string/extern_template_lists.h
Error copying file (if different) from "/home/arshia/Desktop/llvm-project/libcxx/include/__string/extern_template_lists.h" to "/home/arshia/Desktop/llvm-project/build/include/c++/v1/__string/extern_template_lists.h".
[14/1565] Copying CXX header __type_traits/aligned_storage.h
ninja: build stopped: subcommand failed.
FAILED: runtimes/runtimes-stamps/runtimes-build /home/arshia/Desktop/llvm-project/build/runtimes/runtimes-stamps/runtimes-build
cd /home/arshia/Desktop/llvm-project/build/runtimes/runtimes-bins && /usr/bin/cmake --build .
[58/73] Building CXX object third-party/benchmark/src/CMakeFiles/benchmark.dir/benchmark_register.cc.o
ninja: build stopped: subcommand failed.
```

My os is Arch-Linux and my current clang compiling this is 15.0.0

Exact details:
```c++
➜  ~ clang --version
clang version 15.0.0 (https://github.com/llvm/llvm-project.git f6112f490cfeed05b42ae33cc994292000aee0da)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztWVtzo7gS_jX2iwrKgK8PfvB1jk_lVnGyO2-UAGFrIxAlicSeX7_dAmzHk6Qm2d3Zs2dT5SAipO5W9_e1bpFM9uMV2dJHRhKZM0LJhhtSlEIQmZNsT-JSKZYbIsRj5hRK_sZiQ2Jh2-YJMZLEMk_5plSMQM9UKsJzbagQ1HAQsSIJh2ZbrqFhlkGfVjBpdeatTvPsd-KMPjDirK0S4kxJVHKREOcLueL5b5Q484uLXy7DxdVkerEIb26v_7uY3a1bwbzlD2JB800rmNrSMVIK7bCdURTrlNS6MdoxTBsNtWndQ_AorgthX0RSPSMoZMHyrICXQgqxBz1nRtzeX92tLhe1EShjt6uF7XY04qhdZgUXTDnKwH8nIqb3q4t5OL-eYe_r5fJM9HR1NV9dfTn5uJrOvn4N8W8yXUH1UUu_c-rK_8gn9sgUKQtwfKWe5xsIwYYZCAGD6Aghn7DuiaocSm2DyJSS6iwm1c9GpqqbXWKQfq36EWpIy19uZcagoEpvOYWXOdMPRhbwdgoX-PfUF_CfleovL2VSCqbhbVZ_v727N1xot2oRTIJeAHqGGdOabqDL6AAeUiGyAh9JeZ6gWRhjHFZZFFIBGikITcgTN1sCmDSlJl49GgAoWRsaP1j5UhuiWIxAj_FLypU2z9V9fLjWcxcc0OeaHWBhMvBQqZA0CbFjWA0C1Z3GwD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