Despite I had configured the OPENCL_DIR environment var as tonyrog suggests in the readme file I was not able to complile the OpenCL lib.
The info telling us to create the environment var seems to be clear to me:
but this resulted in a compiling error:
...but without it make now uses this compiler line:
I didn't to change anything on make file, so I just pointed the OPENCL_DIR to the obvious place - the local folder - where the include and lib folders can be found:
Now the problem becomes the OpenCL.dll used:
I found a version dated 05/25/2011 into the c:\Windows\System32\DriverStore\FileRepository but - despite the compiler could recognize it - now there are reference errors:
well, I don't want to downgrade my drivers, so I stoped here.
The info telling us to create the environment var seems to be clear to me:
Download all headers from http://www.khronos.org/registry/cl/as I don't have the opt folder in my system I had entered in .bashrc file:
and put them in /opt/local/include/CL
You can also use the environment variable OPENCL_DIR to point
out other locations.
export OPENCL_DIR=/c/unixlike/msysgit/local/include/CL (the place where I saved the files)
but this resulted in a compiling error:
(cd c_src; make all)in this case, the default include path for gcc is usually:
make[1]: Entering directory `/c/unixlike/src/cl/c_src'
make nif TYPE=release WORDSIZE=32
make[2]: Entering directory `/c/unixlike/src/cl/c_src'
gcc -c -o ../obj/release/32/cl_nif.o -Wall -Wextra -Wswitch-default -Wswitch-enum -D_THREAD_SAFE -D_REENTRANT -fno-common -Ic:/PROGRA~2/ERL58~1.5/usr/include -D__WIN32__ -shared -I/c/unixlike/msysgit/local/include/CL/include -m32 -DWIN32 -DWORDSIZE=32 -msse2 -DUSE_SSE2 -DWIN32 cl_nif.c
cl_nif.c:20:19: error: CL/cl.h: No such file or directory
cl_nif.c:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bool'
...
/usr/local/include/ /usr/include/exactly where I put the files, so I shouldn't have to define the environment var...
...but without it make now uses this compiler line:
(cd c_src; make all)the first thing I noticed was use of a path that doesn't exists in my system: /opt/local
make[1]: Entering directory `/c/unixlike/src/cl/c_src'
make nif TYPE=release WORDSIZE=32
make[2]: Entering directory `/c/unixlike/src/cl/c_src'
gcc -shared -o ../lib/release/32/cl_nif.dll ../obj/release/32/cl_nif.o ../obj/release/32/cl_hash.o -Wl--enable-stdcall-fixup -L/opt/local//lib -lOpenCL
c:/unixlike/msysgit/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -lOpenCL
collect2: ld returned 1 exit status
make[2]: *** [../lib/release/32/cl_nif.dll] Error 1
...
I didn't to change anything on make file, so I just pointed the OPENCL_DIR to the obvious place - the local folder - where the include and lib folders can be found:
export OPENCL_DIR=/c/unixlike/msysgit/local
Now the problem becomes the OpenCL.dll used:
gcc -shared -o ../lib/release/32/cl_nif.dll ../obj/release/32/cl_nif.o ../obj/release/32/cl_hash.o -Wl--enable-stdcall-fixup -L/c/unixlike/msysgit/local/lib -lOpenCLI had copied this file from c:\windows\system32. My NVidia's driver is currently the 290.53 version and I noticed that CUDA Toolkit (I download only the Developer Drivers <system>) try to install the 270.81 (dated 05/17/2011).
c:/unixlike/msysgit/local/lib/OpenCL.dll: file not recognized: File format not recognized
collect2: ld returned 1 exit status
...
I found a version dated 05/25/2011 into the c:\Windows\System32\DriverStore\FileRepository but - despite the compiler could recognize it - now there are reference errors:
gcc -shared -o ../lib/release/32/cl_nif.dll ../obj/release/32/cl_nif.o ../obj/release/32/cl_hash.o -Wl--enable-stdcall-fixup -L/c/unixlike/msysgit/local/lib -lOpenCL
../obj/release/32/cl_nif.o:cl_nif.c:(.text+0xb77): undefined reference to `clReleaseMemObject@4'
../obj/release/32/cl_nif.o:cl_nif.c:(.text+0xb8d): undefined reference to `clReleaseSampler@4'
well, I don't want to downgrade my drivers, so I stoped here.
