[llvm-bugs] [Bug 33043] New: Compiling with -fopenmp-targets=nvptx64-nvida-cuda generates fatal error: 'gnu/stubs-32.h' file not found

via llvm-bugs llvm-bugs at lists.llvm.org
Mon May 15 10:57:15 PDT 2017


            Bug ID: 33043
           Summary: Compiling with -fopenmp-targets=nvptx64-nvida-cuda
                    generates fatal error: 'gnu/stubs-32.h' file not found
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Clang Compiler Support
          Assignee: unassignedclangbugs at nondot.org
          Reporter: sergiop at udel.edu
                CC: llvm-bugs at lists.llvm.org

Created attachment 18444
  --> https://bugs.llvm.org/attachment.cgi?id=18444&action=edit
Verbose error

Dear All,

I'm getting the following error when compiling with triple nvptx64-nvida-cuda.
I'm trying to compile manually one of the test cases in libomptarget

clang -fopenmp -fopenmp-targets=nvptx64-nvida-cuda offloading_success.c

But I'm getting the following compilation error during the compilation of the
ptx code. For some reason the compiler is trying to use the gnu/stubs-32.h
header (it is using the macro __WORDSIZE == 32 rather than 64). I'm attaching
the verbose output of the compiler.

In file included from offloading_success.c:6:
In file included from /usr/include/stdio.h:28:
In file included from /usr/include/features.h:385:
/usr/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-32.h' file not found
# include <gnu/stubs-32.h>
1 error generated.

I tested this in two 64 bit systems, thus I don't understand why It wants to
use a 32 bit header: 
- CentOS release 6.7 x86_64 + Intel(R) Xeon(R) CPU E5-2660 v3 @ 2.60GHz +
NVIDIA Tesla K80 GPU + gcc 6.2.0
- CentOS release 7 + IBM POWER8 + NVIDIA Tesla P100 GPU + gcc/6.2.1-20161129.

I compiled llvm/clang/OpenMP from the master branch. LLVM/clang compiles
correctly and OpenMP compiles with LIBOMPTARGET: Building CUDA offloading

Clang commit: 84f57d869ba15eb9b12abc57014d530647a00e01
LLVM commit: 34ad4ae9219da7d2e14b14d0eefd10515d5ac526
OpenMP commit: 1eb73292d2baee506f5dcd1584fca768c849313b

I used cmake + ninja.

1. LLVM + clang: 
cmake /home/1678/Code/ornl/llvm -G Ninja -DCMAKE_BUILD_TYPE=Release

2. OpenMP as an out-of-the-tree project: 
cmake /home/1678/Code/ornl/llvm-out-of-tree/openmp -G Ninja


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/20170515/661d998e/attachment.html>

More information about the llvm-bugs mailing list