This is mentioned in INSTALL_cmake file (which seems nobody is reading...):
On Linux wxWidgets 3.1.5 and later is by default compiled with EGL support for the wxGLCanvas class.
In this case you need to activate EGL support explicitly also in GLEW, otherwise there are crashes when
intializing the wxGLCanvas.
For the default branch there is also the following alternative added:
Alternatively you can also use the epoxy library instead of GLEW, which does
the detection at run time. To build with epoxy add -DBUILD_WITH_EPOXY=on to the CMake command line.