Open Quuxplusone opened 7 years ago
Attached error.txt
(4591 bytes, text/plain): Verbose error
As I recall, the problem is that, when compiling for the target (nvptx64),
we're not defining the host-associated preprocessor macros (e.g. __X86_64__ or
__powerpc64__). As a result, when we end up in code like this:
$ cat /usr/include/bits/wordsize.h
/* Determine the wordsize from the preprocessor defines. */
#if defined __x86_64__ && !defined __ILP32__
# define __WORDSIZE 64
#else
# define __WORDSIZE 32
#endif
we end up setting __WORDSIZE == 32 and, thus, trying to include 32-bit headers
(which are often not installed).
I suspect that the real answer here is to make sure that we pick up the CUDA
stdio.h, etc. when compiling for a nvptx target target (or something along
those lines). Alternatively, we could also define the host architecture macros
when compiling for the target.
Hi Hal,
To my understanding the error will go away once the outstanding OpenMP offload driver patches land. There are currently 10 accepted patches and 3 that have yet to be accepted.
Thanks,
--Doru
Some of the patches have landed. Can you please retry if you still see the error? Also if you are compiling for 32bit host, the correct triple is nvptx-nvidia-cuda, not nvptx64-nvidia-cuda (see https://llvm.org/docs/NVPTXUsage.html)
error.txt
(4591 bytes, text/plain)