It tries to connect to X11 server in order to compile (which seems useless), and renders uncompilable inside a chroot. I usually have a chroot of a clean system, and update it regularly to after pack it as what I call a stage5 if I need a reinstall of clean system. Last version of netbeans compiled without problems (even in a chroot). I'll attach emerge --info and build log Reproducible: Always
Created attachment 268085 [details] complete build log
Created attachment 268087 [details] emerge --info
*** This bug has been marked as a duplicate of bug 361439 ***