<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - link error with CUDA9.2"
   href="https://bugs.llvm.org/show_bug.cgi?id=38701">38701</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>link error with CUDA9.2
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>OpenMP
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Clang Compiler Support
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>xw111luoye@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I'm getting a compiler error when building miniQMC with OpenMP offload.
I succeeded in the compilation with CUDA8 but failed with CUDA9.2(V9.2.148). I
got the following compiler error.
In the intermediate step, /tmp/libopenblas-aee48e.cubin was not created
properly. I got a file with a zero size.

$ /home/yeluo/opt/llvm-clang/clang-cuda9/bin/clang++ -v  -fopenmp
-fopenmp-targets=nvptx64-nvidia-cuda -fomit-frame-pointer -fstrict-aliasing
-D__forceinline=inline -Wno-deprecated -Wno-unused-value
-Wno-undefined-var-template -DCHECK_FUNCTION_EXISTS=sgemm_   
CMakeFiles/cmTC_91ce2.dir/CheckFunctionExists.cxx.o  -o cmTC_91ce2
-Wl,-rpath,/opt/OpenBLAS/lib /opt/OpenBLAS/lib/libopenblas.so 
clang version 8.0.0 (<a href="https://github.com/llvm-mirror/clang.git">https://github.com/llvm-mirror/clang.git</a>
1bdec838c54117d9befe6dfcd3336a0ba5de9e0d)
(<a href="https://github.com/llvm-mirror/llvm.git">https://github.com/llvm-mirror/llvm.git</a>
7b5db9830a20edbd0ff0e71e91acb654684f4003)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/yeluo/opt/llvm-clang/clang-cuda9/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.3.0
Candidate multilib: .;@m64
Selected multilib: .;@m64
Found CUDA installation: /usr/local/cuda-9.2, version 9.2
 "/home/yeluo/opt/llvm-clang/clang-cuda9/bin/clang-offload-bundler" -type=o
-targets=host-x86_64-unknown-linux-gnu,openmp-nvptx64-nvidia-cuda
-inputs=CMakeFiles/cmTC_91ce2.dir/CheckFunctionExists.cxx.o
-outputs=/tmp/CheckFunctionExists-d6b422.o,/tmp/CheckFunctionExists-8f7fac.cubin
-unbundle
 "/home/yeluo/opt/llvm-clang/clang-cuda9/bin/clang-offload-bundler" -type=o
-targets=host-x86_64-unknown-linux-gnu,openmp-nvptx64-nvidia-cuda
-inputs=/opt/OpenBLAS/lib/libopenblas.so
-outputs=/tmp/libopenblas-bee4d6.o,/tmp/libopenblas-aee48e.cubin -unbundle
 "/usr/local/cuda-9.2/bin/nvlink" -o /tmp/CheckFunctionExists-fdece6.out -v
-arch sm_61 -L/home/yeluo/opt/llvm-clang/clang-cuda9/lib -L.
-L/home/yeluo/opt/llvm-clang/clang-cuda9/lib -lomptarget-nvptx
/tmp/CheckFunctionExists-8f7fac.cubin /tmp/libopenblas-aee48e.cubin
nvlink fatal   : Could not open input file '/tmp/libopenblas-aee48e.cubin'
 "/usr/bin/ld" -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64
-dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_91ce2
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/crt1.o
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/crti.o
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/crtbegin.o
-L/usr/lib/gcc/x86_64-linux-gnu/7.3.0
-L/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu
-L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu
-L/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../..
-L/home/yeluo/opt/llvm-clang/clang-cuda9/bin/../lib -L/lib -L/usr/lib
/tmp/CheckFunctionExists-d6b422.o -rpath /opt/OpenBLAS/lib
/tmp/libopenblas-bee4d6.o -L/home/yeluo/opt/llvm-clang/clang-cuda9/lib -L.
-lstdc++ -lm -lomp -lomptarget -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/crtend.o
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/crtn.o -T
/tmp/cmTC_91ce2-5bd00f.lk
clang-8: error: nvlink command failed with exit code 1 (use -v to see
invocation)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>