Thought this bug as reported on mametesters deserved some attention.
When building with the option NO_X11=1, a component of BGFX is not fully processing the directive in the file ./src/osd/modules/render/drawbgfx.cpp
At line #172, 195 and 196 there are hard references to X11.
I personally workaround this by replacing:
It seems that a check for SDL2 Video Ouput is missing for the Raspberry Pi using KMS/DRM video output (without X11).