Trying to compile qt 5.9 for my raspberry pi 3 compute module and I have been following mainly the online guide here (http://wiki.qt.io/Raspberry_Pi_Beginners_Guide). So, I have set the pi system roots to the mount point /mnt/pi-rootfs.
Please note I m using Raspbian Stretch.

This configures qt but no openGL and I have the message:
ERROR: Feature 'opengles2' was enabled, but the pre-condition 'config.win32 || (!config.watchos && !features.opengl-desktop && libs.opengl_es2)' failed.

ERROR: The OpenGL functionality tests failed!
You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.

In addition, I also tried to add these 'QMAKE_INCDIR_OPENGL QMAKE_INCDIR_OPENGL QMAKE_INCDIR_OPENGL' to qmake.conf in linux-rasp-pi-g++ but still no sucess.