Snow Leopard HotSpot Build Failure (Intel)

David Schlosnagle schlosna at gmail.com
Tue Jul 27 06:08:09 PDT 2010


John,

I ran into this over the weekend and I worked around it on my local
build by changing the cast from (int32_t) to (intptr_t), but I haven't
really tested the C1 (client) VM. Those lines were added by 6939930:
exception unwind changes in 6919934 hurts compilation speed.

diff --git a/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
b/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
--- a/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
+++ b/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
@@ -469,8 +469,8 @@
   // Fetch the exception from TLS and clear out exception related thread state
   __ get_thread(rsi);
   __ movptr(rax, Address(rsi, JavaThread::exception_oop_offset()));
-  __ movptr(Address(rsi, JavaThread::exception_oop_offset()),
(int32_t)NULL_WORD);
-  __ movptr(Address(rsi, JavaThread::exception_pc_offset()),
(int32_t)NULL_WORD);
+  __ movptr(Address(rsi, JavaThread::exception_oop_offset()),
(intptr_t)NULL_WORD);
+  __ movptr(Address(rsi, JavaThread::exception_pc_offset()),
(intptr_t)NULL_WORD);

   __ bind(_unwind_handler_entry);
   __ verify_not_null_oop(rax);

Thanks,
Dave

On Tue, Jul 27, 2010 at 8:29 AM, John Yeary <johnyeary at gmail.com> wrote:
> Hello Everyone,
>
> I have tried to get OpenJDK 7 to build on my MacBook Pro on Snow Leopard
> (10.6.4). I seem to get further along with items I glean from the mailing
> list archives, and Google searches. The current show stopper is in
> c1_LIRAssembler_x86.cpp.
>
> /Users/jyeary/Downloads/bsd-port/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp:
> In member function 'int LIR_Assembler::emit_unwind_handler()':
> /Users/jyeary/Downloads/bsd-port/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp:472:
> error: call of overloaded 'movptr(Address, int32_t)' is ambiguous
> /Users/jyeary/Downloads/bsd-port/hotspot/src/cpu/x86/vm/assembler_x86.hpp:2192:
> note: candidates are: void MacroAssembler::movptr(Address, intptr_t)
> /Users/jyeary/Downloads/bsd-port/hotspot/src/cpu/x86/vm/assembler_x86.hpp:2194:
> note:                 void MacroAssembler::movptr(Address, RegisterImpl*)
> /Users/jyeary/Downloads/bsd-port/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp:473:
> error: call of overloaded 'movptr(Address, int32_t)' is ambiguous
> /Users/jyeary/Downloads/bsd-port/hotspot/src/cpu/x86/vm/assembler_x86.hpp:2192:
> note: candidates are: void MacroAssembler::movptr(Address, intptr_t)
> /Users/jyeary/Downloads/bsd-port/hotspot/src/cpu/x86/vm/assembler_x86.hpp:2194:
> note:                 void MacroAssembler::movptr(Address, RegisterImpl*)
>
> It is indicating that the method call is ambiguous. I tried altering the
> code, but it had no effect. I am wondering if this is a bug that should be
> reported. Please let me know if anyone has any ideas.
>
> The other item I had noted from Jeff Sinclair's blog (
> http://www.cooljeff.co.uk/tag/openjdk/ ) was that the gcc.make file needs to
> have WARNINGS_ARE_ERRORS = -Werror  line commented out. This allowed the
> program to compile to this point.
>
> Here is my build.sh
>
> #!/bin/bash
> unset CLASSPATH
> unset JAVA_HOME
> env \-i PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin \
>  CC=gcc-4.2 \
>  CXX=g++-4.2 \
>  LANG=C \
>  make \
>  ALT_BOOTDIR=/usr/local/soylatte16-i386-1.0.3/ \
>  ALT_FREETYPE_HEADERS_PATH=/usr/X11R6/include \
>  ALT_FREETYPE_LIB_PATH=/usr/X11R6/lib \
>  ALT_CUPS_HEADERS_PATH=/usr/include \
>  ALLOW_DOWNLOADS=true \
>  ANT_HOME=/usr/share/ant \
>  NO_DOCS=true \
>  HOTSPOT_BUILD_JOBS=1
>
>
> --
> John Yeary
> --
> http://javaevangelist.blogspot.com
>
> "Far better it is to dare mighty things, to win glorious triumphs, even
> though checkered by failure, than to take rank with those poor spirits who
> neither enjoy much nor suffer much, because they live in the gray twilight
> that knows not victory nor defeat."
> -- Theodore Roosevelt
>
>
>
>



More information about the bsd-port-dev mailing list