The other day I was debugging a solaris build failure (that was due to not supporting PCH on solaris) by building hotspot without PCH locally on my linux workstation. I was working out of the hsx/hotspot-gc repo and ran into this build failure: hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp: In member function ���oopDesc* PSPromotionManager::copy_to_survivor_space(oop)���: hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp:131:37: error: invalid use of incomplete type ���struct PSOldGen��� hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp:38:7: error: forward declaration of ���struct PSOldGen��� hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp:136:43: error: invalid use of incomplete type ���struct PSOldGen��� hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp:38:7: error: forward declaration of ���struct PSOldGen��� This is due to the file using a forward declaration of this class, when in fact i needs to actually include a complete declaration. Suggested fix is to do a direct include: --- a/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp +++ b/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp @@ -25,6 +25,7 @@ #ifndef SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSPROMOTIONMANAGER_INLINE_HPP #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSPROMOTIONMANAGER_INLINE_HPP +#include "gc_implementation/parallelScavenge/psOldGen.hpp" #include "gc_implementation/parallelScavenge/psPromotionManager.hpp" #include "gc_implementation/parallelScavenge/psScavenge.hpp" With that I can build with USE_PRECOMPILED_HEADER=0.
|