Public bug reported:

Hi,

clang 3.9+ supports compiling CUDA C++ files (.cu):
  http://llvm.org/docs/CompileCudaWithLLVM.html#prerequisites

I installed the packages
  - clang-3.9
  - nvidia-cuda-toolkit (8.0)

on Ubuntu 16.04 (via the latest docker image: ubuntu:16.04).

My example file is just any .cu file, e.g. this one:
  https://github.com/ax3l/cpp_snippets/blob/master/cuda_mandelbrot/mandelbrot.cu

If I now run
  clang++ main.cu

or
  clang++ --cuda-path=/usr main.cu

I get the error

  clang: error: cannot find CUDA installation.  Provide its path via
--cuda-path, or pass -nocudainc to build without CUDA includes.

This is the same bug as reported upstream in
  https://bugs.llvm.org/show_bug.cgi?id=26966

due to the "scattered install" of CUDA in Debian/Ubuntu.

Is there a way to fix this from the packaging side?

** Affects: clang (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: nvidia-cuda-toolkit (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: clang cuda

** Also affects: nvidia-cuda-toolkit (Ubuntu)
   Importance: Undecided
       Status: New

** Summary changed:

- CUDA Support Failing
+ Clang CUDA Support Failing

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1706326

Title:
  Clang CUDA Support Failing

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/clang/+bug/1706326/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to