Jeffrey Baker wrote:
I noted multiple build failures on x86 Linux (Ubuntu 8.04) using the
b31 source archive, building the fastdebug_build target.

The first failure occurs due to -Werror.  There are a number of unsafe
casts of char * in hotspot, and these cause the build to fail with
-Werror.  I worked around this by removing -Werror from a variety of
Makefiles.  Aside: why isn't this propagated from the top-level
Makefile?  I had to grep around in the tree to find the right one.

The hotspot sources have traditionally been built by a handful of
compilers with all known warnings fixed. When you start using a newer
compiler with newer warnings, you need to either fix the warnings or
turn off the -Werror option.
If you supply WARNINGS_ARE_ERRORS=  on the make command line so that you
empty out this variable that normally has -Werror in it, that should work.
You should not have to edit the Makefiles, so if
   make WARNINGS_ARE_ERRORS=
does not work, let me know.
You cannot set this as an environment variable and we never use the
'make -e' option. When make is run in the Makefiles, it should use
$(MAKE) which should propagate the command line options.
Again, if this is not the case, let me know.


Second problem: the build dumped core in test_gamma with an error in
ciTypeFlow.hpp:395.  I filed this bug at sun.com with Review ID
1299675.  I worked around this by exiting the test_gamma script early.

Since you are using a newer gcc compiler, it's quite possible you have
found a bug of some kind, in gcc or in hotspot or somewhere in between.
You may want to see about trying a different gcc to isolate what the issue
might be.


Third problem: fastdebug_build target doesn't seem to propagate the -g
flag.  All of hotspot was built with -fPIC -fno-rtti -fno-exceptions
-fcheck-new -m32 -march=i586 -pipe -O3 -fno-strict-aliasing
-Wpointer-arith -Wconversion -Wsign-compare, i.e. without -g.  I
thought the point of the fastdebug target was to build with -g -O.

Yes, it should have. That's a new one on me.
I see that the debug build seems to use -gstabs, but it looks
like linux/makefiles/fastdebug.make forgot to add -gstabs to CFLAGS.
It's possible that they removed it with 64bit mode because of the
size problems with Dwarf2 debug format, and accidently removed it for
32bit too. :^(   Sounds like a bug to me.

Should I have built with the plain debug_build target instead?

No, you should not have to.


Fourth problem:
/home/jwb/jdk-src/openjdk/build/linux-i586-fastdebug/gensrc/java/nio/charset/CharsetEncoder.java:142:
cannot find symbol
symbol  : class $replType$
location: class java.nio.charset.CharsetEncoder
    private $replType$ replacement;

This is evidently caused by /bin/sh being dash instead of bash.  If
the build requires bash, why doesn't it invoke bash?  Relying on sh ==
bash is fragile and confusing.

The build does not require bash, it requires an 'sh' that works properly.
Some change in dash caused this problem. These sh scripts have not changed
for ages.

-kto


Regards,
jwb

Reply via email to