MSAOpenCL xcode problem

Hi, I’m working around particle system in processing for a long time, now i’m switching to OF. I’m pretty new to OF and this question could be banal.

I downloaded the MSAOpenCL, I’ve created the new project, copied all references, but when I try to compile my program I see this error:

**“error: can’t exec ‘/System/Library/Frameworks/OpenCL.framework/Libraries/openclc’ (No such file or directory)”

I read on google thet is related to Xcode 4, that I’m using, and the .cl files.

Anyone can help me?

Thanks a lot, Bruno.

Have you added the framework to your project? To do this, click on the project in the left file-pane (on top), make sure your target is selected, select ‘Build Phases’, open up ‘Link Binary With Libraries’ and click the ‘+’ at the bottom, type in ‘opencl’ and double-click on OpenCL.framework.

The same:

error: can’t exec ‘/System/Library/Frameworks/OpenCL.framework/Libraries/openclc’ (No such file or directory)

I’m using macosx 10.6.8

xcode 4.0

openframeworks 007

thanks a lot for the tip!

From a-stackoverflow-question:

That error pops up when xcode tries to compile the .cl files. These files are usually compiled at run-time using the clCreateProgramWithSource function. You can get rid of that error by removing the .cl files from the “Compile Sources” sections of the “Build Phases” of the target. Here is what you do:

  1. Select the Project in the Project Navigator.
  2. Select the target.
  3. Click on the Build Phases tab on the top.
  4. Expand the Compile Sources section.
  5. Select the .cl files and click the “-” button
  6. Run your program.

That should get rid of the error.

If this fixes your problem, take a second to upvote the answer on stackoverflow :slight_smile:

Ok the onnoyng opencl error disappear (this make me feel more optimist!!!) but there comes a lot different!

*: No such file or directory  
/Users/bruzzmac/Documents/LAVORI/of_preRelease_v007_osx/apps/bruzzWorkspace/MSAOpenCL Example - particles/../../../addons/MSAOpenCL/src/MSAOpenCLImagePingPong.h:17:25: error: MSAPingPong.h: No such file or directory  
/Users/bruzzmac/Documents/LAVORI/of_preRelease_v007_osx/apps/bruzzWorkspace/MSAOpenCL Example - particles/../../../addons/MSAOpenCL/src/MSAOpenCLImagePingPong.h:17:25: error: MSAPingPong.h: No such file or directory  
/Users/bruzzmac/Documents/LAVORI/of_preRelease_v007_osx/apps/bruzzWorkspace/MSAOpenCL Example - particles/../../../addons/MSAOpenCL/src/MSAOpenCLImagePingPong.h:17:25: error: MSAPingPong.h: No such file or directory  
/Users/bruzzmac/Documents/LAVORI/of_preRelease_v007_osx/apps/bruzzWorkspace/MSAOpenCL Example - particles/../../../addons/MSAOpenCL/examples/openFrameworks/MSAOpenCL example - hello world/src/testApp.cpp:4:22: error: MSATimer.h: No such file or directory  

It seems that it can’t find the lib, but I linked all of them in my left panel.

Are you sure that you have MSAPingPong addon?

Yeah you need the MSAPingPong addon. I’d recommend just installing the complete msalibs so dependency issues like this don’t occur.

I download all MSA libs and I drag’n’dropped the libs into my project: so I have this path:

addons/MASOpenCL/scr/MSAOpenCLImagePingPong.h for instance

If I double clic the file I open it up with no problem…

And can you confirm that you also have this path:



ok I fixed all references (always read the debugger…)

now the last (hoping) error is

ld: duplicate symbol _main in /Users/bruzzmac/Documents/LAVORI/of_preRelease_v007_osx/apps/bruzzWorkspace/MSAOpenCL Example - particles/build/ and /Users/bruzzmac/Documents/LAVORI/of_preRelease_v007_osx/apps/bruzzWorkspace/MSAOpenCL Example - particles/build/ for architecture i386  
collect2: ld returned 1 exit status  
Command /Developer/usr/bin/llvm-g++-4.2 failed with exit code 1  

Apple Mach-O Linker (ld) Error
Command /Developer/usr/bin/llvm-g+±4.2 failed with exit code 1

That’s a linker error, it’s telling you that there is a duplicate symbol main. There can only be 1 main function, because this is the starting point of your application. This is the error you get when you forget to remove the example projects from the addons.

the story continue… now the problem is:

Assertion failed: (err != CL_INVALID_GL_OBJECT), function initFromGLObject, file /Users/bruzzmac/Documents/LAVORI/of_preRelease_v007_osx/apps/bruzzWorkspace/MSAOpenCL Example - particles/../../../addons/MSAOpenCL/src/MSAOpenCLBuffer.cpp, line 82  

xcode open the page related to the threads and it says that the program received the signal SIGABRT


ps: thank daanvanhasselt it was true, I forgot to cancel the examples from the libs!

That’s an assertion failing. What kind of hardware are you on? If possible, try upgrading your drivers.

Here is a post on the khronos board where someone fixes this issue by upgrading drivers:

And here is the official documentation of clCreateFromGLBuffer, the failing method

It says

Returns a valid non-zero OpenCL buffer object and errcode_ret is set to CL_SUCCESS if the buffer object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret:

CL_INVALID_GL_OBJECT if bufobj is not a GL buffer object or is a GL buffer object but does not have an existing data store.

PixelOrchestra, did you ever resolve this issue?
I’m seeing an assetrion failed/SIGABRT error too.

It’s caused by a different file and function, but possibly the same fix could help.
Any help would be hugely appreciated!

Hello guys,

I don’t know if this would help but memo updated his github 2 month ago:
And as it is said in the description, it is compatible with oF0072. So if you do not have this version, I would advise to try with it.