Further investigation of compiling w/ gcc 4.2.x -- Re: Hotspot compile issue w/ openjdk6-b07
Kelly O'Hair
Kelly.Ohair at Sun.COM
Tue Mar 25 10:05:11 PDT 2008
MOTIF_REQUIRED is a bit mis-named, it's referring to the Motif
libraries really. The jdk builds will always require some Motif
#include files, regardless of the MOTIF_REQUIRED setting.
All OPENJDK builds should have set MOTIF_REQUIRED=false.
---
I am a big fan of removing all warning errors and asking for all compilers
to generate all possible warnings, but one of the problems with things like
-Werror is that each release (even minor) of a compiler has the potential to
create new warnings, which with -Werror will trigger a failed build.
So as much as I love -Werror, it becomes a royal headache when you have source
that compiles clean most of the time, but you can't possibly verify that it
compiles clean all of the time. All the C++ compilers suffer from this issue,
and it's not their fault really, the new warnings are usually correct.
I would pass on the hotspot changes to the hotspot team, but I don't have
a good answer for this -Werror problem in general, except to remove -Werror
when compiling in unknown or uncharted territory.
---
I don't know what the annotation problem is.
-kto
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
>
>
>
>
More information about the jdk6-dev
mailing list