[Libclc-dev] What mean "cl_clang_storage_class_specifiers" error?

Tom Stellard tstellar at gmail.com
Thu Jun 14 17:48:26 PDT 2012


On Tue, Jun 12, 2012 at 03:31:51PM +0700, Chatsiri Ratana wrote:
> On Fri, Jun 8, 2012 at 8:05 PM, Tom Stellard <thomas.stellard at amd.com>wrote:
> 
> > On Fri, Jun 08, 2012 at 01:06:20PM +0700, Chatsiri Ratana wrote:
> > > 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 at 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


> Best Regards,
> Chatsiri Rattana.
> 
> 
> 
> > -Tom
> >
> >
> > > Best Regards,
> > > Chatsiri Rattana
> >
> > > _______________________________________________
> > > Libclc-dev mailing list
> > > Libclc-dev at pcc.me.uk
> > > http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev
> >
> >
> >
> 
> 
> -- 
> :--------------------------------------------------------
> http://about.me/chatsiri.ratana

> _______________________________________________
> Libclc-dev mailing list
> Libclc-dev at pcc.me.uk
> http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev





More information about the Libclc-dev mailing list