However, when I try to make in oclVectorAdd/NVIDIA GPU Computing SDK/OpenCL/src/oclVectorAdd, I get the following error: /usr/bin/ld: cannot find -lshrutil_x86_64
collect2: error: ld returned 1 exit status
make: *** […/…/…//OpenCL//bin//linux/release/oclVectorAdd] Error 1
Any ideas on how to fix this? This problem seems to occur with all the OpenCL examples.
Even though they appear to be independent, these OpenCL sample codes are not really maintained as independently buildable projects. They were extracted from the NVIDIA GPU Computing SDK, back when that SDK was still shipping (in CUDA 4.2 timeframe and before).
The easiest way to “fix” it in my opinion is to download the CUDA 4.2 SDK from here:
Download the SDK, unzip/install it, and then go to the top level OpenCL directory in the SDK and execute make from there. Since this isn’t really a supported sequence, you may have to fix things up along the way. Read the documentation that gets installed with the SDK.
So it did make successfully from the top level OpenCL directory.
However, it still has not created any executables anywhere. I do see that it formed an obj folder for each benchmark, in which there is another folder named release, which contains object (.o) files.