Problems building OpenJDK7 with InvokeDynamic on OSX

Ben Evans benjamin.john.evans at googlemail.com
Sun Dec 7 04:40:35 PST 2008


On Sat, Dec 6, 2008 at 12:47 PM, Ben Evans <
benjamin.john.evans at googlemail.com> wrote:

> On Fri, Dec 5, 2008 at 9:32 PM, Charles Oliver Nutter <
> charles.nutter at sun.com> wrote:
>
>> Ben Evans wrote:
>> > OK, so I have 2 separate source trees, one which is b38, which does not
>> > have bsd-specific source in it, and one which is b33 with bsd ported
>> code.
>> >
>> > So, essentially I'm trying to apply the patches from b38 to a b33 tree.
>> > Is this a wise thing to do, or should I be asking if anyone else on the
>> > bsd-port-dev group has got a more up to date code tree building on OS X?
>>
>> I'm in the same boat as you. I tried a few different ways to get the
>> MLVM patches to apply to the BSD ported OpenJDK and simply couldn't make
>> it go. There's files that don't exist or have moved, and significant
>> changes to many others.
>
>
> OK, I've got the latest bsd-port, and am trying to apply the patches -
> which are failing.
>

I think I'm making some progress.

I've got the latest bsd-port code, and I think I can make the patches apply.
I get these failures:

patching file src/share/vm/utilities/array.hpp
Hunk #1 FAILED at 39
Hunk #2 FAILED at 110
Hunk #3 FAILED at 156
Hunk #4 FAILED at 234
4 out of 4 hunks FAILED -- saving rejects to file
src/share/vm/utilities/array.hpp.rej
patching file src/share/vm/utilities/debug.cpp
Hunk #1 FAILED at 566
Hunk #2 FAILED at 594
Hunk #3 FAILED at 620
Hunk #4 FAILED at 658
4 out of 4 hunks FAILED -- saving rejects to file
src/share/vm/utilities/debug.cpp.rej
patching file src/share/vm/utilities/growableArray.hpp
Hunk #1 FAILED at 110
Hunk #2 FAILED at 120
Hunk #3 FAILED at 158
3 out of 3 hunks FAILED -- saving rejects to file
src/share/vm/utilities/growableArray.hpp.rej
patching file src/share/vm/utilities/hashtable.cpp
Hunk #1 FAILED at 42
Hunk #2 FAILED at 52
2 out of 2 hunks FAILED -- saving rejects to file
src/share/vm/utilities/hashtable.cpp.rej
patch failed to apply

But on examining those .rej files and the source trees, it seems that those
patch hunks have already been applied in the bsd-port code, so I don't think
they need to be re-applied by the patch.

I'm trying to build via:

make ALT_JDK_IMPORT_PATH=/usr/local/soylatte16-i386-1.0.3
ALT_BOOTDIR=/usr/local/soylatte16-i386-1.0.3
ALT_BINARY_PLUGS_PATH=$HOME/jdk-7-icedtea-plugs
ALT_FREETYPE_HEADERS_PATH=/usr/X11R6/include
ALT_FREETYPE_LIB_PATH=/usr/X11R6/lib ALT_CUPS_HEADERS_PATH=/usr/include
ANT_HOME=/usr/share/ant NO_DOCS=true HOTSPOT_BUILD_JOBS=1

and the build starts and gets a certain way through. The currently-failing
compile is:

g++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DIA32 -DPRODUCT -I.
-I../generated/adfiles -I../generated/jvmtifiles
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/asm
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/c1
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/ci
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/classfile
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/code
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/compiler
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/gc_implementation
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/gc_implementation/g1
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/gc_implementation/parallelScavenge
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/gc_implementation/parNew
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/gc_implementation/shared
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/gc_interface
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/interpreter
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/libadt
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/memory
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/oops
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/opto
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/prims
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/runtime
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/services
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/utilities
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/cpu/x86/vm
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/os/bsd/vm
-I/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/os_cpu/bsd_x86/vm
-I../generated -DHOTSPOT_RELEASE_VERSION="\"14.0-b08\""
-DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"boxcat\""
-DHOTSPOT_LIB_ARCH=\"i386\"
-DJRE_RELEASE_VERSION="\"1.7.0-internal-boxcat_2008_12_07_12_22-b00\""
-DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -DCOMPILER2 -DCOMPILER1 -fPIC -fno-rtti
-fno-exceptions -pthread -fcheck-new -m32 -march=i586 -mstackrealign -pipe
-O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN  -Wpointer-arith -Wconversion
-Wsign-compare    -c -x c++-header -c ../generated/incls/_precompiled.incl
-o incls/_precompiled.incl.gch
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/runtime/globals_extension.hpp:78:
error: redefinition of 'Flag_AnonymousClasses'
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/runtime/globals_extension.hpp:78:
error: 'Flag_AnonymousClasses' previously defined here
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/runtime/globals_extension.hpp:144:
error: redefinition of 'Flag_AnonymousClasses_bool'
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/runtime/globals_extension.hpp:144:
error: 'Flag_AnonymousClasses_bool' previously defined here
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/oops/constantPoolOop.hpp:63:
error: multiple definition of 'enum constantPoolOopDesc::FlagBit'
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/oops/constantPoolOop.hpp:53:
error: previous definition here
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/oops/constantPoolOop.hpp:64:
error: declaration of 'FB_has_pseudo_string'
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/oops/constantPoolOop.hpp:54:
error: conflicts with previous declaration 'constantPoolOopDesc::FlagBit
constantPoolOopDesc::FB_has_pseudo_string'
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/oops/constantPoolOop.hpp:67:
error: 'int constantPoolOopDesc::flags() const' and 'int
constantPoolOopDesc::flags() const' cannot be overloaded
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/oops/constantPoolOop.hpp:68:
error: 'void constantPoolOopDesc::set_flags(int)' and 'void
constantPoolOopDesc::set_flags(int)' cannot be overloaded
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/oops/constantPoolOop.hpp:69:
error: 'bool constantPoolOopDesc::flag_at(constantPoolOopDesc::FlagBit)
const' and 'bool constantPoolOopDesc::flag_at(constantPoolOopDesc::FlagBit)
const' cannot be overloaded
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/oops/constantPoolOop.hpp:70:
error: 'void constantPoolOopDesc::set_flag_at(constantPoolOopDesc::FlagBit)'
and 'void constantPoolOopDesc::set_flag_at(constantPoolOopDesc::FlagBit)'
cannot be overloaded
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/oops/constantPoolOop.hpp:109:
error: 'bool constantPoolOopDesc::has_pseudo_string() const' and 'bool
constantPoolOopDesc::has_pseudo_string() const' cannot be overloaded
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/oops/constantPoolOop.hpp:110:
error: 'void constantPoolOopDesc::set_pseudo_string()' and 'void
constantPoolOopDesc::set_pseudo_string()' cannot be overloaded
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/oops/constantPoolOop.hpp:330:
error: 'bool constantPoolOopDesc::is_pseudo_string_at(int)' and 'bool
constantPoolOopDesc::is_pseudo_string_at(int)' cannot be overloaded
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/oops/constantPoolOop.hpp:332:
error: 'oopDesc* constantPoolOopDesc::pseudo_string_at(int)' and 'oopDesc*
constantPoolOopDesc::pseudo_string_at(int)' cannot be overloaded
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/oops/constantPoolOop.hpp:337:
error: 'void constantPoolOopDesc::pseudo_string_at_put(int, oopDesc*)' and
'void constantPoolOopDesc::pseudo_string_at_put(int, oopDesc*)' cannot be
overloaded
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/oops/instanceKlass.hpp:388:
error: 'oopDesc* instanceKlass::host_klass() const' and 'oopDesc*
instanceKlass::host_klass() const' cannot be overloaded
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/oops/instanceKlass.hpp:389:
error: 'void instanceKlass::set_host_klass(oopDesc*)' and 'void
instanceKlass::set_host_klass(oopDesc*)' cannot be overloaded
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/oops/instanceKlass.hpp:390:
error: 'bool instanceKlass::is_anonymous() const' and 'bool
instanceKlass::is_anonymous() const' cannot be overloaded
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/classfile/classFileParser.hpp:236:
error: 'bool ClassFileParser::has_cp_patch_at(int)' and 'bool
ClassFileParser::has_cp_patch_at(int)' cannot be overloaded
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/classfile/classFileParser.hpp:243:
error: 'Handle ClassFileParser::cp_patch_at(int)' and 'Handle
ClassFileParser::cp_patch_at(int)' cannot be overloaded
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/classfile/classFileParser.hpp:247:
error: 'Handle ClassFileParser::clear_cp_patch_at(int)' and 'Handle
ClassFileParser::clear_cp_patch_at(int)' cannot be overloaded
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/classfile/classFileParser.hpp:253:
error: 'void ClassFileParser::patch_constant_pool(constantPoolHandle, int,
Handle, Thread*)' and 'void
ClassFileParser::patch_constant_pool(constantPoolHandle, int, Handle,
Thread*)' cannot be overloaded
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/classfile/classFileParser.hpp:259:
error: 'bool ClassFileParser::is_klass_reference(constantPoolHandle, int)'
and 'bool ClassFileParser::is_klass_reference(constantPoolHandle, int)'
cannot be overloaded
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/share/vm/classfile/classFileParser.hpp:296:
error: 'instanceKlassHandle ClassFileParser::parseClassFile(symbolHandle,
Handle, Handle, GrowableArray<Handle>*, symbolHandle&, Thread*)' and
'instanceKlassHandle ClassFileParser::parseClassFile(symbolHandle, Handle,
Handle, GrowableArray<Handle>*, symbolHandle&, Thread*)' cannot be
overloaded
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/cpu/x86/vm/interp_masm_x86_32.hpp:
In member function 'void
InterpreterMacroAssembler::empty_expression_stack()':
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/cpu/x86/vm/interp_masm_x86_32.hpp:123:
error: call of overloaded 'movptr(Address, int)' is ambiguous
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/cpu/x86/vm/assembler_x86.hpp:2099:
note: candidates are: void MacroAssembler::movptr(Address, intptr_t)
/Users/boxcat/projects/jdk7-b40-bsd/sources/hotspot/src/cpu/x86/vm/assembler_x86.hpp:2101:
note:                 void MacroAssembler::movptr(Address, RegisterImpl*)
make[6]: *** [incls/_precompiled.incl.gch] Error 1
make[5]: *** [the_vm] Error 2
make[4]: *** [product] Error 2
make[3]: *** [generic_build2] Error 2
make[2]: *** [product] Error 2
make[1]: *** [hotspot-build] Error 2
make: *** [build_product_image] Error 2
CatBasket:sources boxcat$

I'm a bit out of my depth here, and someone should definitely check my
assertion that the patches to array.hpp, debug.cpp, etc really don't need to
be applied against the bsd-port tree.

I'm going to post this same compile fail to the bsd-port-dev list as well -
anyone else got any ideas?

Thanks,

Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20081207/ad354b9a/attachment.html 


More information about the mlvm-dev mailing list