I've had trouble building dev-util/duma and discovered this morning that -j2 was the culprit. duma's build compiles and runs createconf.c in order to create duma_config.h which is needed by dumapp.cpp. With -j2, the cpp compilation is starting before createconf finishes running and this causes the emerge to die.
How does one set a special MAKEOPTS for a particular package?