Building Ogre3d library, minor lib not found

Hello, there I try to build the ogre3d as a part of larger project – opendungeons-plus With the NEWEST (old) ogre 13 3 2 I get

[ 55%] Building CXX object RenderSystems/GLSupport/CMakeFiles/OgreGLSupport.dir/src/EGL/X11/OgreX11EGLSupport.cpp.o
In file included from /build/opendungeons-plus/parts/ogre/src/RenderSystems/GLSupport/include/EGL/X11/OgreX11EGLSupport.h:36:0,
                 from /build/opendungeons-plus/parts/ogre/src/RenderSystems/GLSupport/src/EGL/X11/OgreX11EGLSupport.cpp:35:
/build/opendungeons-plus/parts/ogre/src/RenderSystems/GLSupport/include/EGL/OgreEGLSupport.h:35:10: fatal error: EGL/egl.h: No such file or directory
 #include <EGL/egl.h>

On my local machine the library egl is of course installed and I have even development version of it. However on snapcraft server it seems it misses one … How do I include necessery libraries like egl with snapcraft ? I am completly greenish when it comes to snap art … and someone else wrote the snapcraft.yaml script … cheers.

apt-file is your friend to find packages that contain a specific file:

$ sudo apt install apt-file
$ sudo apt-file update
$ apt-file search EGL/egl.h
libegl-dev: /usr/include/EGL/egl.h        

so add libegl-dev to the build-packages: of your part and it should be fine …

After closer examination it seems that aforementioned file is in libgl1-mesa-dev package on Ubuntu 18 LTS. Note I do use base: core18. But that file is already mentioned in Ogre build-packages … Could it be that the OGRE_ENABLE_PRECOMPILED_HEADERS=OFF is the culprit ? here’s my snapcraft.yaml file :

EDIT: The file is libegl1-mesa-dev ! , not libgl1-mesa-dev, alltough I need them both.