[llvm-bugs] [Bug 26631] New: CMake atomic check fails, missing include

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Feb 16 04:37:57 PST 2016


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: unassignedclangbugs at nondot.org
          Reporter: rianquinn at gmail.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160216/22c436d1/attachment-0001.html>


More information about the llvm-bugs mailing list