<div dir="ltr"><div><br>I hope I am posting this question in the right place.<br><br>Knowing that rvv intrinsics support is pushed to LVV upstream. I am eager to try it out.</div><div>But it seems I could not get libc set up correctly.</div><div><br>If I configured LLVM compilation with:<br>cmake -G "Unix Makefiles" -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi"  -DCMAKE_BUILD_TYPE="Release" -DLLVM_BUILD_TESTS=False  -DLLVM_TARGETS_TO_BUILD="RISCV" -DCMAKE_INSTALL_PREFIX=$RISCV   ../llvm && make -j16<br>I got compilation errors as attached at the end of this email.<br><br>The compilation would succeed if I omit libcxx libcxxabi from LLVM_ENABLE_PROJECTS. But it seems clang would not find assert.h:<br>clang -static --target=riscv32 -menable-experimental-extensions -march=rv32imv0p10 -mabi=ilp32 -g -O2 -Wall -fPIC -I../../include -std=c11   -c -o ../../sep/test.o ../../sep/test.c<br>../../sep/test.c:4:10: fatal error: 'stdio.h' file not found<br>#include <stdio.h><br>         ^~~~~~~~~<br><br><br>Attached compilation error for libcxx:<br><br>In file included from $HOME/riscv/llvm-project/build/include/c++/v1/exception:84:0,<br>         from $HOME/riscv/llvm-project/libcxxabi/src/cxa_default_handlers.cpp:11:<br>$HOME/riscv/llvm-project/build/include/c++/v1/type_traits: In substitution of ‘template<class ... _Args> using _SecondType = typename std::__1::_MetaBase<(sizeof... (_Args) >= 2)>::_SecondImpl<_Args ...> [with _Args = {_Tp ..., _Dep}]’:<br>$HOME/riscv/llvm-project/build/include/c++/v1/tuple:1000:51: required from here<br>$HOME/riscv/llvm-project/build/include/c++/v1/type_traits:501:117: error: pack expansion argument for non-pack parameter ‘<template-parameter-1-1>’ of alias template ‘template<class, class _Second, class ...> using _SecondImpl = _Second’<br> using _SecondType _LIBCPP_NODEBUG_TYPE = typename _MetaBase<(sizeof...(_Args) >= 2)>::template _SecondImpl<_Args...>;<br>                                                           ^<br>In file included from $HOME/riscv/llvm-project/build/include/c++/v1/exception:84:0,<br>         from $HOME/riscv/llvm-project/libcxxabi/src/cxa_default_handlers.cpp:11:<br>$HOME/riscv/llvm-project/build/include/c++/v1/type_traits:473:13: note: declared here<br>  template <class, class _Second, class...><br>       ^<br>In file included from $HOME/riscv/llvm-project/build/include/c++/v1/memory:678:0,<br>         from $HOME/riscv/llvm-project/libcxxabi/src/include/atomic_support.h:17,<br>         from $HOME/riscv/llvm-project/libcxxabi/src/cxa_default_handlers.cpp:18:<br>$HOME/riscv/llvm-project/build/include/c++/v1/tuple:1000:66: error: template argument 1 is invalid<br>       is_assignable<_SecondType<_Tp..., _Dep>&, _Up2 const&><br>                                 ^<br>$HOME/riscv/llvm-project/build/include/c++/v1/tuple:1001:9: error: template argument 4 is invalid<br>     >::value<br>     ^<br>$HOME/riscv/llvm-project/build/include/c++/v1/tuple:1002:9: error: template argument 1 is invalid<br>   ,int> = 0><br>     ^<br>$HOME/riscv/llvm-project/build/include/c++/v1/tuple:1019:59: error: template argument 1 is invalid<br>       is_assignable<_SecondType<_Tp..., _Dep>&, _Up2><br>                              ^<br>$HOME/riscv/llvm-project/build/include/c++/v1/tuple:1020:9: error: template argument 4 is invalid<br>     >::value<br>     ^<br>$HOME/riscv/llvm-project/build/include/c++/v1/tuple:1021:9: error: template argument 1 is invalid<br>   ,int> = 0><br>     ^<br>projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/build.make:95: recipe for target 'projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/cxa_default_handlers.cpp.o' failed<br>make[2]: *** [projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/cxa_default_handlers.cpp.o] Error 1<br>CMakeFiles/Makefile2:19706: recipe for target 'projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/all' failed<br>make[1]: *** [projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/all] Error 2<br></div></div>