RaspberryPi3 and openframeworks compile error

Hi Guys,

I am trying to run the camera module with openFrameworks on the RaspberryPi 3b, using jvcleave’s ofxOMXCamera addon. When I try to “make” the demo code from the examples I get this error:

any suggestions welcome

Hi @haberdasher,

Hey it might help someone to answer (better that I can) if you post what versions of oF and Raspbian you are using, along with which video driver your Pi is loading during boot.

One quick thing you could try (if you have Buster or Stretch) would be to make sure your video driver is the legacy one, and recompile oF so that it uses the EGL window and not the new GLFW window. There are some flags in an oF makefile that determine this. There are quite a few posts in the forum that discuss the Pi4 (and Pi3), oF 0.11.2 (and prior), video drivers, and window types.

Hi TimChi,

Thanks for your reply. I followed this guide to setup my RasPi 3B: raspberry pi | openFrameworks
OpenFramework v 0.11.0
Raspbian Version Debian (Stretch)
I also commented out USE_GLFW_WINDOW = 1 in libs/openFrameworksCompiled/project/linuxarmv6l/config.linuxarmv6l.default.mk
and also changed to the legacy GL in raspi-config to no avail.
I also tried the command: export DISPLAY=:0 and nothing

Hi all,
Update on this:
RP3.(Buster) + OF 0.11.0 + RPcam v2.1
So after digging in the addon issues:
I managed to get past the “eglCreateImageKHR” error by commenting out:


in the file: libs/openFrameworksCompiled/project/linuxarmv6l/config.linuxarmv6l.default.mk
and adding:


to config.make inside the project

but now I’m getting this error:

So close, yet so far

1 Like

Hey @haberdasher I think you’re making progress! If I’m reading the error code right, the app has compiled but its trying to read something that’s not in memory (hence the segmentation fault).

Maybe you need more memory for the gpu to run this addon? jvcleave suggests 256 megabytes, with 128 minimum. The clue here may be the line: “147 OMX_ErrorInsufficientResources”. I think the oF setup guide asks for the gpu memory of the Pi to be set to 64 when oF is compiled, and then it can get set to something else afterward. You can change it in raspi-config, or with the gui for Raspberry Pi Configuration.

I love changes you made to the makefile. Maybe try the following, instead of commenting it out?


Also don’t be afraid to try oF 0.10.0 with Stretch and see if you can get everything compiled and running with ofxOMXCamera. You probably know this, but there is a version of the addon that @jvcleave tested with 0.10.0 and Stretch here: Releases · jvcleave/ofxOMXCamera · GitHub.

I’m not sure there is much functional difference between oF 0.10.0 and oF 0.11.0, unless you have a Pi4 on Buster. Though that said, openCV4 is included in 0.11.0. Maybe ofxOMXCamera needs a lower version of openCV? Here is what Theo posted for the 0.11.0 release: OF 0.11.0 Release

Thanks so much for your suggestions TimChi. Apparently the segmentation fault does not refer to memory according to @jvcleave. It was more of a permissions issue after one of the reboots. Now I have the camera Pi camera working I’m trying to weave ofxAruco so I can do marker detection. Will begin a new post once I run into trouble.

1 Like