Errors building Cinder on Raspberry Pi 3

Hi there. I’m trying to build Cinder on the RasPi 3. I started following the guide in the wiki before realizing that the updated building instructions are here now.

Looking at the Cmake files I noticed all the defines are for RPI2. Are there any changes to be made for the 3?

The error I’m getting is the following:

CMake Error at /usr/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:136 (message):
  Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:343 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.0/Modules/FindOpenGL.cmake:175 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  proj/cmake/platform_linux.cmake:94 (find_package)
  CMakeLists.txt:19 (include)

I’m running Raspbian Jesse and I have already updated, upgraded and enabled the experimental driver in raspi-config. Not sure what else to do.

Thanks!

I built a slightly older version of Cinder recently on an RPi 3 without any problems. I think you need to specify GLES and not OpenGL. This Cinder version came with the cibuilder script, and had to add the -rpi2 switch for the build, which worked for the RPi3 as well. I’m not sure if cibuilder works for the current android_linux branch, but I think it was not updated. I haven’t tested the new cmake system on an RPi 3, yet, but you might try this:

cmake .. -DCINDER_TARGET_GL=es2-rpi
make -j3

Hey,

the wiki definitely needs some love now with all the recent changes on the CMake configuration since the building instructions are outdated. The cibuilder script is obsolete and it will be removed soon along with any other leftovers that exist from the old CMake configuration.

The build command that Gabor suggests is the current way to go for building on the Pi. The experimental OpenGL driver has not been tested yet so I would stick with EGL which is the default for Cinder on the Pi currently if you build with the es2-rpi flag…

Thanks, that worked, but now the build is crashing when compiling gl_load.c.
It can’t find GL/glx.h (fatal error: no such file or directory)

I was finally able to build Cinder and samples correctly with @petros’ suggestion of commenting these lines out:
https://github.com/cinder/Cinder/blob/android_linux/proj/cmake/libcinder_source_files.cmake#L219-L222

Hey
I managed to get basicapp working this way on raspi3 but struggling to get BufferPlayer to work.
It builds but when I try and run it I get:
Extension: GL_OES_compressed_ETC1_RGB8_texture
Extension: GL_OES_compressed_paletted_texture
Extension: GL_OES_texture_npot
Extension: GL_OES_depth24
Extension: GL_OES_vertex_half_float
Extension: GL_OES_EGL_image
Extension: GL_OES_EGL_image_external
Extension: GL_EXT_discard_framebuffer
Extension: GL_OES_rgb8_rgba8
Extension: GL_OES_depth32
Extension: GL_OES_mapbuffer
Extension: GL_EXT_texture_format_BGRA8888
Extension: GL_APPLE_rgb_422
Extension: GL_EXT_debug_marker
gl_es_2_0_ext_load: SUCCESSFUL! | 9 procs loaded
gl_es_load: SUCCESSFUL
|error | void cinder::app::AppBase::executeLaunch()[193] Uncaught exception, type: cinder::audio::AudioDeviceExc, what: Empty DeviceRef. Also, no default output Device so perhaps there is no available hardware output.
terminate called after throwing an instance of 'cinder::audio::AudioDeviceExc’
what(): Empty DeviceRef. Also, no default output Device so perhaps there is no available hardware output.
Aborted

Any ideas?

Hi

I just did a fresh install of Raspbian Jessie on a Raspberry Pi 3.
Pulled the latest Cinder from git and did the following:
mkdir build cd build cmake .. -DCINDER_TARGET_GL=es2-rpi make -j4

Cinder compiles just fine after a little change to Ssbo.h - link
My problem is I cannot compile the samples.
I did the following in BasicApp:
mkdir build cd build cmake ../proj/cmake -DCINDER_TARGET_GL=es2-rpi make -j4

And get the following output:
[ 50%] Linking CXX executable Debug/Extrude/Extrude /home/pi/Cinder/lib/linux/armv7l/es2-rpi/Debug/libcinder.a(PlatformLinux.cpp.o): In function `cinder::app::DisplayLinux::getName() const': /home/pi/Cinder/src/cinder/app/linux/PlatformLinux.cpp:481: undefined reference to `glfwGetMonitorName' /home/pi/Cinder/lib/linux/armv7l/es2-rpi/Debug/libcinder.a(PlatformLinux.cpp.o): In function `cinder::app::DisplayLinux::displayReconfiguredCallback(GLFWmonitor*, int)': /home/pi/Cinder/src/cinder/app/linux/PlatformLinux.cpp:515: undefined reference to `glfwGetVideoMode' /home/pi/Cinder/src/cinder/app/linux/PlatformLinux.cpp:518: undefined reference to `glfwGetMonitorPos' /home/pi/Cinder/lib/linux/armv7l/es2-rpi/Debug/libcinder.a(PlatformLinux.cpp.o): In function `cinder::app::PlatformLinux::getDisplays()': /home/pi/Cinder/src/cinder/app/linux/PlatformLinux.cpp:537: undefined reference to `glfwInit' /home/pi/Cinder/src/cinder/app/linux/PlatformLinux.cpp:541: undefined reference to `glfwSetMonitorCallback' /home/pi/Cinder/src/cinder/app/linux/PlatformLinux.cpp:543: undefined reference to `glfwGetMonitors' /home/pi/Cinder/src/cinder/app/linux/PlatformLinux.cpp:544: undefined reference to `glfwGetPrimaryMonitor' /home/pi/Cinder/src/cinder/app/linux/PlatformLinux.cpp:550: undefined reference to `glfwGetVideoMode' /home/pi/Cinder/src/cinder/app/linux/PlatformLinux.cpp:553: undefined reference to `glfwGetMonitorPos' collect2: error: ld returned 1 exit status CMakeFiles/Extrude.dir/build.make:113: recipe for target 'Debug/Extrude/Extrude' failed make[2]: *** [Debug/Extrude/Extrude] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/Extrude.dir/all' failed make[1]: *** [CMakeFiles/Extrude.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

This seems to be due to recent commits providing display support for desktop. The last three in this history should be relevant. We need to separate there between the RPi which is a special case and desktop since GLFW is not used in the RPi. All GLFW relevant stuff should be guarded through :

#if ! defined( CINDER_LINUX_EGL_ONLY )
GLFW code
#else
EGL / RPi code
#endif

It would probably be good to create an issue in Github for this.

Cheers,
Petros

Hi

Thanks for the reply.
I’ve created an issue here