-
Bug
-
Resolution: Fixed
-
P4
-
6
-
b63
-
x86
-
linux
This bug covers just the gcc changes described below. See the corresponding bug for the glibc changes. ... peter
A DESCRIPTION OF THE FIX :
I was not able to build hotspot component of mustang of AMD64 Fedora Core 4 Linux box. Few changes have to be applied to source code to allow it to compile with gcc which is installed there by default (4.0.1 20050727). Most problems are just missing definitions of class references, which could be possibly added without breaking anything (these are included in first diff). Second problem is that in glibc 2.3.5, two pthread functions used currently by hotspot are deprecated, which gives compilation warning, which in turns leads to failed compilation (because of -Werror). Changing pthread routines to new ones was out of scope of 'compilation fixes' patch, so I just disabled -Werror to get it to compile. After that, I was able to use fastdebug binary as a replacement of existing binary distribution jvm and it worked for few sample programs I have tried (including SwingSet2 and Java2D Demo).
I don't expect that -Werror change will be included - it is just a workaround for now, I will have to investigate pthread problem further. I'm just including it for reference, if you would like to try a build on Fedora4. Other changes could be probably applied safely.
Patch should be applied in JavaSrc/hotspot/src
Index: share/vm/opto/parse.hpp
===================================================================
--- share/vm/opto/parse.hpp (.../JavaSrc/current/hotspot/src) (revision 10)
+++ share/vm/opto/parse.hpp (.../work/hotspot/src) (revision 10)
@@ -9,6 +9,7 @@
class InlineTree;
class Parse;
class BytecodeParseHistogram;
+class SwitchRange;
//------------------------------InlineTree-------------------------------------
Index: share/vm/opto/node.hpp
===================================================================
--- share/vm/opto/node.hpp (.../JavaSrc/current/hotspot/src) (revision 10)
+++ share/vm/opto/node.hpp (.../work/hotspot/src) (revision 10)
@@ -116,6 +116,7 @@
#if OPTO_DU_ITERATOR_ASSERT
class DUIterator;
class DUIterator_Fast;
+class DUIterator_Last;
#else
typedef uint DUIterator;
typedef Node** DUIterator_Fast;
Index: share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp
===================================================================
--- share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp (.../JavaSrc/current/hotspot/src) (revision 10)
+++ share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp (.../work/hotspot/src) (revision 10)
@@ -6,9 +6,11 @@
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
+class AdjoiningGenerations;
class PSAdaptiveSizePolicy;
class GCTaskManager;
+
class ParallelScavengeHeap : public CollectedHeap {
friend class VMStructs;
private:
Index: share/vm/memory/concurrentMarkSweepGeneration.hpp
===================================================================
--- share/vm/memory/concurrentMarkSweepGeneration.hpp (.../JavaSrc/current/hotspot/src) (revision 10)
+++ share/vm/memory/concurrentMarkSweepGeneration.hpp (.../work/hotspot/src) (revision 10)
@@ -22,6 +22,7 @@
class CMSGCAdaptivePolicyCounters;
class ConcurrentMarkSweepGeneration;
class ConcurrentMarkSweepPolicy;
+class ConcurrentMarkSweepThread;
class CompactibleFreeListSpace;
class FreeChunk;
class PromotionInfo;
JUnit TESTCASE :
On AMD64 Fedora Core 4, go to hotspot/make and type
make fastdebug
A DESCRIPTION OF THE FIX :
I was not able to build hotspot component of mustang of AMD64 Fedora Core 4 Linux box. Few changes have to be applied to source code to allow it to compile with gcc which is installed there by default (4.0.1 20050727). Most problems are just missing definitions of class references, which could be possibly added without breaking anything (these are included in first diff). Second problem is that in glibc 2.3.5, two pthread functions used currently by hotspot are deprecated, which gives compilation warning, which in turns leads to failed compilation (because of -Werror). Changing pthread routines to new ones was out of scope of 'compilation fixes' patch, so I just disabled -Werror to get it to compile. After that, I was able to use fastdebug binary as a replacement of existing binary distribution jvm and it worked for few sample programs I have tried (including SwingSet2 and Java2D Demo).
I don't expect that -Werror change will be included - it is just a workaround for now, I will have to investigate pthread problem further. I'm just including it for reference, if you would like to try a build on Fedora4. Other changes could be probably applied safely.
Patch should be applied in JavaSrc/hotspot/src
Index: share/vm/opto/parse.hpp
===================================================================
--- share/vm/opto/parse.hpp (.../JavaSrc/current/hotspot/src) (revision 10)
+++ share/vm/opto/parse.hpp (.../work/hotspot/src) (revision 10)
@@ -9,6 +9,7 @@
class InlineTree;
class Parse;
class BytecodeParseHistogram;
+class SwitchRange;
//------------------------------InlineTree-------------------------------------
Index: share/vm/opto/node.hpp
===================================================================
--- share/vm/opto/node.hpp (.../JavaSrc/current/hotspot/src) (revision 10)
+++ share/vm/opto/node.hpp (.../work/hotspot/src) (revision 10)
@@ -116,6 +116,7 @@
#if OPTO_DU_ITERATOR_ASSERT
class DUIterator;
class DUIterator_Fast;
+class DUIterator_Last;
#else
typedef uint DUIterator;
typedef Node** DUIterator_Fast;
Index: share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp
===================================================================
--- share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp (.../JavaSrc/current/hotspot/src) (revision 10)
+++ share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp (.../work/hotspot/src) (revision 10)
@@ -6,9 +6,11 @@
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
+class AdjoiningGenerations;
class PSAdaptiveSizePolicy;
class GCTaskManager;
+
class ParallelScavengeHeap : public CollectedHeap {
friend class VMStructs;
private:
Index: share/vm/memory/concurrentMarkSweepGeneration.hpp
===================================================================
--- share/vm/memory/concurrentMarkSweepGeneration.hpp (.../JavaSrc/current/hotspot/src) (revision 10)
+++ share/vm/memory/concurrentMarkSweepGeneration.hpp (.../work/hotspot/src) (revision 10)
@@ -22,6 +22,7 @@
class CMSGCAdaptivePolicyCounters;
class ConcurrentMarkSweepGeneration;
class ConcurrentMarkSweepPolicy;
+class ConcurrentMarkSweepThread;
class CompactibleFreeListSpace;
class FreeChunk;
class PromotionInfo;
JUnit TESTCASE :
On AMD64 Fedora Core 4, go to hotspot/make and type
make fastdebug
- relates to
-
JDK-6339849 New Community Fix Received: HotSpot build on AMD64 Fedora Core 4
-
- Closed
-