What mean "cl_clang_storage_class_specifiers" error?

Hello All,

I’m compile example file extension name .cl with Clang in order to check the Libclc can using with the Clang, but represent error as below. That comand line copy from file name compile-test.sh in openclc project and add file cos.cl for compiling in suffix of command line.

[chatsiri@maeka libclc]$ clang -ccc-host-triple nvptx–nvidiacl -Iptx-nvidiacl/include -Igeneric/include -Xclang -mlink-bitcode-file -Xclang nvptx–nvidiacl/lib/builtins.bc -include clc/clc.h test/cos.cl
In file included from :127:
In file included from :1:
generic/include/clc/clc.h:2:2: error: Implementation requires cl_clang_storage_class_specifiers extension!
#error Implementation requires cl_clang_storage_class_specifiers extension!
^
1 error generated.

Best Regards,
Chatsiri Rattana

Hello All,

I'm compile example file extension name .cl with Clang in order to check
the Libclc can using with the Clang, but represent error as below. That
comand line copy from file name compile-test.sh in openclc project and add
file cos.cl for compiling in suffix of command line.

[chatsiri@maeka libclc]$ clang -ccc-host-triple nvptx--nvidiacl
-Iptx-nvidiacl/include -Igeneric/include -Xclang -mlink-bitcode-file
-Xclang nvptx--nvidiacl/lib/builtins.bc -include clc/clc.h test/cos.cl
In file included from <built-in>:127:
In file included from <command line>:1:
generic/include/clc/clc.h:2:2: error: Implementation requires
cl_clang_storage_class_specifiers extension!
#error Implementation requires cl_clang_storage_class_specifiers extension!
^
1 error generated.

You need to to define cl_clang_storage_class_specifiers when compiling
your code. Try adding -Dcl_clang_storage_class_specifiers to your
compile flags.

-Tom

Hello All,

I’m compile example file extension name .cl with Clang in order to check
the Libclc can using with the Clang, but represent error as below. That
comand line copy from file name compile-test.sh in openclc project and add
file cos.cl for compiling in suffix of command line.

[chatsiri@maeka libclc]$ clang -ccc-host-triple nvptx–nvidiacl
-Iptx-nvidiacl/include -Igeneric/include -Xclang -mlink-bitcode-file
-Xclang nvptx–nvidiacl/lib/builtins.bc -include clc/clc.h test/cos.cl
In file included from :127:
In file included from :1:
generic/include/clc/clc.h:2:2: error: Implementation requires
cl_clang_storage_class_specifiers extension!
#error Implementation requires cl_clang_storage_class_specifiers extension!
^
1 error generated.

You need to to define cl_clang_storage_class_specifiers when compiling
your code. Try adding -Dcl_clang_storage_class_specifiers to your
compile flags.

Hello Tom,

I try to compile source code in test directory of libclc project, but source code cannot compile with flag " -ccc-host-triple nvptx–nvidiacl". See result below

$ clang -ccc-host-triple nvptx–nvidiacl -Iptx-nvidiacl/include -Igeneric/include -Xclang -mlink-bitcode-file -Xclang nvptx–nvidiacl/lib/builtins.bc -include clc/clc.h -Dcl_clang_storage_class_specifiers test/fabs.cl -S -o fabs.ptx error: unable to create target: ‘No available targets are compatible with this triple, see -version for the available targets.’ 1 error generated.

I check clang version in order to change target for compile code agains.
$ clang --version clang version 3.2 (trunk 158000) Target: x86_64-unknown-linux-gnu Thread model: posix

The command line specify the target architecture with "x86_64-unknown-linux-gnu" for creating backend code “fabs.ptx”. Why clang throws an error? See on link here [https://gist.github.com/2916095].

Best Regards,
Chatsiri Rattana.

> > Hello All,
> >
> > I'm compile example file extension name .cl with Clang in order to check
> > the Libclc can using with the Clang, but represent error as below. That
> > comand line copy from file name compile-test.sh in openclc project and
> add
> > file cos.cl for compiling in suffix of command line.
> >
> > [chatsiri@maeka libclc]$ clang -ccc-host-triple nvptx--nvidiacl
> > -Iptx-nvidiacl/include -Igeneric/include -Xclang -mlink-bitcode-file
> > -Xclang nvptx--nvidiacl/lib/builtins.bc -include clc/clc.h test/cos.cl
> > In file included from <built-in>:127:
> > In file included from <command line>:1:
> > generic/include/clc/clc.h:2:2: error: Implementation requires
> > cl_clang_storage_class_specifiers extension!
> > #error Implementation requires cl_clang_storage_class_specifiers
> extension!
> > ^
> > 1 error generated.
> >
>
> You need to to define cl_clang_storage_class_specifiers when compiling
> your code. Try adding -Dcl_clang_storage_class_specifiers to your
> compile flags.
>

Hello Tom,

   I try to compile source code in test directory of libclc project, but
source code cannot compile with flag " *-ccc-host-triple nvptx--nvidiacl*".
See result below

*$ clang -ccc-host-triple nvptx--nvidiacl -Iptx-nvidiacl/include
-Igeneric/include -Xclang -mlink-bitcode-file -Xclang
nvptx--nvidiacl/lib/builtins.bc -include clc/clc.h
-Dcl_clang_storage_class_specifiers test/fabs.cl -S -o fabs.ptx error:
unable to create target: 'No available targets are compatible with this
triple, see -version for the available targets.' 1 error generated.*
*
*
*I check clang version in order to change target for compile code agains.*
* $ clang --version clang version 3.2 (trunk 158000) Target:
x86_64-unknown-linux-gnu Thread model: posix*
* *
The command line specify the target architecture with
"*x86_64-unknown-linux-gnu"
*for creating backend code "fabs.ptx". Why clang throws an error? See on
link here [https://gist.github.com/2916095\].

Did you build the nvptx backend for LLVM? If so, it's possible Clang
doesn't know about the nvidiacl Operating System type. Try grep'ing the
Clang source for nvidiacl and see what turns up.

-Tom