Rpi 4 / Raspbian Buster / openFrameworks

I would just love to have it running on RPI 4. none of the recipes worked for me until now.
Unfortunately I had to buy some more 3B+ to make it work for a project.

@ThomasColliers patch worked here. the problem was I was invoking from ssh. if I boot with Desktop and invoke program with keyboard (didnt have one before) it runs.

edit: fullscreen doesn’t work, always windowed, and pressing esc to quit only freezes and keeps the window.

Thanks all for this thread.

I worked in @ThomasColliers changes to a PR with a few tweaks.
It works for me in EGL and GLFW modes but only with the legacy GL driver disabled with raspi-conf

If you want to switch between GLFW and EGL use this define in the makefile.

Any testing on Rpi 3 or earlier would be handy as I only have a Rpi 4 to test with.



Thanks for working on this @Theo!

Internet permitting, I’ll give Buster + this branch of OF a shot on my RPi3. Might not have extra microSD cards lying around but hopefully can figure all this out over the weekend.


Update, it works on the RPI3. Details on the PR.


Having some trouble installing this.

I’m using a pi4 with Buster. I downloaded this https://github.com/ofTheo/openFrameworks/tree/feature-rpi4

Ran ‘sudo ./install_dependencies.sh’ and got ‘command not found’

Am I missing something?

I’m also confused about ’ EGL and GLFW ', is that something that needs to be downloaded? In raspi-config i have ‘Legacy’ disabled and ‘Gl (Fake KMS)’ enabled

Where are you on the path when running the sudo command?

Unless you’re in openFrameworks/scripts/linux/debian, from where you can run sudo sh install_dependencies.sh, you’d have to do

sudo sh path/to/oF/scripts/linux/debian/install_dependencies.sh

You’re missing the sh and trying to run a bash script like an executable and maybe you’re on the wrong path as well.

EGL/GLFW isn’t something that needs to be downloaded, they are different windowing systems that OF uses for creating windows for the apps. GL Full KMS works as far as I know (Fake KMS might as well) and from the Github thread, GLFW has less issues than EGL at the moment IIRC which needs one of the makefile lines to be uncommented.

Also, if you’re installing from GitHub, don’t forget to run the download_libs scripts as well, otherwise OF will not compile.

Thanks! Adding ‘sh’ worked and I also installed ‘download_libs’.

None of the examples have config or make files. Is that normal?

When I add the config and make files to a project, and then try to compile the project i’m getting:

Makefile:13: /home/pi/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk: No such File or directory make: *** No rule to make target '/home/pi/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk'. Stop.

Also how exactly is EGL or GLFW enabled?

You also need to compile openFrameworks after you ave the dependencies and the libs. The makefiles can be generated with the project generator (which you need to pull with the git submodule command).

From the repository:

If you are working with the Git repository, the stable branch of the OF repository corresponds to the most recent release, with a few important differences:

  1. The release includes a simple openFrameworks project generator.
  2. This GitHub repository contains code and libs for all the platforms, but the releases are done on a per-platform basis.
  3. This GitHub repository has no project files for the different examples. They are generated automatically for each release using a tool in apps/projectGenerator/ .
  4. There are no external dependencies in this repository, you can download them using the download_libs.sh script for each platform in the particular platform folder inside scripts.

If you want to work with the openFrameworks GitHub repository, you need to download the external dependencies and you should use the project generator to create project files for all the code in examples/ . To generate the project files with the project generator enable the ‘Advanced Options’ in the settings tab, then use ‘Update Multiple’ to update the projects for the examples/ folder path in the repo.

To set up the project generator submodule within the OF repo, use the command git submodule init then git submodule update whilst inside the openFrameworks repo.

To compile OF, you need to run

make Release -C /home/pi/openFrameworks/libs/openFrameworksCompiled/project

The EGL/GLFW switching happens from the global makefile, which may have changed over the last 24 hours as @Theo is actively pushing changes to the repo to make usage seamless. I’d advice maybe waiting for OF0.11.0 to officially release with all instructions + makefiles etc. Things are rapidly changing to make everything seamless for the release and there are still bugs that are being ironed out.

Has anyone successfully make OF work on Rpi 4 / Buster?

I think @theo has it up and running finally. I tested Buster on a RPI3 and it worked with his fixes, just got a 4, will test soon.

1 Like

I cannot even properly install dependencies on RPi4 Buster.

Are you using the latest branch from github? I got it running from there.

cuinjune can you try using the latest nightly build?

I tried the latest nightly build but if I try to install the dependencies in Rpi4/Buster, I get the following errors:

 libsndfile1-dev : Depends: libsndfile1 (= 1.0.25-9.1+deb8u4) but 1.0.28-6 is to be installed
                   Depends: libvorbis-dev (>= 1.2.3) but it is not going to be installed
                   Depends: libflac-dev (>= 1.1.4-3) but it is not going to be installed
 libudev-dev : Depends: libudev1 (= 215-17+deb8u13) but 241-7~deb10u1+rpi1 is to be installed
 libusb-1.0-0-dev : Depends: libusb-1.0-0 (= 2:1.0.19-1) but 2:1.0.22-2 is to be installed
                    Recommends: libusb-1.0-doc but it is not going to be installed
 libxmu-dev : Depends: libxext-dev but it is not going to be installed
              Depends: libxmu6 (= 2:1.1.2-1) but 2:1.1.2-2 is to be installed
 libxxf86vm-dev : Depends: libxxf86vm1 (= 1:1.1.3-1) but 1:1.1.4-1+b2 is to be installed
                  Depends: x11proto-xf86vidmode-dev (>=
E: Unable to correct problems, you have held broken packages.
error installing dependencies, there could be an error with your internet connection
if the error persists, please report an issue in github: http://github.com/openframeworks/openFrameworks/issues

If I try to install the mentioned dependencies, for example libsndfile1, it says I already have the new version installed.

Has anyone had the same problem? I don’t know how to fix this.

Has anyone tested this using OF 0.11.0?

Under Linux Arm it says:
"* supports the Rpi 4 with EGL and GLFW. Closes #6436 (#6438) [commit]

@EdwardDeaver @cuinjune

0.11.0 should be compatible with RPI 4 and Raspbian Buster.
I’ve used the nightlies with RPI 4 over the last few weeks with no issue.

You’ll need the armv6 package from: https://openframeworks.cc/download/

Then follow these instructions:
Note: the new steps like selecting the GL Driver described here


@theo are you running OF from the CLI or only from the desktop?
I can run OF0.11.0 on RPI 4 from the desktop, but not from the commandline.

@TimK You need an X environment for RPI 4 currently with OF 0.11.0.
If you don’t care about displaying anything you can run it semi-headless with xvfb ( you have to install that ).

@jvcleave has a window working though for RPI 4 that can work from CLI without needing X and displaying graphical output. New ofxAddon: ofxRPI4Window

Ideally we should include this approach in the next release.

@theo I have been trying to run a shader example ‘01_simpleColorQuad’ from RPI 4 Buster. I have setup and installed the nightly build of arm6 as you mentioned above and follwed the usual instructions for the RPI setup, enabling the fake KMS driver etc.

I can compile and run other examples the issue for me is that when running the shader example that uses the ofShader object from either the command line or through the gui the window opens but it fails to display anything. The error output in the console states that it doesn’t support ‘ARB_shader_objects’.
I have tried different versions of OF, changed to legacy driver and changed the config to override the USE_PI_LEGACY etc with no luck. So this time I have done a clean install using the nightly build with the same issue to rule out anything I might have changed.

This is the full list of errors I receive in the console when I run the shader example:

[ error ] ofShader: sorry, it looks like you can't run 'ARB_shader_objects'
[ error ] ofShader: please check the capabilites of your graphics card: http://www.ozone3d.net/gpu_caps_viewer
[ error ] ofShader: setupShaderFromSource(): failed creating GL_VERTEX_SHADER shader
[ error ] ofShader: sorry, it looks like you can't run 'ARB_shader_objects'
[ error ] ofShader: please check the capabilites of your graphics card: http://www.ozone3d.net/gpu_caps_viewer
[ error ] ofShader: setupShaderFromSource(): failed creating GL_FRAGMENT_SHADER shader
[ error ] ofShader: linkProgram(): trying to link GLSL program, but no shaders created yet

Has anyone else faced this issue recently? Any help would be greatly appreciated.