[llvm-dev] problem on compiling cuda program with clang++

Justin Lebar via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 27 11:02:33 PDT 2016


Hi, it looks like you're compiling CUDA for an ARM host?  This is not
a configuration we have tested, nor is it something we have the
capability of testing at the moment.

You may be able to make it work by providing the appropriate -isystem
flags to clang so that it can find your headers, but who knows, it may
be more complicated than that.

Regards,
-Justin

On Wed, Oct 26, 2016 at 9:59 PM, 李阳 via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> Hi all,
>
> I compiled the llvm3.9 source code on the Nvidia TX1 board. And now I am
> following the document in the docs/CompileCudaWithLLVM.rst to compile cuda
> program with clang++.
>
> However, when I compile `axpy.cu` using `nvcc`, nvcc can generate the
> correct the binary;
>
> while compiling `axpy.cu` using clang++, the detailed command is `clang++
> axpy.cu -o axpy --cuda-gpu-arch=sm_53 -L/usr/local/cuda/lib64
> -lcudart_static -ldl -lrt -pthread`, clang++ generate the following
> error:`/usr/include/features.h:367:12: fatal error: 'sys/cdefs.h' file not
> found
> #  include <sys/cdefs.h>`.
>
> And I find that 'sys/cdefs.h' is included in the directory
> `/usr/include/aarch64-linux-gnu/sys`.
>
> Anybody ever came accross the same problems? Thanks!
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>


More information about the llvm-dev mailing list