`__string` is not a directory

I started seeing this message when building/installing the latest main:

CMake Error at /w/bld/llvm/org/runtimes/runtimes-bins/libcxx/include/cmake_install.cmake:1778 (file):
  file INSTALL destination: /w/c/org/include/c++/v1/__string is not a
  directory.
Call Stack (most recent call first):
  /w/bld/llvm/org/runtimes/runtimes-bins/libcxx/cmake_install.cmake:47 (include)
  /w/bld/llvm/org/runtimes/runtimes-bins/cmake_install.cmake:49 (include)

Just did a fresh build, same result. What am I doing wrong?

With “fresh build” I guess you mean you did ninja clear && ninja or the equivalent for your build tool? If that’s the case you have to remove include/c++/v1/__string from your build directory. __string is a directory now and not a file anymore.

Actually, here’s what I did:

rm -rf *
cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/w/c/org -DLLVM_ENABLE_ASSERTIONS:BOOL=ON -DLLVM_ENABLE_EXPENSIVE_CHECKS:BOOL=OFF -DLLVM_LIT_ARGS:STRING="-s -v" -DLLVM_ENABLE_LIBCXX:BOOL=ON -DLLVM_ENABLE_PROJECTS='bolt;clang;clang-tools-extra;compiler-rt;flang;;lld;lldb;llvm;mlir;openmp;polly;pstl' -DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi;libunwind' -DCMAKE_C_COMPILER=/w/c/clang+llvm-14.0.3-x86_64-linux-gnu-ubuntu-20.04/bin/clang -DCMAKE_CXX_COMPILER=/w/c/clang+llvm-14.0.3-x86_64-linux-gnu-ubuntu-20.04/bin/clang++ -DCMAKE_BUILD_WITH_INSTALL_RPATH=1 '-DCMAKE_INSTALL_RPATH:STRING=$ORIGIN/../lib:/w/c/clang+llvm-14.0.3-x86_64-linux-gnu-ubuntu-20.04/lib' -DLLVM_OMIT_DAGISEL_COMMENTS=OFF /w/src/llvm.org/llvm
make -j16 all install

Have you cleaned your install directory?

1 Like

No. That was it. Thanks!