Current build instructions for iOS
Johan Vos
johan.vos at gluonhq.com
Thu May 10 19:54:48 UTC 2018
As for the linking error: See Gary's mail.
As for the base() error, I modified this:
if (base() > 0) {
into
if (base()) {
and then it works
(in src/share/vm/memory/virtualspace.cpp)
- Johan
On Thu, May 10, 2018 at 7:55 PM Steve Hannah <steve at weblite.ca> wrote:
> At first I got this:
>
> In file included from
> /Users/shannah/tmp/zero/mobile-jdk9/hotspot/src/share/vm/classfile/symbolTable.hpp:30:
>
> /Users/shannah/tmp/zero/mobile-jdk9/hotspot/src/share/vm/utilities/hashtable.hpp:336:50:
> warning: instantiation of variable 'RehashableHashtable<Symbol *,
> MemoryType::mtSymbol>::_seed' required here, but no definition is available
> [-Wundefined-var-template]
>
> static bool use_alternate_hashcode() { return _seed != 0; }
>
> ^
>
> /Users/shannah/tmp/zero/mobile-jdk9/hotspot/src/share/vm/classfile/symbolTable.cpp:110:34:
> note: in instantiation of member function 'RehashableHashtable<Symbol *,
> MemoryType::mtSymbol>::use_alternate_hashcode' requested here
>
> if (entry->is_shared() && !use_alternate_hashcode()) {
>
> ^
>
> /Users/shannah/tmp/zero/mobile-jdk9/hotspot/src/share/vm/utilities/hashtable.hpp:352:16:
> note: forward declaration of template entity is here
>
> static juint _seed;
>
> ^
>
> 1 warning generated.
>
> /Users/shannah/tmp/zero/mobile-jdk9/hotspot/src/share/vm/memory/virtualspace.cpp:584:14:
> error: ordered comparison between pointer and zero ('char *' and 'int')
>
> if (base() > 0) {
>
> ~~~~~~ ^ ~
>
> 1 error generated.
>
>
> I got past this by casting 0 to (char*) on that line.
>
> Then I get this:
>
> Building target 'images' in configuration
> 'ios-x86_64-normal-minimal1-release'
>
> Creating support/modules_libs/java.base/minimal/libjvm.a from 1 file(s)
>
> clang: warning: using sysroot for 'iPhoneSimulator' but targeting 'MacOSX'
> [-Wincompatible-sysroot]
>
> ld: warning: directory not found for option
> '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/JavaVM.framework/Frameworks'
>
> ld: building for OSX, but linking against dylib built for iOS
> (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/libc++.tbd).
> file
> '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/libc++.tbd'
> for architecture x86_64
>
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
>
> make[4]: ***
> [/Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/buildjdk/hotspot/variant-server/tools/adlc/adlc]
> Error 1
>
> make[3]: *** [hotspot-server-gensrc] Error 2
>
> make[2]: *** [create-buildjdk-interim-image] Error 2
>
> make[2]: *** Waiting for unfinished jobs....
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(bytecodeHistogram.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(c1_Defs.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(cppInterpreter.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(cppInterpreterGenerator.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(decoder_elf.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(depChecker_x86.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(dtraceAttacher.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(elfFile.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(elfFuncDescTable.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(elfStringTable.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(elfSymbolTable.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(instanceOop.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(internalVMTests.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(jvmtiTrace.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(objectCountEventSender.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(operator_new.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(register.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(rtmLocking.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(runtimeService.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(sizes.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(stubRoutines_bsd.o)
> has no symbols
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
> file:
> /Users/shannah/tmp/zero/mobile-jdk9/build/ios-x86_64-normal-minimal1-release/support/modules_libs/java.base/minimal/libjvm.a(vm_version_bsd_x86.o)
> has no symbols
>
>
> ERROR: Build failed for target 'images' in configuration
> 'ios-x86_64-normal-minimal1-release' (exit code 2)
>
>
>
> I may just be doing something wrong.
>
> Best regards
>
> Steve
>
> On Thu, May 10, 2018 at 11:51 AM, Gary Adams <gary.adams at oracle.com>
> wrote:
>
>> What errors do you see with a newer toolchain?
>>
>>
>> On 5/10/18, 2:46 PM, Steve Hannah wrote:
>>
>> The current instructions say that Xcode 7.1 is required. Is this still
>> the case? I got errors when building with Xcode 9.3. Trying now with 7.3
>> (as I don't have 7.1 handy).
>>
>> Best regards
>>
>> Steve
>>
>> On Thu, May 10, 2018 at 11:15 AM, Johan Vos <johan.vos at gluonhq.com>
>> wrote:
>>
>>> We'll have to update the wiki indeed.
>>> There is a new repository at http://hg.openjdk.java.net/mobile/jdk that
>>> will hopefully be mobile-ready by Java 11.
>>> I am slowly making progress on applying the 9-patches to the jdk/jdk
>>> tree. There are many changes between the structure of jdk9 and jdk/jdk so
>>> it's not a simple diff/patch.
>>>
>>> We created a github mirror of jdk/jdk which I forked and this is where I
>>> am applying patches (it's WIP):
>>>
>>> https://github.com/javafxports/openjdk-mobile/compare/master...johanvos:master
>>>
>>> - Johan
>>>
>>> On Thu, May 10, 2018 at 6:57 PM Steve Hannah <steve at weblite.ca> wrote:
>>>
>>>> Thanks!
>>>>
>>>> On Thu, May 10, 2018 at 10:44 AM, Gary Adams <gary.adams at oracle.com>
>>>> wrote:
>>>>
>>>> > The mobile/dev repos was moved to mobile/jdk9 two months ago.
>>>> >
>>>> >
>>>> http://mail.openjdk.java.net/pipermail/mobile-dev/2018-March/000485.html
>>>> >
>>>> >
>>>> >
>>>> > On 5/10/18, 1:37 PM, Steve Hannah wrote:
>>>> >
>>>> >> The OpenJDK build instructions for iOS at
>>>> >> http://openjdk.java.net/projects/mobile/ios.html no longer seem to
>>>> be
>>>> >> valid.
>>>> >>
>>>> >> For example, the repository it references (
>>>> >> http://hg.openjdk.java.net/mobile/dev) no longer exists.
>>>> >>
>>>> >> Does anyone know where I can find some up-to-date information on
>>>> building
>>>> >> OpenJDK for iOS?
>>>> >>
>>>> >> Thanks for any help.
>>>> >>
>>>> >> Steve
>>>> >>
>>>> >
>>>> >
>>>>
>>>>
>>
>
>
More information about the mobile-dev
mailing list