RFR - 7154517: Build error in hotspot-gc without precompiled headers
bengt.rutisson at oracle.com
Wed Mar 21 00:52:48 PDT 2012
Talked to Stefan about this. Here's what seems to happen:
arrayKlassKlass.cpp includes psPromotionManager.inline.hpp which is
missing the include to psOldGen.hpp. However, the next include line in
arrayKlassKlass.cpp is to psScavenge.inline.hpp and that file includes
parallelScavengeHeap.hpp, which in turn includes psOldGen.hpp.
It seems like SunStudio is able to handle that the includes come in the
wrong order here. But gcc does not allow this.
I think this is the explanation to why it compiles on Solaris without
So, my conclusion is that your fix is sufficient. If you send me a hg
bundle of your changeset I can go ahead and push it for you.
On 2012-03-20 14:11, Bengt Rutisson wrote:
> On 2012-03-20 08:56, Nils Loodin wrote:
>> Good question, I was wondering this myself.
>> I don't know enough about the gc workings, but I was guessing that
>> those files perhaps weren't used on solaris?
> These are not platform dependent files, so they are compiled on Solaris.
>> I don't have a clue, but I guess that's the reason that the bug is
>> still in the code. Normally it's the other way around, your code not
>> compiling at all on solaris due to no pch..
> Right. So, my guess is that some Solaris-specific file has
> psOldGen.hpp in the transitive set of its includes. To track this down
> you probably have to do a build on Solaris and add the make flag to
> log all the dependencies (I forget the flag name, but we can look it
> up or ask Stefan ;-) ).
> I think it would be worth a try just to understand what is going on
> and to make sure we fix all issues related to this.
>> On Mar 19, 2012, at 14:34 , Bengt Rutisson wrote:
>>> I think your change looks fine, but I have a question.
>>> Even before your change this would build on Solaris, right? But it
>>> will not build if you turn precompiled headers off. Since Solaris is
>>> not using precompiled headers, how did it build on Solaris?
>>> It seems to me like there is another bug lurking here. Can it be
>>> that some Solaris-specific files somehow has precompiled.hpp in the
>>> transitive set of its include files? Seems strange to me.
>>> On 2012-03-16 16:25, Nils Loodin wrote:
>>>> Debugging a precompiled header on solaris issue by trying to build
>>>> without precompiled headers locally from the gc repo. And it didn't
>>>> work! :)
>>>> Here's a pretty easy fix!
>>>> Nils Loodin
More information about the hotspot-gc-dev