JDK-6554508 : compilation of parNewGeneration.cpp fails on fedora 6
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 7
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2007-05-07
  • Updated: 2010-04-02
  • Resolved: 2007-05-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u4Fixed 7Fixed hs10Fixed
On Fedora 6, the default GCC compiler is 4.1.1 and it is now strict about finding out inline method definition if it is declared to be "inline". 

In hotspot, during compilation of "parNewGeneration.cpp", it tries to include "concurrentMarkSweepGeneration.hpp" (parNewGeneration.cpp depends on genOopClosures.inline.hpp which depends on concurrentMarkSweepGeneration.hpp). MarkFromRootsClosure::do_yield_check() & Par_MarkFromRootsClosure::do_yield_check() are both defined as "inline", but the implementation actually is in its inline.hpp version. We could add concurrentMarkSweepGeneration.inline.hpp as the dependency of genOopClosures.inline.hpp, but a better solution would be to just remove the "inline" keyword in its declaration.

EVALUATION This was caused by recent putback for 4922901. There used to be an entry in include_core which explicitly put "concurrentMarkSweepGeneration.inline.hpp" as one of the dependencies for parNewGeneration.cpp. That was removed as part of the putback. It makes sense to remove the dependencies (parNewGeneration should not depend on CMS). However, parNewGeneration.cpp does still indirectly depend on concurrentMarkSweepGeneration through genOopClosures.inline.hpp which itself depends on concurrentMarkSweepGeneration.hpp. So a better fix without touching the source code is to change the dependency for genOopClosures.inline.hpp to concurrentMarkSweepGeneration.inline.hpp.

EVALUATION Remove "inline" keywords in the declaration of the methods should fix the bug.