# Errors building Cinder on Raspberry Pi 3

**URL:** <https://discourse.libcinder.org/t/errors-building-cinder-on-raspberry-pi-3/193>\
**Category:** Using Cinder\
**Created:** [August 2, 2016, 9:45pm UTC](https://discourse.libcinder.org/t/errors-building-cinder-on-raspberry-pi-3/193 "2016-08-02T21:45:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![navadria](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/navadria/32/90_2.png) [@navadria](https://discourse.libcinder.org/u/navadria)\
**Post date:** [August 2, 2016, 9:45pm UTC](https://discourse.libcinder.org/t/errors-building-cinder-on-raspberry-pi-3/193/1 "2016-08-02T21:45:10Z")

</div>

Hi there. I’m trying to build Cinder on the RasPi 3. I started following the[guide in the wiki](https://github.com/cinder/Cinder/wiki/Cinder-for-Linux-%7C-Raspbian-Jesse-on-Raspberry-Pi-2) before realizing that the updated building instructions are [here](http://discourse.libcinder.org/t/rfc-cross-platform-cmake-support/102) 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!

---

<div class="post-metadata">

**Author:** ![gabor\_papp](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/gabor_papp/32/769_2.png) [@gabor\_papp](https://discourse.libcinder.org/u/gabor_papp)\
**Post date:** [August 3, 2016, 4:40am UTC](https://discourse.libcinder.org/t/errors-building-cinder-on-raspberry-pi-3/193/2 "2016-08-03T04:40:54Z")

</div>

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:

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

```

---

<div class="post-metadata">

**Author:** ![petros](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/petros/32/26_2.png) [@petros](https://discourse.libcinder.org/u/petros)\
**Post date:** [August 3, 2016, 7:13am UTC](https://discourse.libcinder.org/t/errors-building-cinder-on-raspberry-pi-3/193/3 "2016-08-03T07:13:24Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![navadria](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/navadria/32/90_2.png) [@navadria](https://discourse.libcinder.org/u/navadria)\
**Post date:** [August 3, 2016, 6:26pm UTC](https://discourse.libcinder.org/t/errors-building-cinder-on-raspberry-pi-3/193/4 "2016-08-03T18:26:19Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![navadria](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/navadria/32/90_2.png) [@navadria](https://discourse.libcinder.org/u/navadria)\
**Post date:** [August 3, 2016, 8:08pm UTC](https://discourse.libcinder.org/t/errors-building-cinder-on-raspberry-pi-3/193/5 "2016-08-03T20:08:28Z")

</div>

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](https://github.com/cinder/Cinder/blob/android_linux/proj/cmake/libcinder_source_files.cmake#L219-L222)

---

<div class="post-metadata">

**Author:** ![theflyingtom](https://avatars.discourse-cdn.com/v4/letter/t/aeb1de/32.png) [@theflyingtom](https://discourse.libcinder.org/u/theflyingtom)\
**Post date:** [August 5, 2016, 7:05am UTC](https://discourse.libcinder.org/t/errors-building-cinder-on-raspberry-pi-3/193/6 "2016-08-05T07:05:48Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![thyrrestrup](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@thyrrestrup](https://discourse.libcinder.org/u/thyrrestrup)\
**Post date:** [January 16, 2017, 10:01am UTC](https://discourse.libcinder.org/t/errors-building-cinder-on-raspberry-pi-3/193/7 "2017-01-16T10:01:29Z")

</div>

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](https://github.com/cinder/Cinder/issues/1715)  
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`

---

<div class="post-metadata">

**Author:** ![petros](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/petros/32/26_2.png) [@petros](https://discourse.libcinder.org/u/petros)\
**Post date:** [January 16, 2017, 11:30am UTC](https://discourse.libcinder.org/t/errors-building-cinder-on-raspberry-pi-3/193/8 "2017-01-16T11:30:20Z")

</div>

This seems to be due to recent commits providing display support for desktop. The last [three](https://github.com/cinder/Cinder/commits/master/include/cinder/app/linux/PlatformLinux.h) 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

---

<div class="post-metadata">

**Author:** ![thyrrestrup](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@thyrrestrup](https://discourse.libcinder.org/u/thyrrestrup)\
**Post date:** [January 16, 2017, 1:05pm UTC](https://discourse.libcinder.org/t/errors-building-cinder-on-raspberry-pi-3/193/9 "2017-01-16T13:05:34Z")

</div>

Hi

Thanks for the reply.  
I’ve created an issue [here](https://github.com/cinder/Cinder/issues/1718)
