Further investigation of compiling w/ gcc 4.2.x -- Re: Hotspot compile issue w/ openjdk6-b07
David Herron
David.Herron at Sun.COM
Mon Mar 24 20:09:10 PDT 2008
David Herron wrote:
> David Herron wrote:
>> I'm trying to build on Ubuntu 8.04beta .. it comes with gcc 4.2.3
>> default
>>
>> Note that README-builds.html says to use gcc 4.1.x. My Ubuntu 7.10
>> system has 4.1.x
>>
>> The compile fails on hotspot/src/share/vm/opto/classes.cpp saying
>>
>> In file included from .../hotspot/src/share/vm/opto/classes.cpp:36:
>> .../hotspot/src/share/vm/opto/classes.hpp: In member function
>> 'virtual const Type* PartialSubtypeCheckNode::bottom_type() const':
>> .../hotspot/src/share/vm/opto/classes.hpp:309: internal compiler
>> error: Segmentation fault
>>
>> This doesn't happen on my Ubuntu 7.10 system ..
>
> The above error is not currently happening. I hadn't installed all
> the required -dev packages and have since installed them, and the
> above error disappeared.
>
> However further along in the compile I had to make a few simple source
> changes to fix compile errors. In hotspot a number of files are
> compiled with -Werror (which turns warnings into errors), and these
> had to do with instances of using a string constant as a "char *".
> Depending on the context I either changed a declaration of "char *" to
> "const char *" or otherwise cast'd the string constant to "char *".
>
> Another change had to do with the MOTIF requirement. There was email
> chatter a week or two ago on an internal mailing list about removing
> from OpenJDK6 the Motif dependency. Is that the plan? Currently
> installation of Motif (specifically the package libmotif-dev) seems to
> be required.
> I started with setting an environment variable MOTIF_REQUIRED=false.
> Running 'make sanity' still said that Motif was required. I looked in
> jdk/make/common/shared/Sanity.gmk and the checks there seemed to be
> incorrect, so I simply commented out the check for Motif. Later the
> compile reached AWT and in awt_util.c it had a hard requirement on a
> Motif header file. At that point I went ahead and installed
> libmotif-dev to get it compiled.
>
> My compile is still failing during the build of tools.jar -- it says
>
> error: class file for java.lang.annotation.Inherited not found
>
>
>
>
Oh, I forgot to discuss the change to
control/build/linux-i586/gensrc/java/nio/charset/CharsetEncoder.java
It didn't compile because it had "$replType$" tokens in various places.
It appears to be a generated source file and it appears 'replType' is
supposed to be replaced with String and I made that replacement.
However it then had some impedence mismatches as if it was supposed to
be byte[] instead. The changes in CharsetEncoder are required to match
String with byte[] requirements.
- David
More information about the jdk6-dev
mailing list