Error when compiling libc++ with ninja

hello i am trying to compile libc++ with ninja it gives me the following error what is the solution please reply respectfully without offending me

/home/test/llvm-project/build/include/c++/v1/__algorithm/move_backward.h:50:104: error: expected unqualified-id before ‘=’ token
   50 |   template <class _InIter, class _OutIter, __enable_if_t<__is_segmented_iterator<_InIter>::value, int> = 0>
      |                                                                                                        ^
/home/test/llvm-project/build/include/c++/v1/__algorithm/move_backward.h:80:32: error: ‘__is_segmented_iterator’ was not declared in this scope
   80 |                               !__is_segmented_iterator<_InIter>::value && __is_segmented_iterator<_OutIter>::value,
      |                                ^~~~~~~~~~~~~~~~~~~~~~~
/home/test/llvm-project/build/include/c++/v1/__algorithm/move_backward.h:80:55: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
   80 |                               !__is_segmented_iterator<_InIter>::value && __is_segmented_iterator<_OutIter>::value,
      |                                                       ^
/home/test/llvm-project/build/include/c++/v1/__algorithm/move_backward.h:79:13: error: parse error in template argument list
   79 |             __enable_if_t<__is_cpp17_random_access_iterator<_InIter>::value &&
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   80 |                               !__is_segmented_iterator<_InIter>::value && __is_segmented_iterator<_OutIter>::value,
      |                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/test/llvm-project/build/include/c++/v1/__algorithm/move_backward.h:80:98: error: expected ‘>’ before ‘<’ token
   80 |                               !__is_segmented_iterator<_InIter>::value && __is_segmented_iterator<_OutIter>::value,
      |                                                                                                  ^
/home/test/llvm-project/build/include/c++/v1/__algorithm/move_backward.h:81:32: error: expected unqualified-id before ‘=’ token
   81 |                           int> = 0>
      |                                ^
ninja: build stopped: subcommand failed.

Welcome to the ROOT forum.

Can you give more details ?

  • on which machine are you working?
  • which command are you executing?

ninja -C build check-cxx check-cxxabi check-unwind
ninja -C build install-cxx install-cxxabi install-unwind
I’m trying to build libc++ in ubuntu but it gives the above error

That does not seem to be ROOT related ?

I tried but it gave the same error again, it didn’t work as root

I mean, this forum is related to the ROOT software, from CERN. The question you are asking seems to be C+±related but not ROOT related. You might ask your question on a C++/libc++ forum. Not here …

well thank you this forum came across but i read a similar topic here that’s why i asked

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.