problem making libclc

Hi,

I have installed llvm and clang version 3.6

When I try to make libclc I get a bunch of errors as follows:

./generic/lib/math/clc_sqrt_impl.inc:34:23: error: passing ‘__constant char *’
to parameter of type ‘const char *’ changes address space of pointer
return val < ZERO ? __CLC_NAN : __clc_llvm_intr_sqrt(val);
^~~~~~~~~
./generic/lib/math/clc_sqrt_impl.inc:24:19: note: expanded from macro
‘__CLC_NAN’
#define __CLC_NAN NAN
^~~
./generic/include/clc/float/definitions.h:4:40: note: expanded from macro ‘NAN’
#define NAN __builtin_nanf(“”)
^~
In file included from ./generic/lib/math/clc_sqrt.cl:37:
In file included from ./generic/include/clc/math/gentype.inc:12:
./generic/lib/math/clc_sqrt_impl.inc:34:23: error: passing ‘__constant char *’
to parameter of type ‘const char *’ changes address space of pointer
return val < ZERO ? __CLC_NAN : __clc_llvm_intr_sqrt(val);
^~~~~~~~~
./generic/lib/math/clc_sqrt_impl.inc:24:19: note: expanded from macro
‘__CLC_NAN’
#define __CLC_NAN NAN
^~~
./generic/include/clc/float/definitions.h:4:40: note: expanded from macro ‘NAN’
#define NAN __builtin_nanf(“”)
^~
In file included from ./generic/lib/math/clc_sqrt.cl:37:
In file included from ./generic/include/clc/math/gentype.inc:18:
./generic/lib/math/clc_sqrt_impl.inc:34:23: error: passing ‘__constant char *’
to parameter of type ‘const char *’ changes address space of pointer
return val < ZERO ? __CLC_NAN : __clc_llvm_intr_sqrt(val);
^~~~~~~~~
./generic/lib/math/clc_sqrt_impl.inc:24:19: note: expanded from macro
‘__CLC_NAN’
#define __CLC_NAN NAN
^~~
./generic/include/clc/float/definitions.h:4:40: note: expanded from macro ‘NAN’
#define NAN __builtin_nanf(“”)
^~
In file included from ./generic/lib/math/clc_sqrt.cl:37:
In file included from ./generic/include/clc/math/gentype.inc:24:
./generic/lib/math/clc_sqrt_impl.inc:34:23: error: passing ‘__constant char *’
to parameter of type ‘const char *’ changes address space of pointer
return val < ZERO ? __CLC_NAN : __clc_llvm_intr_sqrt(val);
^~~~~~~~~
./generic/lib/math/clc_sqrt_impl.inc:24:19: note: expanded from macro
‘__CLC_NAN’
#define __CLC_NAN NAN
^~~
./generic/include/clc/float/definitions.h:4:40: note: expanded from macro ‘NAN’
#define NAN __builtin_nanf(“”)
^~
In file included from ./generic/lib/math/clc_sqrt.cl:37:
In file included from ./generic/include/clc/math/gentype.inc:30:
./generic/lib/math/clc_sqrt_impl.inc:34:23: error: passing ‘__constant char *’
to parameter of type ‘const char *’ changes address space of pointer
return val < ZERO ? __CLC_NAN : __clc_llvm_intr_sqrt(val);
^~~~~~~~~
./generic/lib/math/clc_sqrt_impl.inc:24:19: note: expanded from macro
‘__CLC_NAN’
#define __CLC_NAN NAN
^~~
./generic/include/clc/float/definitions.h:4:40: note: expanded from macro ‘NAN’
#define NAN __builtin_nanf(“”)
^~
In file included from ./generic/lib/math/clc_sqrt.cl:37:
In file included from ./generic/include/clc/math/gentype.inc:36:
./generic/lib/math/clc_sqrt_impl.inc:34:23: error: passing ‘__constant char *’
to parameter of type ‘const char *’ changes address space of pointer
return val < ZERO ? __CLC_NAN : __clc_llvm_intr_sqrt(val);
^~~~~~~~~
./generic/lib/math/clc_sqrt_impl.inc:24:19: note: expanded from macro
‘__CLC_NAN’
#define __CLC_NAN NAN
^~~
./generic/include/clc/float/definitions.h:4:40: note: expanded from macro ‘NAN’
#define NAN __builtin_nanf(“”)
^~
In file included from ./generic/lib/math/clc_sqrt.cl:37:
In file included from ./generic/include/clc/math/gentype.inc:50:
./generic/lib/math/clc_sqrt_impl.inc:34:23: error: passing ‘__constant char *’
to parameter of type ‘const char *’ changes address space of pointer
return val < ZERO ? __CLC_NAN : __clc_llvm_intr_sqrt(val);
^~~~~~~~~
./generic/lib/math/clc_sqrt_impl.inc:27:33: note: expanded from macro
‘__CLC_NAN’
#define __CLC_NAN __builtin_nan(“”)
^~
In file included from ./generic/lib/math/clc_sqrt.cl:37:
In file included from ./generic/include/clc/math/gentype.inc:56:
./generic/lib/math/clc_sqrt_impl.inc:34:23: error: passing ‘__constant char *’
to parameter of type ‘const char *’ changes address space of pointer
return val < ZERO ? __CLC_NAN : __clc_llvm_intr_sqrt(val);
^~~~~~~~~
./generic/lib/math/clc_sqrt_impl.inc:27:33: note: expanded from macro
‘__CLC_NAN’
#define __CLC_NAN __builtin_nan(“”)
^~
In file included from ./generic/lib/math/clc_sqrt.cl:37:
In file included from ./generic/include/clc/math/gentype.inc:62:
./generic/lib/math/clc_sqrt_impl.inc:34:23: error: passing ‘__constant char *’
to parameter of type ‘const char *’ changes address space of pointer
return val < ZERO ? __CLC_NAN : __clc_llvm_intr_sqrt(val);
^~~~~~~~~
./generic/lib/math/clc_sqrt_impl.inc:27:33: note: expanded from macro
‘__CLC_NAN’
#define __CLC_NAN __builtin_nan(“”)
^~
In file included from ./generic/lib/math/clc_sqrt.cl:37:
In file included from ./generic/include/clc/math/gentype.inc:68:
./generic/lib/math/clc_sqrt_impl.inc:34:23: error: passing ‘__constant char *’
to parameter of type ‘const char *’ changes address space of pointer
return val < ZERO ? __CLC_NAN : __clc_llvm_intr_sqrt(val);
^~~~~~~~~
./generic/lib/math/clc_sqrt_impl.inc:27:33: note: expanded from macro
‘__CLC_NAN’
#define __CLC_NAN __builtin_nan(“”)
^~
In file included from ./generic/lib/math/clc_sqrt.cl:37:
In file included from ./generic/include/clc/math/gentype.inc:74:
./generic/lib/math/clc_sqrt_impl.inc:34:23: error: passing ‘__constant char *’
to parameter of type ‘const char *’ changes address space of pointer
return val < ZERO ? __CLC_NAN : __clc_llvm_intr_sqrt(val);
^~~~~~~~~
./generic/lib/math/clc_sqrt_impl.inc:27:33: note: expanded from macro
‘__CLC_NAN’
#define __CLC_NAN __builtin_nan(“”)
^~
In file included from ./generic/lib/math/clc_sqrt.cl:37:
In file included from ./generic/include/clc/math/gentype.inc:80:
./generic/lib/math/clc_sqrt_impl.inc:34:23: error: passing ‘__constant char *’
to parameter of type ‘const char *’ changes address space of pointer
return val < ZERO ? __CLC_NAN : __clc_llvm_intr_sqrt(val);
^~~~~~~~~
./generic/lib/math/clc_sqrt_impl.inc:27:33: note: expanded from macro
‘__CLC_NAN’
#define __CLC_NAN __builtin_nan(“”)
^~
12 errors generated.
make: *** [nvptx–nvidiacl/lib/math/clc_sqrt.cl.bc] Error 1

I appreciate any help.

Hi Zeinab,

Citing an email from Tom Stellard from 2 days ago:

LLVM 3.6 is not supported in libclc trunk anymore. If you
want to use libclc with LLVM 3.6, use this tagged version:

http://llvm.org/viewvc/llvm-project/libclc/tags/36_COMPATIBLE/

Best,

Jeroen