Rpi 4 / Raspbian Buster / openFrameworks

#20

Hello there,

I’ve got the same problem as described before in this topic :

installing OF dependencies
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libsndfile1-dev' instead of 'libsndfile-dev'
Package libgles1-mesa-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libglvnd-dev

E: Package 'libgles1-mesa-dev' has no installation candidate
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

I tried to get a workaround by replacing libgles1-mesa-dev by libglvnd-dev but it seems that it causes compilation problems after that.

Can somenone here help me with this ?

1 Like
#21

I have OF up and running on my RPi 3 B using raspian Buster.

First, to install OF edit /home/pi/openFrameworks/scripts/linux/debian/install_dependencies.sh
change line 40 from:

apt-get install freeglut3-dev libasound2-dev libxmu-dev libxxf86vm-dev g++ libgl1-mesa-dev libglu1-mesa-dev libraw1394-dev libudev-dev libdrm-dev libglew-dev libopenal-dev libsndfile-dev libfreeimage-dev libcairo2-dev libfreetype6-dev libssl-dev libpulse-dev libusb-1.0-0-dev libgtk${GTK_VERSION}-dev libopencv-dev libegl1-mesa-dev libgles1-mesa-dev libgles2-mesa-dev libassimp-dev librtaudio-dev libboost-filesystem-dev libglfw3-dev  liburiparser-dev libcurl4-openssl-dev libpugixml-dev

to:

apt-get install freeglut3-dev libasound2-dev libxmu-dev libxxf86vm-dev g++ libgl1-mesa-dev libglu1-mesa-dev libraw1394-dev libudev-dev libdrm-dev libglew-dev libopenal-dev libsndfile-dev libfreeimage-dev libcairo2-dev libfreetype6-dev libssl-dev libpulse-dev libusb-1.0-0-dev libgtk${GTK_VERSION}-dev libopencv-dev libegl1-mesa-dev libglvnd-dev libassimp-dev librtaudio-dev libboost-filesystem-dev libglfw3-dev  liburiparser-dev libcurl4-openssl-dev libpugixml-dev

That allowed me to compile OF.

Then in my project config.make file I added on line 80:

PROJECT_LDFLAGS += -latomic 

I compiled and ran the polygon example!

4 Likes
Poco JSON folder missing error
#22

Great news! did you make those changes over the github master or over @eshkrab fork?
I can test here in RPI 4

#23

That is good news, but just so you know those look like the same changes I’ve made and posted to the PR.

1 Like
#24

Hi advidaronson13,
where can man find a config.make file? I am new to OF… I am facing the same problem like you.
Thanks a lot!

#25

Hi @quappefeeder , you can find MakeFile and config.cmake inside /scripts/templates folder

If you have RPI with armv6l, you should use these ones: https://github.com/openframeworks/openFrameworks/tree/master/scripts/templates/linuxarmv6l

Cheers

#26

Thanks a lot! :slight_smile:

ofUtils.cpp:(.text+0x9f0c): undefined reference to `__atomic_fetch_add_8'
#27

Thanks!!!

#28

Did somebody managed to run it on RPI 4 ? Thanks!

#29

Hi @dimitre, I can get everything to compile using the above instructions (modifying install_dependencies.sh and config.make), and got the graphics example working on my pi3B+ using the legacy GL driver. Sadly I have not been able to get any examples to run on my pi4 (2GB). The terminal shows the following outputs, but no windows appear. The outputs are from 2 different GL drivers as set in raspi-config.

Any ideas on how to proceed from here very welcome!

Thanks for your efforts so far everyone.

LEGACY

HOST_OS=Linux
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal libcurl glfw3 rtaudio gtk+-3.0 
with PKG_CONFIG_LIBDIR=
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): screenRect: 1920x1080
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): windowRect: 1024x768
[notice ] ofAppEGLWindow: createSurface(): setting up EGL Display
[notice ] ofAppEGLWindow: createSurface(): EGL Display correctly set 0x1
[notice ] ofAppEGLWindow: createSurface(): no current renderer selected
[notice ] ofAppEGLWindow: createSurface(): default renderer detected
[notice ] ofAppEGLWindow: createSurface(): surface created correctly
[notice ] ofAppEGLWindow: createSurface(): API bound correctly
[notice ] ofAppEGLWindow: createSurface(): -----EGL-----
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION_MAJOR = 1
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION_MINOR = 4
[notice ] ofAppEGLWindow: createSurface(): EGL_CLIENT_APIS = OpenGL_ES OpenVG
[notice ] ofAppEGLWindow: createSurface(): EGL_VENDOR = Broadcom
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION = 1.4
[notice ] ofAppEGLWindow: createSurface(): EGL_EXTENSIONS = EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_vg_parent_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_lock_surface 
[notice ] ofAppEGLWindow: createSurface(): GL_RENDERER = VideoCore IV HW
[notice ] ofAppEGLWindow: createSurface(): GL_VERSION  = OpenGL ES-CM 1.1
[notice ] ofAppEGLWindow: createSurface(): GL_VENDOR   = Broadcom
[notice ] ofAppEGLWindow: createSurface(): -------------
[notice ] ofAppEGLWindow: setupPeripherals(): peripheral setup complete
[notice ] ofAppEGLWindow: setupNativeUDev(): created udev object
[notice ] ofAppEGLWindow: setupMouse(): mouse_fd=5 devicePath=/dev/input/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2:1.0-event-mouse
[notice ] ofAppEGLWindow: setupMouse(): mouse device name = Dell Dell USB Optical Mouse
[ error ] ofAppEGLWindow: ioctl GABS failed
[ error ] ofAppEGLWindow: ioctl GABS failed
[notice ] ofAppEGLWindow: setupKeyboard(): keyboard_fd=6 devicePath=/dev/input/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.1:1.0-event-kbd
[notice ] ofAppEGLWindow: setupKeyboard(): keyboard device name = Logitech Logitech USB Keyboard
[notice ] ofAppEGLWindow: setupPeripherals(): native event setup complete
[notice ] ofAppEGLWindow: setWindowTitle(): not implemented

GL (Fake KMS)

Release
HOST_OS=Linux
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal libcurl glfw3 rtaudio gtk+-3.0 
with PKG_CONFIG_LIBDIR=
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): screenRect: 1920x1080
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): windowRect: 1024x768
[notice ] ofAppEGLWindow: createSurface(): setting up EGL Display
* failed to add service - already in use?
make: *** [/home/pi/openFrameworksMain/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:197: RunRelease] Error 1
1 Like
#30

It doesn’t work here either.
Looking forward to use RPI4 with OFW

#31

Thanks to the earlier efforts of eshkrab, I got it to work using GLFW and OpenGLES, running on Raspbian 10 with the experimental GL driver. My changes are not suitable to be merged into master as there needs to be a refactor of the preprocessing directives to retain support for previous RPI variants. Some pointers on the ideal solution for this are welcome. I guess we should create a new config.mk target for the rpi4? The RPI4 target seems fairly similar to the normal Linux target now?

You can find my changes here:

Getting around 15-20 fps on the 3D primitives example.
Screenshot

2 Likes
#32

Wow, well done! I’m trying to replicate your success, but having issues, output below.
Im using the experimental GL driver (GL fake KMS) on an RPi 4 with Buster.

Perhaps my issues may arise from my way of integrating your updates. I downloaded OF for arm6l from openframeworks.cc and then replaced all the changed files from your fork. I also edited my config.make as above.

(I had tried to download and compile your fork, but couldn’t make heads nor tails of the INSTALL_FROM_GITHUB.md instructions.)

Any pointers of what I may be doing wrong greatly appreciated.
Thank you!

make RunRelease
HOST_OS=Linux
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal libcurl glfw3 rtaudio gtk+-3.0 gl glu glew 
with PKG_CONFIG_LIBDIR=
[ error ] ofAppEGLWindow: createEGLWindow(): no native window type for this system, perhaps try X11?
[warning] ofAppEGLWindow: getNativeDisplay(): window not initialized, returning NULL
[warning] ofAppEGLWindow: getNativeDisplay(): window not initialized, returning NULL
[notice ] ofAppEGLWindow: createSurface(): setting up EGL Display
[notice ] ofAppEGLWindow: createSurface(): EGL Display correctly set 0x1fa4fb8
[ error ] ofAppEGLWindow: createSurface(): eglInitialize returned EGL_FALSE
[ error ] ofAppEGLWindow: setupOpenGL(): screen creation failed, window not inited
[notice ] ofAppEGLWindow: setupPeripherals(): peripheral setup complete
[notice ] ofAppEGLWindow: setupNativeUDev(): created udev object
[notice ] ofAppEGLWindow: setupNativeInput()
[notice ] Got device
[notice ]  - node: 
[notice ]  - sysname: input0
[notice ]  - devpath: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.0/0003:046D:C316.0001/input/input0
[notice ]  - devtype: 
[notice ]  - driver: 
[notice ]  - devnum: 0
[notice ]  - ID_INPUT_KEYBOARD: 1
[notice ]  - ID_INPUT_MOUSE: 
[notice ] Got device
[notice ]  - node: /dev/input/event0
[notice ]  - sysname: event0
[notice ]  - devpath: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.0/0003:046D:C316.0001/input/input0/event0
[notice ]  - devtype: 
[notice ]  - driver: 
[notice ]  - devnum: 3392
[notice ]  - ID_INPUT_KEYBOARD: 1
[notice ]  - ID_INPUT_MOUSE: 
[notice ] ofAppEGLWindow: addInput(): input device name = Logitech Logitech USB Keyboard
[notice ] Got device
[notice ]  - node: 
[notice ]  - sysname: input1
[notice ]  - devpath: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1/0003:046D:C316.0002/input/input1
[notice ]  - devtype: 
[notice ]  - driver: 
[notice ]  - devnum: 0
[notice ]  - ID_INPUT_KEYBOARD: 
[notice ]  - ID_INPUT_MOUSE: 
[notice ] Got device
[notice ]  - node: /dev/input/event1
[notice ]  - sysname: event1
[notice ]  - devpath: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1/0003:046D:C316.0002/input/input1/event1
[notice ]  - devtype: 
[notice ]  - driver: 
[notice ]  - devnum: 3393
[notice ]  - ID_INPUT_KEYBOARD: 
[notice ]  - ID_INPUT_MOUSE: 
[notice ] Got device
[notice ]  - node: 
[notice ]  - sysname: input2
[notice ]  - devpath: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1/0003:046D:C316.0002/input/input2
[notice ]  - devtype: 
[notice ]  - driver: 
[notice ]  - devnum: 0
[notice ]  - ID_INPUT_KEYBOARD: 
[notice ]  - ID_INPUT_MOUSE: 
[notice ] Got device
[notice ]  - node: /dev/input/event2
[notice ]  - sysname: event2
[notice ]  - devpath: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1/0003:046D:C316.0002/input/input2/event2
[notice ]  - devtype: 
[notice ]  - driver: 
[notice ]  - devnum: 3394
[notice ]  - ID_INPUT_KEYBOARD: 
[notice ]  - ID_INPUT_MOUSE: 
[notice ] Got device
[notice ]  - node: 
[notice ]  - sysname: input3
[notice ]  - devpath: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:413C:3012.0003/input/input3
[notice ]  - devtype: 
[notice ]  - driver: 
[notice ]  - devnum: 0
[notice ]  - ID_INPUT_KEYBOARD: 
[notice ]  - ID_INPUT_MOUSE: 1
[notice ] Got device
[notice ]  - node: /dev/input/event3
[notice ]  - sysname: event3
[notice ]  - devpath: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:413C:3012.0003/input/input3/event3
[notice ]  - devtype: 
[notice ]  - driver: 
[notice ]  - devnum: 3395
[notice ]  - ID_INPUT_KEYBOARD: 
[notice ]  - ID_INPUT_MOUSE: 1
[notice ] ofAppEGLWindow: addInput(): input device name = Dell Dell USB Optical Mouse
[ error ] ofAppEGLWindow: ioctl GABS failed
[ error ] ofAppEGLWindow: ioctl GABS failed
[notice ] Got device
[notice ]  - node: /dev/input/mouse0
[notice ]  - sysname: mouse0
[notice ]  - devpath: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:413C:3012.0003/input/input3/mouse0
[notice ]  - devtype: 
[notice ]  - driver: 
[notice ]  - devnum: 3360
[notice ]  - ID_INPUT_KEYBOARD: 
[notice ]  - ID_INPUT_MOUSE: 1
[notice ] Got device
[notice ]  - node: /dev/input/mice
[notice ]  - sysname: mice
[notice ]  - devpath: /devices/virtual/input/mice
[notice ]  - devtype: 
[notice ]  - driver: 
[notice ]  - devnum: 3391
[notice ]  - ID_INPUT_KEYBOARD: 
[notice ]  - ID_INPUT_MOUSE: 
[notice ] --- Input Device List ---: 
[notice ]  - /dev/input/event0
[notice ]  - /dev/input/event3
[notice ] -------------------------: 
[notice ] ofAppEGLWindow: setupPeripherals(): native event setup complete
[notice ] ofGstVideoGrabber: Probing devices with udev...
[notice ] ofGstVideoGrabber: Found device :, getting capabilities...
[notice ] ofGstVideoGrabber: detected v4l2 device: bcm2835-codec
[notice ] ofGstVideoGrabber: driver: bcm2835-codec, version: 267058
[notice ] ofGstVideoGrabber: Capabilities: 0x84208000
[notice ] device /dev/video10 seems to not have the capture capability, (radio tuner?)
[notice ] removing it from device list
[notice ] ofGstVideoGrabber: Found device :, getting capabilities...
[notice ] ofGstVideoGrabber: detected v4l2 device: bcm2835-codec
[notice ] ofGstVideoGrabber: driver: bcm2835-codec, version: 267058
[notice ] ofGstVideoGrabber: Capabilities: 0x84208000
[notice ] device /dev/video11 seems to not have the capture capability, (radio tuner?)
[notice ] removing it from device list
[notice ] ofGstVideoGrabber: Found device :, getting capabilities...
[notice ] ofGstVideoGrabber: detected v4l2 device: bcm2835-codec
[notice ] ofGstVideoGrabber: driver: bcm2835-codec, version: 267058
[notice ] ofGstVideoGrabber: Capabilities: 0x84208000
[notice ] device /dev/video12 seems to not have the capture capability, (radio tuner?)
[notice ] removing it from device list
[ error ] ofGstVideoGrabber: initGrabber(): no devices found, exiting without initializing
[warning] ofGstVideoUtils: update(): ofGstVideoUtils not loaded
[notice ] ofAppEGLWindow: display(): eglSwapBuffers failed: 
[warning] ofGstVideoUtils: update(): ofGstVideoUtils not loaded

The last 2 lines are repeated until I kill the program.

#33

Are you running this from X11? Because it seems it’s failing to create a window.

[ error ] ofAppEGLWindow: createEGLWindow(): no native window type for this system, perhaps try X11?

The ofGstVideoUtils warning is just because there is no webcam connected to the RPI.

#34

I get the same error

[notice ] ofAppEGLWindow: display(): eglSwapBuffers failed:

and running from console

#35

I was executing it over SSH while my pi was running Raspbian Desktop. In that scenario, no window would open at all. However, when I run it locally by either double clicking the executable or running it from the console, a window appears but nothing is drawn in it. I have tried a few different examples and they all behave pretty much the same. Like @sandufi, I also get an indefinite stream of the following while the window is open. Hope that’s useful.

[notice ] ofAppEGLWindow: display(): eglSwapBuffers failed: �`�surface specified
#36

Can you list the full console output? There should be going something wrong during initialization higher up.

You definitely need to launch from X11 with my branch as I patched out the RPI native window that you could launch from the console.

#37

Sure. Here it is:

HOST_OS=Linux
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal libcurl glfw3 rtaudio gtk+-3.0 gl glu glew 
with PKG_CONFIG_LIBDIR=
[notice ] ofAppEGLWindow: createSurface(): setting up EGL Display
[notice ] ofAppEGLWindow: createSurface(): EGL Display correctly set 0x1affe68
libEGL warning: DRI2: failed to authenticate
[notice ] ofAppEGLWindow: createSurface(): no current renderer selected
[notice ] ofAppEGLWindow: createSurface(): default renderer detected
[ error ] ofAppEGLWindow: createSurface(): no matching configs were found, num_configs: 0
[ error ] ofAppEGLWindow: setupPeripherals(): peripherals not supported on X11
[notice ] ofAppEGLWindow: display(): eglSwapBuffers failed: @�P�surface specified
#38

@ThomasColliers does changing

To:
PLATFORM_DEFINES += TARGET_LINUX

Get rid of the need for all those changes in your branch?

Theo

#39

I’ve tried to compile OFW in a RPI3B+ to see if it runs in Raspbian Buster in RPI4 and I’ve got the following error

error while loading shared libraries: libboost_filesystem.so.1.62.0: cannot open shared object file: No such file or directory

Do you think it is possible to run this way?