I am trying to compile qt 5.9
for my raspberry pi 3 compute module and I have been following mainly the online guide here (https://wiki.qt.io/RaspberryPi2EGLFS). So
In Raspbian Stretch "rpi-update" must be invoked, otherwise "libGLESv2.so" is missing in /opt/vc/lib. This fixes the linker error "cannot find -lGLESv2"
https://www.raspberrypi.org/forums/viewtopic.php?t=191638
update: the previously mentioned solution may have some unwanted side effects. I therefore recommend doing this instead::
ln -s libbrcmEGL.so /opt/vc/lib/libEGL.so
ln -s libbrcmGLESv2.so /opt/vc/lib/libGLESv2.so
ln -s libbrcmOpenVG.so /opt/vc/lib/libOpenVG.so
ln -s libbrcmWFC.so /opt/vc/lib/libWFC.so