[cfe-dev] CUDA math library cannot be found error

C Bergström via cfe-dev cfe-dev at lists.llvm.org
Tue May 10 04:18:39 PDT 2016


I have never used clang to compile what you're trying, but in general
please ensure that your nvcc and friends are installed in your path
and the driver is loaded.

Typically it's recommended to run 'nvidia−smi' to see if stuff is
working correctly.

If that is - then a wild and probably wrong guess is to try -Wl,-rpath
and -Wl,-L where the libdevice is located




On Tue, May 10, 2016 at 7:03 PM, Biesbroeck, J.P.A. via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
> While trying to compile my code, I got the following error:
>
>
>
> clang -fopenmp -omptargets=nvptx64sm_35-nvidia-linux -g -O3 -std=c99
> Source.c -o source -L /home/rjordans/openmp4/lib -lm
>
> clang-3.8: error: CUDA math library (libdevice) is required and cannot be
> found.
>
>
>
> How can I solve this error?
>
>
>
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>



More information about the cfe-dev mailing list