https://llvm.org/bugs/show_bug.cgi?id=26631

            Bug ID: 26631
           Summary: CMake atomic check fails, missing include
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: rianqu...@gmail.com
                CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com
    Classification: Unclassified

I am working with a GCC cross compiler (x86_64-elf), and CMake fails the atomic
check because it cannot find the includes for libc++ (as they have not been
installed into the sysroot yet.... chicken / egg problem). 

"fatal error: cstdint: No such file or directory"

If you look at the code that it is trying to compile, you can see that it uses
these includes:

#include <cstdint>
#include <atomic>
std::atomic<uintptr_t> x;
std::atomic<uintmax_t> y;
int main() {
  return x + y;
}

The problem is, the GCC compiler was never given a "-I" for the include folder
that has these. To fix this issue, I have temporarily added the -I to point to
the libcxx repo that I am building with, and it works fine. Once it's done
compiling libcxx, it installs the all of the headers as expected into the
sysroot. 

Seems to me... the CMake script should be patched to add it's own include
folder so that it can find the headers it's attempting to use.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to