My first try to compile openoffice-3.2.0 failed as there was no /usr/include/X11/extensions/XTest.h on my system, which is required by /var/tmp/portage/app-office/openoffice-3.2.0/work/ooo/build/OOO320_m12/vcl/unx/source/app/saldisp.cxx so after googling around I updated to x11-libs/libXtst-1.1.0 from 1.0.3. and tried again. The build finished fine (and the old build.log got overwritten). I can't find and XTest.h in libXtst-1.0.3: http://cgit.freedesktop.org/xorg/lib/libXtst/tree/?id=libXtst-1.0.3 while it's here in libXtst-1.1.0: http://cgit.freedesktop.org/xorg/lib/libXtst/tree/include/X11/extensions/XTest.h?id=libXtst-1.1.0 Hmm, as compilation takes its time (even on my quadcore), I don't like to downgrade to libXtst-1.0.3 again just to see if the error is reproduceable and to get a failing build.log... Reproducible: Didn't try
This is almost certainly caused by mixing stable and unstable parts of X.org, and will cause problems in other packages besides openoffice.