<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 - Fails to compile documentation example on MacOSX"
   href="https://bugs.llvm.org/show_bug.cgi?id=35692">35692</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Fails to compile documentation example on MacOSX
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>CUDA
          </td>
        </tr>

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

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

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I've installed MacOSX high sierra, updated xcode, installed latest cuda (CUDA
9.1), and when trying to compile the documentation example in:
<a href="https://llvm.org/docs/CompileCudaWithLLVM.html#invoking-clang">https://llvm.org/docs/CompileCudaWithLLVM.html#invoking-clang</a>

like this:

clang++ axpy.cu -o axpy --cuda-gpu-arch=sm_35 -L/usr/local/cuda/lib -lcudart
-ldl -lrt -pthread

it fails to compile with the following error: 

clang-6.0: error: cannot find libdevice for sm_35. Provide path to different
CUDA installation via --cuda-path, or pass -nocudalib to build without linking
with libdevice.


I've tried passing clang --cuda-path=/usr/local/cuda/ and also
--cuda-path=/Developer/NVIDIA/CUDA-9.1/ without any luck.

The paths in /usr/local/cuda all link to /Developer/NVIDIA/CUDA-9.1/.</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>