error when building panda with MesaGLES2

You should compile a CVS build of Panda3D instead, or you should compile with --no-egl --no-gles --no-gles2 since you probably won’t need them.