Most recent nvidia beta drivers for linux (http://www.nvnews.net/vbulletin/showthread.php?p=2314331) introduces new OpenGL ARB approved extensions (previously unofficial GLX), allowing compilation with OSmesa and shaders enabled.
The check in src/OGLRender.cpp:273 disallows this. It might be better to only check for required extensions, as in line 291 of aforementioned file and disregard the check for OSmesa.
The attachment is a patch to current HEAD (3768).
Possible solution, including descriptive messages.
The new drivers has been released yesterday, isn't a bit early to change? Otherwise the patch looks fine to me.
Sorry can't apply the patch, here it crash in glCreateShader() with mesa 7.8.2.
Ticket moved from /p/desmume/bugs/1067/