Compiling OF in raspbian Stretch

#27

RPi 3 OS: Stretch 64kb used for Graphics

Well I have tried openFrameworks on a RPi 3 and still cannot get it running, so I will give openFrameworks a miss.
I may be a problem finding an alternative though.

Perhaps in future it will run…I hope so .

#28

I just got everything running on Stretch, including ofxGPIO (at least the MCP stuff). What issues are you facing?

#29

TRpi 3 and Stretch?
WHat was your setup?

I get compiler errors (Podo(?) ) and a receiver error on a directory as posted by mar.carnet.
I also want to install opencv 3.3.1 on the system as well - in fact, this has priority -
so adjustments to the graphics that may influence this are to be avoided.

#30

hey,
after making some attempts to install a make a ready OF system on RPi, I think it should be nice to have an SD image ready to burn-and-run.
could be very helpful for some people.

#31

Just tried both methods, but sadly neither worked. Method 1 crashed and while method 2 did make it further, these are the errors I got at run time as some mentioned above:
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 openssl libcurl glfw3 rtaudio gtk±3.0 libmpg123
with PKG_CONFIG_LIBDIR=
[notice ] ofAppEGLWindow: createSurface(): setting up EGL Display
[notice ] ofAppEGLWindow: createSurface(): EGL Display correctly set 0x10634d8
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
[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 OpenGL_ES
[notice ] ofAppEGLWindow: createSurface(): EGL_VENDOR = Mesa Project
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION = 1.4 (DRI2)
[notice ] ofAppEGLWindow: createSurface(): EGL_EXTENSIONS = EGL_CHROMIUM_sync_control EGL_EXT_buffer_age EGL_EXT_image_dma_buf_import EGL_KHR_cl_event2 EGL_KHR_create_context EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_NOK_texture_from_pixmap EGL_WL_bind_wayland_display
[notice ] ofAppEGLWindow: createSurface(): GL_RENDERER = Gallium 0.4 on VC4 V3D 2.1
[notice ] ofAppEGLWindow: createSurface(): GL_VERSION = OpenGL ES-CM 1.1 Mesa 13.0.6
[notice ] ofAppEGLWindow: createSurface(): GL_VENDOR = Broadcom
[notice ] ofAppEGLWindow: createSurface(): -------------
[ error ] ofAppEGLWindow: setupPeripherals(): peripherals not supported on X11Using a RPi3 with Stretch.

Any tips would be super appreciated! Thanks!

#32

Here’s a step by step of what I did :slight_smile:

###1. Installed latest Raspbian to microSD card via Etcher.
###2. Boot the Raspberry Pi 3 - it boots into the Pixel desktop by default.
Open the terminal and do usual housekeeping,

sudo apt-get update
sudo apt-get upgrade 

Then,

sudo raspi-config

From here I did 1. Expand Filesystem, 2. Switch on SSH & SPI (SPI might not be required for you, I need it), 3. Memory Split to 64 and 4. Set Boot to Console Autologin, 5. Advanced Options -> GL Driver > “G3 Legacy” “Original non-GL desktop driver” [This is according to the guide here and according to @bakercp’s post above ].

At this point the Pi would ask for a reboot, I’d say not right now :slight_smile:

Open the browser, I downloaded the of_v20170714_linuxarmv6l_nightly.tar.gz (yes, the nightly build! - I don’t think 0.9.8 works any longer). I put everything from here into a folder called openFrameworks in my home directory.

Now I reboot.

###3. On reboot,

  1. navigate to the scripts folder
    cd openFrameworks/scripts/linux/debian
  2. do
    sudo ./install_dependenies.sh
  3. Then,
    sudo ./install_codecs.sh
  4. Then go back to the main openFrameworks folder.
  5. Navigate to,
    cd libs/openFrameworksCompiled/project/linuxarmv6l/
  6. Edit the file there as mentioned by @bakercp
    nano config.linuxarmv6l.default.mk
  7. Replace

PLATFORM_LIBRARIES += GLESv2
PLATFORM_LIBRARIES += GLESv1_CM
PLATFORM_LIBRARIES += EGL

with

PLATFORM_LIBRARIES += brcmGLESv2
PLATFORM_LIBRARIES += brcmEGL

###4. Now it’s time to compile openFrameworks!

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

If you get a access denied error at any point just rerun the command as sudo, that happened to me a couple of times, don’t remember at which points - happened while compiling some examples for the first time too, so future reference too.

This is going to take a while. So take a break.

Once this is done, go to any example and make. It should work.

###5. Don’t forget to reset the memory split from raspi-config back to 128 or 256.

@moebiussurfing (and @ThreeDOgs) I could make a SD image ready to burn and run if you can wait till Tuesday/Wednesday. All my stuff is at school.

2 Likes
Is it possible to compile OF 0.9.8 on Raspbian Stretch?
#33

That would be very nice!!
Thanks for the tips anyway.

#34

Thank you so much! Super super appreciate you listing all the steps! I will give this another try!

#35

2.1.2018
Hello,

Thank you for your email.
Please see mycomments in your text

[ayruos] ayruos https://forum.openframeworks.cc/users/ayruos
December 30

Here’s a step by step of what I did :slight_smile:

  1. Installed latest Raspbian to microSD card via Etcher
  <https://etcher.io>.


  2. Boot the Raspberry Pi 3 - it boots into the Pixel desktop by
  default.

Open the terminal and do usual housekeeping,

|sudo apt-get update sudo apt-get upgrade|

Then,

sudo raspi-config

From here I did 1. Expand Filesystem, 2. Switch on SSH & SPI (SPI
might not be required for you, I need it), 3. Memory Split to 64 and
4. Set Boot to Console Autologin. [This is according to the guide here
http://openframeworks.cc/setup/raspberrypi/raspberry-pi-getting-started/].

At this point the Pi would ask for a reboot, I’d say not right now
:slight_smile:

I think you do need the reboot here.

Open the browser, I downloaded the
of_v20170714_linuxarmv6l_nightly.tar.gz (yes, the nightly build!). I
put everything from here into a folder called openFrameworks in my
home directory.

http://openframeworks.cc/versions/nightly/ this is no
of_v20170714_linuxarmv6l_nightly.tar.gz so I assume
of_linuxarmv6l_nightly.tar.gz was meant.
however qa nightly version may contain changes that may lead to
different error messages.
So I chose the /*of_v0.9.8_linuxarmv6l_release.tar.gz */version.
The memory size was set to 64 using a Model 2 B RPi

During the install
|sudo ./install_dependenies.sh

This runs for a w´hile but again exits with an error.

|/ls.o
/home/pi/openFrameworks/scripts/apothecary/build/poco/Net/obj/Linux/armv7l/release_static/OAuth20Credentials.o//
//ranlib
/home/pi/openFrameworks/scripts/apothecary/build/poco/lib/Linux/armv7l/libPocoNet.a//
//make[1]: Leaving directory
‘/home/pi/openFrameworks/scripts/apothecary/build/poco/Net’//
//
// ^ Received error ^//
//pi@host2:~/openFrameworks/scripts/linux/debian $ /

Perhaps you could help further…but I think there is a fundemental
error in the compiling of paco .
I would like to use openFrameworks but will wait for any comment and
later retry with night compile verion of openframeworks ARM6
if that fails then I must find another alternative to frameworks.

Many thanks

BG

Now I reboot.

  3. On reboot,
  1. navigate to the scripts folder
    |cd openFrameworks/scripts/linux/debian|
  2. do
    |sudo ./install_dependenies.sh|

|#|

  1. Then,
    |sudo ./install_codecs.sh <-------------- I had not done this!|
  2. Then go back to the main openFrameworks folder.
  3. Navigate to,
    |cd libs/openFrameworksCompiled/project/linuxarmv6l/|
  4. Edit the file there as mentioned by @bakercp
    https://forum.openframeworks.cc/users/bakercp
    |nano config.linuxarmv6l.default.mk|

|cd open|

#36

Hey! Are you using the nightly build of Arm6? As I said before, 0.9.8 doesn’t compile any longer, and hasn’t for a while.

#37

I can see from your log it’s Arm7 Poco that fails, Use Arm6 Nightly version of oF!

#38

I did write that I am not too keen to use a nightly build because it may change and perhaps give different
messages.
Why 0.9.8 ArmV6 cannot compile and still in the release list is not good. How is one supposed to know that? Assuming you are right, this is not good project control.
Scanning the openframework.cc site I did not find any reference to 0.9.8 not working.

However, I will try the nightly build and see how that functions.

#39

Well if you’d read the release list more carefully, it says
openFrameworks 0.9.0 supports the Raspberry Pi via the recommended Linux distribution Raspbian "Jessie" (hard float).

So the fact that you’re trying to install it on Stretch in itself should be something you shouldn’t be doing.

There’s no need to be so salty, the oF developers put in a lot of work to give us what they’re giving us and either appreciate that or find something else to use. If you read this thread more carefully you’ll see it fairly well documented that 0.9.8 doesn’t work with Stretch because of the libssl version of Stretch which can’t compile Poco (has nothing to do with oF).

#40

The text relates to 0.9.0 not 0.9.8 and Jessie has been overtaken with Stretch.
Under no circumstances will I develop new Software under an old Operating system.

My comment was not salty, but a justifiable remark. Poco is used by Openframeworks so it is an integral part of oF. A bit of critic must be acceptable if not there is something wrong.

Tomorrow I will have the time for the new download and install. So we will see if itt compiles under stretch.

#41

Thank you so much @ayruos! I followed your steps and used the nightly build you mentioned and so far so good! Ran a couple of the examples and they worked. Really appreciate it.

1 Like
#42

Using the night version it ran and I tested a few examples there. This looks like a magnificent and powerful tool…I’ll start using this in some new programmes I’ll be developing in the RPi 3.

Inspite of being a superb tool - and am disappointed with the releases. I originally downloaded the release for Armv6 and this failed to compile and I lost time on that. Only when ayruos informed me that the nightly version must be used did the OF run.
I am not too keen on using nightly releases since the code may change after each night and so new problems may occur which may disappear on the next compile run. _The http://openframeworks.cc/versions/* must be able to run !

1 Like
#43

I tested to install the nightly build into a fresh installation of stretch for a Pi 2B, everything compiled (slowly) but when trying to run my app i got the error:

ofAppEGLWindow: display(): eglSwapBuffers failed error.

So I ran sudo rpi-update and when rebuilding my app all the openFrameworks libraries were also recompiled (another long coffee break) but since then the app runs nicely.

ofxGPIO with latest patches works well.
I did have to rewrite the older ofXml code to the new syntax by looking at the supplied example.

Magnus

1 Like
#45

I’ve managed to get this to work on a Raspberry Pi 3, Stretch and OF 0.9.8 using bakercp’s Method 1 ( brcm ).

I’ve tried a few examples and everything seems to compile (fast!) and run, but for some reason my mouse pointer doesn’t show up properly.
The arrow cursor is being drawn in only white, making it invisible on a white background. It looks like the normal black border has become 90% transparent.

does anyone know what could be happening here?

thanks,
Tim

1 Like
#46

I have been stopped by ld not being able to find the lbcrmGLESv2 library.

Linking bin/emptyExample for linuxarmv6l
/usr/bin/ld: cannot find -lbcrmGLESv2
/usr/bin/ld: cannot find -lbcrmEGL
collect2: error: ld returned 1 exit status
/home/pi/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:403: recipe for target 'bin/emptyExample' failed
make[1]: *** [bin/emptyExample] Error 1
/home/pi/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:124: recipe for target 'Release' failed
make: *** [Release] Error 2

Tried to find it: find / -name “lbcrmGLESv2”
Nothing came back.

I am on a Pi 3 B with Stretch.

When is this lib generated? Do I need to install something else?

Any help would be appreciated.

#47

looks like a typo: brcm not bcrm