Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6339849
Votes 0
Synopsis New Community Fix Received: HotSpot build on AMD64 Fedora Core 4
Category hotspot:runtime_system
Reported Against
Release Fixed mustang(b63)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs 6339846 , 6349489
Submit Date 20-OCT-2005
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
Posted Date : 2005-10-20 23:17:47.0
Work Around
N/A
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.
Posted Date : 2005-10-27 00:02:16.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang