llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
26.77k stars 10.97k forks source link

Problems building libc++ with clang for memory sanitizer #97281

Open Desperado17 opened 4 days ago

Desperado17 commented 4 days ago

I try to build an instrumented libc++ to avoid false positives with memorysanitizer according to this manual: https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo

Clang 14, Ubuntu 22.04, x64

After some modifications I came up with an updated command but it yielded errors:

cmake -G Ninja -S runtimes -B msan_out  \
    -DCMAKE_BUILD_TYPE=Release \
    -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
    -DCMAKE_C_COMPILER=clang \
    -DCMAKE_CXX_COMPILER=clang++ \
    -DLLVM_USE_SANITIZER=MemoryWithOrigins

ninja -C msan_out cxx cxxabi

ninja -C msan_out cxx cxxabi
ninja: Entering directory `msan_out'
[1035/1191] Building CXX object libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_aux_runtime.cpp.o
FAILED: libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_aux_runtime.cpp.o 
/usr/bin/clang++ -DHAVE___CXA_THREAD_ATEXIT_IMPL -DLIBCXX_BUILDING_LIBCXXABI -D_LIBCPP_BUILDING_LIBRARY -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCXXABI_BUILDING_LIBRARY -D_LIBCXXABI_LINK_PTHREAD_LIB -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/user/instrumentedlibcpp/llvm-project/libunwind/include -I/home/user/instrumentedlibcpp/llvm-project/libcxxabi/../libcxx/src -I/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1 -I/home/user/instrumentedlibcpp/llvm-project/libcxxabi/include -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 -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -gline-tables-only -fsanitize=memory -fsanitize-memory-track-origins -fdiagnostics-color -ffunction-sections -fdata-sections  -O3 -DNDEBUG -std=c++2b -fPIC -nostdinc++ -fstrict-aliasing -funwind-tables -D_DEBUG -UNDEBUG -Wall -Wextra -Wnewline-eof -Wshadow -Wwrite-strings -Wno-unused-parameter -Wno-long-long -Werror=return-type -Wextra-semi -Wundef -Wunused-template -Wformat-nonliteral -Wno-user-defined-literals -Wno-covered-switch-default -Wno-suggest-override -Wno-error -MD -MT libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_aux_runtime.cpp.o -MF libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_aux_runtime.cpp.o.d -o libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_aux_runtime.cpp.o -c /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_aux_runtime.cpp
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_aux_runtime.cpp:12:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cxxabi.h:17:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/stddef.h:27:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:14:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__configuration/abi.h:14:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__configuration/compiler.h:37:8: warning: "Libc++ only supports Clang 17 and later" [-W#warnings]
#      warning "Libc++ only supports Clang 17 and later"
       ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_aux_runtime.cpp:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:37:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__type_traits/enable_if.h:18:1: error: expected identifier or '{'
_LIBCPP_BEGIN_NAMESPACE_STD
^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:616:81: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                                      namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std {                                  \
                                                                                ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_aux_runtime.cpp:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:37:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__type_traits/enable_if.h:18:1: error: C++ requires a type specifier for all declarations
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:616:81: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                                      namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std {                                  \
                                                                                ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_aux_runtime.cpp:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:37:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__type_traits/enable_if.h:18:1: error: expected expression
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:617:32: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                               inline namespace _LIBCPP_ABI_NAMESPACE {
                               ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_aux_runtime.cpp:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:38:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__type_traits/integral_constant.h:18:1: error: expected ';' after top level declarator
_LIBCPP_BEGIN_NAMESPACE_STD
^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:616:39: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                                      namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std {                                  \
                                      ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_aux_runtime.cpp:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:56:1: error: expected identifier or '{'
_LIBCPP_BEGIN_NAMESPACE_STD
^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:616:81: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                                      namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std {                                  \
                                                                                ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_aux_runtime.cpp:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:56:1: error: C++ requires a type specifier for all declarations
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:616:81: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                                      namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std {                                  \
                                                                                ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_aux_runtime.cpp:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:56:1: error: expected expression
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:617:32: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                               inline namespace _LIBCPP_ABI_NAMESPACE {
                               ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_aux_runtime.cpp:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:69:1: error: expected ';' after top level declarator
namespace std // purposefully not versioned
^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_aux_runtime.cpp:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:21:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__utility/forward.h:15:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__type_traits/remove_reference.h:37:4: error: "remove_reference not implemented!"
#  error "remove_reference not implemented!"
   ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_aux_runtime.cpp:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:23:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:207:67: error: no type named 'size_t' in namespace 'std'; did you mean simply 'size_t'?
_LIBCPP_NODISCARD _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT
                                                                  ^~~~~~~~~~~
                                                                  size_t
/usr/lib/llvm-14/lib/clang/14.0.0/include/stddef.h:46:23: note: 'size_t' declared here
typedef __SIZE_TYPE__ size_t;
                      ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_aux_runtime.cpp:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:23:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:207:96: error: no type named 'nothrow_t' in namespace 'std'
_LIBCPP_NODISCARD _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT
                                                                                          ~~~~~^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:210:73: error: no type named 'nothrow_t' in namespace 'std'
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, const std::nothrow_t&) _NOEXCEPT;
                                                                   ~~~~~^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:212:62: error: no type named 'size_t' in namespace 'std'; did you mean simply 'size_t'?
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::size_t __sz) _NOEXCEPT;
                                                             ^~~~~~~~~~~
                                                             size_t
/usr/lib/llvm-14/lib/clang/14.0.0/include/stddef.h:46:23: note: 'size_t' declared here
typedef __SIZE_TYPE__ size_t;
                      ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_aux_runtime.cpp:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:23:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:215:69: error: no type named 'size_t' in namespace 'std'; did you mean simply 'size_t'?
_LIBCPP_NODISCARD _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz) _THROW_BAD_ALLOC;
                                                                    ^~~~~~~~~~~
                                                                    size_t
/usr/lib/llvm-14/lib/clang/14.0.0/include/stddef.h:46:23: note: 'size_t' declared here
typedef __SIZE_TYPE__ size_t;
                      ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_aux_runtime.cpp:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:23:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:216:69: error: no type named 'size_t' in namespace 'std'; did you mean simply 'size_t'?
_LIBCPP_NODISCARD _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, const std::nothrow_t&) _NOEXCEPT
                                                                    ^~~~~~~~~~~
                                                                    size_t
/usr/lib/llvm-14/lib/clang/14.0.0/include/stddef.h:46:23: note: 'size_t' declared here
typedef __SIZE_TYPE__ size_t;
                      ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_aux_runtime.cpp:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:23:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:216:98: error: no type named 'nothrow_t' in namespace 'std'
_LIBCPP_NODISCARD _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, const std::nothrow_t&) _NOEXCEPT
                                                                                            ~~~~~^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:219:75: error: no type named 'nothrow_t' in namespace 'std'
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, const std::nothrow_t&) _NOEXCEPT;
                                                                     ~~~~~^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:221:64: error: no type named 'size_t' in namespace 'std'; did you mean simply 'size_t'?
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::size_t __sz) _NOEXCEPT;
                                                               ^~~~~~~~~~~
                                                               size_t
/usr/lib/llvm-14/lib/clang/14.0.0/include/stddef.h:46:23: note: 'size_t' declared here
typedef __SIZE_TYPE__ size_t;
                      ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_aux_runtime.cpp:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:23:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:225:67: error: no type named 'size_t' in namespace 'std'; did you mean simply 'size_t'?
_LIBCPP_NODISCARD _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC;
                                                                  ^~~~~~~~~~~
                                                                  size_t
/usr/lib/llvm-14/lib/clang/14.0.0/include/stddef.h:46:23: note: 'size_t' declared here
typedef __SIZE_TYPE__ size_t;
                      ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
[1036/1191] Building CXX object libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_vector.cpp.o
FAILED: libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_vector.cpp.o 
/usr/bin/clang++ -DHAVE___CXA_THREAD_ATEXIT_IMPL -DLIBCXX_BUILDING_LIBCXXABI -D_LIBCPP_BUILDING_LIBRARY -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCXXABI_BUILDING_LIBRARY -D_LIBCXXABI_LINK_PTHREAD_LIB -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/user/instrumentedlibcpp/llvm-project/libunwind/include -I/home/user/instrumentedlibcpp/llvm-project/libcxxabi/../libcxx/src -I/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1 -I/home/user/instrumentedlibcpp/llvm-project/libcxxabi/include -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 -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -gline-tables-only -fsanitize=memory -fsanitize-memory-track-origins -fdiagnostics-color -ffunction-sections -fdata-sections  -O3 -DNDEBUG -std=c++2b -fPIC -nostdinc++ -fstrict-aliasing -funwind-tables -D_DEBUG -UNDEBUG -Wall -Wextra -Wnewline-eof -Wshadow -Wwrite-strings -Wno-unused-parameter -Wno-long-long -Werror=return-type -Wextra-semi -Wundef -Wunused-template -Wformat-nonliteral -Wno-user-defined-literals -Wno-covered-switch-default -Wno-suggest-override -Wno-error -MD -MT libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_vector.cpp.o -MF libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_vector.cpp.o.d -o libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_vector.cpp.o -c /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_vector.cpp
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_vector.cpp:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cxxabi.h:17:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/stddef.h:27:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:14:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__configuration/abi.h:14:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__configuration/compiler.h:37:8: warning: "Libc++ only supports Clang 17 and later" [-W#warnings]
#      warning "Libc++ only supports Clang 17 and later"
       ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_vector.cpp:16:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:37:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__type_traits/enable_if.h:18:1: error: expected identifier or '{'
_LIBCPP_BEGIN_NAMESPACE_STD
^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:616:81: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                                      namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std {                                  \
                                                                                ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_vector.cpp:16:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:37:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__type_traits/enable_if.h:18:1: error: C++ requires a type specifier for all declarations
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:616:81: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                                      namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std {                                  \
                                                                                ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_vector.cpp:16:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:37:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__type_traits/enable_if.h:18:1: error: expected expression
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:617:32: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                               inline namespace _LIBCPP_ABI_NAMESPACE {
                               ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_vector.cpp:16:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:38:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__type_traits/integral_constant.h:18:1: error: expected ';' after top level declarator
_LIBCPP_BEGIN_NAMESPACE_STD
^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:616:39: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                                      namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std {                                  \
                                      ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_vector.cpp:16:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:56:1: error: expected identifier or '{'
_LIBCPP_BEGIN_NAMESPACE_STD
^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:616:81: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                                      namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std {                                  \
                                                                                ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_vector.cpp:16:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:56:1: error: C++ requires a type specifier for all declarations
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:616:81: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                                      namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std {                                  \
                                                                                ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_vector.cpp:16:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:56:1: error: expected expression
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:617:32: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                               inline namespace _LIBCPP_ABI_NAMESPACE {
                               ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_vector.cpp:16:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:69:1: error: expected ';' after top level declarator
namespace std // purposefully not versioned
^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_vector.cpp:16:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:21:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__utility/forward.h:15:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__type_traits/remove_reference.h:37:4: error: "remove_reference not implemented!"
#  error "remove_reference not implemented!"
   ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_vector.cpp:16:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:23:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:207:67: error: no type named 'size_t' in namespace 'std'; did you mean simply 'size_t'?
_LIBCPP_NODISCARD _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT
                                                                  ^~~~~~~~~~~
                                                                  size_t
/usr/lib/llvm-14/lib/clang/14.0.0/include/stddef.h:46:23: note: 'size_t' declared here
typedef __SIZE_TYPE__ size_t;
                      ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_vector.cpp:16:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:23:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:207:96: error: no type named 'nothrow_t' in namespace 'std'
_LIBCPP_NODISCARD _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT
                                                                                          ~~~~~^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:210:73: error: no type named 'nothrow_t' in namespace 'std'
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, const std::nothrow_t&) _NOEXCEPT;
                                                                   ~~~~~^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:212:62: error: no type named 'size_t' in namespace 'std'; did you mean simply 'size_t'?
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::size_t __sz) _NOEXCEPT;
                                                             ^~~~~~~~~~~
                                                             size_t
/usr/lib/llvm-14/lib/clang/14.0.0/include/stddef.h:46:23: note: 'size_t' declared here
typedef __SIZE_TYPE__ size_t;
                      ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_vector.cpp:16:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:23:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:215:69: error: no type named 'size_t' in namespace 'std'; did you mean simply 'size_t'?
_LIBCPP_NODISCARD _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz) _THROW_BAD_ALLOC;
                                                                    ^~~~~~~~~~~
                                                                    size_t
/usr/lib/llvm-14/lib/clang/14.0.0/include/stddef.h:46:23: note: 'size_t' declared here
typedef __SIZE_TYPE__ size_t;
                      ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_vector.cpp:16:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:23:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:216:69: error: no type named 'size_t' in namespace 'std'; did you mean simply 'size_t'?
_LIBCPP_NODISCARD _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, const std::nothrow_t&) _NOEXCEPT
                                                                    ^~~~~~~~~~~
                                                                    size_t
/usr/lib/llvm-14/lib/clang/14.0.0/include/stddef.h:46:23: note: 'size_t' declared here
typedef __SIZE_TYPE__ size_t;
                      ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_vector.cpp:16:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:23:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:216:98: error: no type named 'nothrow_t' in namespace 'std'
_LIBCPP_NODISCARD _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, const std::nothrow_t&) _NOEXCEPT
                                                                                            ~~~~~^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:219:75: error: no type named 'nothrow_t' in namespace 'std'
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, const std::nothrow_t&) _NOEXCEPT;
                                                                     ~~~~~^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:221:64: error: no type named 'size_t' in namespace 'std'; did you mean simply 'size_t'?
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::size_t __sz) _NOEXCEPT;
                                                               ^~~~~~~~~~~
                                                               size_t
/usr/lib/llvm-14/lib/clang/14.0.0/include/stddef.h:46:23: note: 'size_t' declared here
typedef __SIZE_TYPE__ size_t;
                      ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_vector.cpp:16:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:23:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:225:67: error: no type named 'size_t' in namespace 'std'; did you mean simply 'size_t'?
_LIBCPP_NODISCARD _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC;
                                                                  ^~~~~~~~~~~
                                                                  size_t
/usr/lib/llvm-14/lib/clang/14.0.0/include/stddef.h:46:23: note: 'size_t' declared here
typedef __SIZE_TYPE__ size_t;
                      ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
[1037/1191] Building CXX object libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_default_handlers.cpp.o
FAILED: libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_default_handlers.cpp.o 
/usr/bin/clang++ -DHAVE___CXA_THREAD_ATEXIT_IMPL -DLIBCXX_BUILDING_LIBCXXABI -D_LIBCPP_BUILDING_LIBRARY -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCXXABI_BUILDING_LIBRARY -D_LIBCXXABI_LINK_PTHREAD_LIB -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/user/instrumentedlibcpp/llvm-project/libunwind/include -I/home/user/instrumentedlibcpp/llvm-project/libcxxabi/../libcxx/src -I/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1 -I/home/user/instrumentedlibcpp/llvm-project/libcxxabi/include -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 -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -gline-tables-only -fsanitize=memory -fsanitize-memory-track-origins -fdiagnostics-color -ffunction-sections -fdata-sections  -O3 -DNDEBUG -std=c++2b -fPIC -nostdinc++ -fstrict-aliasing -funwind-tables -D_DEBUG -UNDEBUG -Wall -Wextra -Wnewline-eof -Wshadow -Wwrite-strings -Wno-unused-parameter -Wno-long-long -Werror=return-type -Wextra-semi -Wundef -Wunused-template -Wformat-nonliteral -Wno-user-defined-literals -Wno-covered-switch-default -Wno-suggest-override -Wno-error -MD -MT libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_default_handlers.cpp.o -MF libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_default_handlers.cpp.o.d -o libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_default_handlers.cpp.o -c /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_default_handlers.cpp
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_default_handlers.cpp:12:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:79:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:14:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__configuration/abi.h:14:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__configuration/compiler.h:37:8: warning: "Libc++ only supports Clang 17 and later" [-W#warnings]
#      warning "Libc++ only supports Clang 17 and later"
       ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_default_handlers.cpp:12:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:37:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__type_traits/enable_if.h:18:1: error: expected identifier or '{'
_LIBCPP_BEGIN_NAMESPACE_STD
^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:616:81: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                                      namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std {                                  \
                                                                                ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_default_handlers.cpp:12:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:37:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__type_traits/enable_if.h:18:1: error: C++ requires a type specifier for all declarations
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:616:81: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                                      namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std {                                  \
                                                                                ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_default_handlers.cpp:12:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:37:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__type_traits/enable_if.h:18:1: error: expected expression
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:617:32: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                               inline namespace _LIBCPP_ABI_NAMESPACE {
                               ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_default_handlers.cpp:12:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:38:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__type_traits/integral_constant.h:18:1: error: expected ';' after top level declarator
_LIBCPP_BEGIN_NAMESPACE_STD
^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:616:39: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                                      namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std {                                  \
                                      ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_default_handlers.cpp:12:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:56:1: error: expected identifier or '{'
_LIBCPP_BEGIN_NAMESPACE_STD
^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:616:81: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                                      namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std {                                  \
                                                                                ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_default_handlers.cpp:12:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:56:1: error: C++ requires a type specifier for all declarations
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:616:81: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                                      namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std {                                  \
                                                                                ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_default_handlers.cpp:12:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:56:1: error: expected expression
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:617:32: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                               inline namespace _LIBCPP_ABI_NAMESPACE {
                               ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_default_handlers.cpp:12:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:69:1: error: expected ';' after top level declarator
namespace std // purposefully not versioned
^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_default_handlers.cpp:12:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:21:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__utility/forward.h:15:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__type_traits/remove_reference.h:37:4: error: "remove_reference not implemented!"
#  error "remove_reference not implemented!"
   ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_default_handlers.cpp:12:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:23:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:207:67: error: no type named 'size_t' in namespace 'std'; did you mean simply 'size_t'?
_LIBCPP_NODISCARD _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT
                                                                  ^~~~~~~~~~~
                                                                  size_t
/usr/lib/llvm-14/lib/clang/14.0.0/include/stddef.h:46:23: note: 'size_t' declared here
typedef __SIZE_TYPE__ size_t;
                      ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_default_handlers.cpp:12:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:23:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:207:96: error: no type named 'nothrow_t' in namespace 'std'
_LIBCPP_NODISCARD _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT
                                                                                          ~~~~~^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:210:73: error: no type named 'nothrow_t' in namespace 'std'
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, const std::nothrow_t&) _NOEXCEPT;
                                                                   ~~~~~^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:212:62: error: no type named 'size_t' in namespace 'std'; did you mean simply 'size_t'?
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::size_t __sz) _NOEXCEPT;
                                                             ^~~~~~~~~~~
                                                             size_t
/usr/lib/llvm-14/lib/clang/14.0.0/include/stddef.h:46:23: note: 'size_t' declared here
typedef __SIZE_TYPE__ size_t;
                      ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_default_handlers.cpp:12:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:23:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:215:69: error: no type named 'size_t' in namespace 'std'; did you mean simply 'size_t'?
_LIBCPP_NODISCARD _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz) _THROW_BAD_ALLOC;
                                                                    ^~~~~~~~~~~
                                                                    size_t
/usr/lib/llvm-14/lib/clang/14.0.0/include/stddef.h:46:23: note: 'size_t' declared here
typedef __SIZE_TYPE__ size_t;
                      ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_default_handlers.cpp:12:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:23:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:216:69: error: no type named 'size_t' in namespace 'std'; did you mean simply 'size_t'?
_LIBCPP_NODISCARD _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, const std::nothrow_t&) _NOEXCEPT
                                                                    ^~~~~~~~~~~
                                                                    size_t
/usr/lib/llvm-14/lib/clang/14.0.0/include/stddef.h:46:23: note: 'size_t' declared here
typedef __SIZE_TYPE__ size_t;
                      ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_default_handlers.cpp:12:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:23:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:216:98: error: no type named 'nothrow_t' in namespace 'std'
_LIBCPP_NODISCARD _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, const std::nothrow_t&) _NOEXCEPT
                                                                                            ~~~~~^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:219:75: error: no type named 'nothrow_t' in namespace 'std'
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, const std::nothrow_t&) _NOEXCEPT;
                                                                     ~~~~~^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:221:64: error: no type named 'size_t' in namespace 'std'; did you mean simply 'size_t'?
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::size_t __sz) _NOEXCEPT;
                                                               ^~~~~~~~~~~
                                                               size_t
/usr/lib/llvm-14/lib/clang/14.0.0/include/stddef.h:46:23: note: 'size_t' declared here
typedef __SIZE_TYPE__ size_t;
                      ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_default_handlers.cpp:12:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:15:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:23:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:225:67: error: no type named 'size_t' in namespace 'std'; did you mean simply 'size_t'?
_LIBCPP_NODISCARD _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC;
                                                                  ^~~~~~~~~~~
                                                                  size_t
/usr/lib/llvm-14/lib/clang/14.0.0/include/stddef.h:46:23: note: 'size_t' declared here
typedef __SIZE_TYPE__ size_t;
                      ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
[1038/1191] Building CXX object libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_virtual.cpp.o
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_virtual.cpp:9:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cxxabi.h:17:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/stddef.h:27:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:14:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__configuration/abi.h:14:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__configuration/compiler.h:37:8: warning: "Libc++ only supports Clang 17 and later" [-W#warnings]
#      warning "Libc++ only supports Clang 17 and later"
       ^
1 warning generated.
[1039/1191] Building CXX object libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_exception_storage.cpp.o
FAILED: libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_exception_storage.cpp.o 
/usr/bin/clang++ -DHAVE___CXA_THREAD_ATEXIT_IMPL -DLIBCXX_BUILDING_LIBCXXABI -D_LIBCPP_BUILDING_LIBRARY -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCXXABI_BUILDING_LIBRARY -D_LIBCXXABI_LINK_PTHREAD_LIB -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/user/instrumentedlibcpp/llvm-project/libunwind/include -I/home/user/instrumentedlibcpp/llvm-project/libcxxabi/../libcxx/src -I/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1 -I/home/user/instrumentedlibcpp/llvm-project/libcxxabi/include -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 -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -gline-tables-only -fsanitize=memory -fsanitize-memory-track-origins -fdiagnostics-color -ffunction-sections -fdata-sections  -O3 -DNDEBUG -std=c++2b -fPIC -nostdinc++ -fstrict-aliasing -funwind-tables -D_DEBUG -UNDEBUG -Wall -Wextra -Wnewline-eof -Wshadow -Wwrite-strings -Wno-unused-parameter -Wno-long-long -Werror=return-type -Wextra-semi -Wundef -Wunused-template -Wformat-nonliteral -Wno-user-defined-literals -Wno-covered-switch-default -Wno-suggest-override -Wno-error -MD -MT libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_exception_storage.cpp.o -MF libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_exception_storage.cpp.o.d -o libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_exception_storage.cpp.o -c /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_exception_storage.cpp
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_exception_storage.cpp:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_exception.h:16:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:79:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:14:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__configuration/abi.h:14:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__configuration/compiler.h:37:8: warning: "Libc++ only supports Clang 17 and later" [-W#warnings]
#      warning "Libc++ only supports Clang 17 and later"
       ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_exception_storage.cpp:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_exception.h:16:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/exception:81:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/exception_ptr.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__exception/operations.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/cstddef:37:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__type_traits/enable_if.h:18:1: error: expected identifier or '{'
_LIBCPP_BEGIN_NAMESPACE_STD
^
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__config:616:81: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                                      namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std {                                  \
                                                                                ^

< shortened due to filesize >
                      ^
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/cxa_demangle.cpp:17:
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h:20:
In file included from /home/user/instrumentedlibcpp/llvm-project/libcxxabi/src/demangle/StringViewExtras.h:20:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/string_view:225:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__string/char_traits.h:13:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__algorithm/find.h:23:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__string/constexpr_c_functions.h:14:
In file included from /home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/__memory/construct_at.h:23:
/home/user/instrumentedlibcpp/llvm-project/msan_out/include/c++/v1/new:225:67: error: no type named 'size_t' in namespace 'std'; did you mean simply 'size_t'?
_LIBCPP_NODISCARD _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC;
                                                                  ^~~~~~~~~~~
                                                                  size_t
/usr/lib/llvm-14/lib/clang/14.0.0/include/stddef.h:46:23: note: 'size_t' declared here
typedef __SIZE_TYPE__ size_t;
                      ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
[1044/1191] Building CXX object libunwind/src/CMakeFiles/unwind_shared_objects.dir/libunwind.cpp.o
ninja: build stopped: subcommand failed.

Any ideas what I can do? Regards!

philnik777 commented 4 days ago

How about you don't ignore warning: "Libc++ only supports Clang 17 and later" [-W#warnings]? Did you just miss it? If that's the case, maybe we should upgrade this to an error or even fatal by default.

Desperado17 commented 4 days ago

Ah I see. Too much output I guess.

Strangely, I have a libc++ for my clang-14 installed on my Ubuntu 22. How could this have been compiled? Even the llvmorg-14.0.0 branch prints this same warning for me with clang 17.

EugeneZelenko commented 3 days ago

Could you please try 18 or main branch?

Desperado17 commented 3 days ago

I just now had success with 17. Is there a reason for going to 18?