JDK-6339849 : New Community Fix Received: HotSpot build on AMD64 Fedora Core 4
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2005-10-20
  • Updated: 2012-10-08
  • Resolved: 2005-12-07
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
6 b63Fixed
Related Reports
Relates :  
Relates :  
Description
This bug covers just the glibc changes described below.  See the corresponding bug for the gcc 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.

Diff for makefile, in JavaSrc/hotspot/build

Index: linux/makefiles/gcc.make
===================================================================
--- linux/makefiles/gcc.make    (.../JavaSrc/current/hotspot/build)     (revision 10)
+++ linux/makefiles/gcc.make    (.../work/hotspot/build)        (revision 10)
@@ -71,7 +71,7 @@
 endif

 # Compiler warnings are treated as errors
-CFLAGS_WARN  = -Werror
+CFLAGS_WARN  =
 CFLAGS_WARN += -Wpointer-arith -Wconversion -Wsign-compare

 # The flags to use for an Optimized g++ build


JUnit TESTCASE :
On AMD64 Fedora Core 4, go to hotspot/make and type
make fastdebug

Comments
EVALUATION I'm able to reproduce this failure with a Fedora Core 4 i686 system. So an AMD64 is not required. Here are the error messages: Compiling src/os_cpu/linux_i486/vm/os_linux_i486.cpp cc1plus: warnings being treated as errors src/os_cpu/linux_i486/vm/os_linux_i486.cpp: In function `void current_stack_region(unsigned char**, size_t*)': src/os_cpu/linux_i486/vm/os_linux_i486.cpp:594: warning: `pthread_attr_getstackaddr' is deprecated (declared at /usr/include/pthread.h:307) src/os_cpu/linux_i486/vm/os_linux_i486.cpp:594: warning: `pthread_attr_getstackaddr' is deprecated (declared at /usr/include/pthread.h:307) gmake[2]: *** [os_linux_i486.o] Error 1 gmake[2]: Leaving directory `build/linux/linux_i486_compiler1/product' gmake[1]: *** [the_vm] Error 2 gmake[1]: Leaving directory `build/linux/linux_i486_compiler1/product' gmake: *** [product1] Error 2 I'm running gcc-4.0.0-8 and using glibc-2.3.5-10, which seems to be what's on the Fedora Core 4 ISO's, without updating. I don't know what those methods do, or if it would be easy to replace them across all our platforms, or if we want to special-case their replacement on linux, or linux running particular glibc versions.
27-10-2005