Note : First add non-free apt list : sudo nano /etc/apt/sources.list deb http://ftp.fr.debian.org/debian/ jessie main non-free needed packages : sudo apt-get update sudo apt-get install automake autoconf libtool libx11-dev libxrandr-dev libxaw7-dev freeglut3-dev libgl1-mesa-dev libglu1-mesa-dev libpulse-dev libasound2-dev build-essential liblzma-dev nvidia-cg-toolkit OpenAL Soft need pulse Audio / alsa on linux : apt-get install libpulse-dev libasound2-dev : build with -DLIBTYPE=STATIC On RPI : rename /opt/vc/include/GLES2/gl2ext.h to make the Ogre one doing the job you can also get include errors on included gles sdk, correct the include paths : GLX DRI2 not supported or failed to authenticate The chances are this is because ‘something’ (such as gedit) has installed mesa which added its own versions of libEGL and libGLESv2. If you run: $ sudo find / -name libEGL.so* $ sudo find / -name libGLESv2.so* on the Raspberry Pi you should just get /opt/vc/lib/libEGL.so and /opt/vc/lib/libGLESv2.so if other ones turn up i.e. /usr/lib/arm-linux-gnueabihf/libEGL.so.1 you could try creating symbolic links for them all like this: $ sudo ln -fs /opt/vc/lib/libEGL.so /usr/lib/arm-linux-gnueabihf/libEGL.so $ sudo ln -fs /opt/vc/lib/libEGL.so /usr/lib/arm-linux-gnueabihf/libEGL.so.1 $ sudo ln -fs /opt/vc/lib/libEGL.so /usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0 $ sudo ln -fs /opt/vc/lib/libGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so $ sudo ln -fs /opt/vc/lib/libGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 $ sudo ln -fs /opt/vc/lib/libGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0 - Build OpenCV from sources and set the CMAKE_INSTALL_PREFIX to depedencies/OpenCV/sdk/linux or linux32 Set the cmake options to make static libs, check build libjpeg and build libpng, uncheck build libtiff Check with_OPENMP option and uncheck with_TIFF - Build Openssl using the build.sh script - Build FFmpeg using the build.sh script - Build everything else using cmake Use RPI | linux32 | linux64 toochains in dependencies/CMake/toochains when building cmake projects