ios build fails

Grigory Ptashko grigory.ptashko at gmail.com
Tue Mar 15 10:41:20 UTC 2016


Sorry for the mess. I didn’t do get_sources.sh to get all the updated sources.

Now the build succeeds.

Thank you.

> On 15 марта 2016 г., at 13:04, gary.adams at oracle.com wrote:
> 
> The jdk GenSrcMisc.gmk make file is the place where SocketOptionRegistry and UnixConstants java files are created,
> For cross compilation a template file is dropped into place. When a platform specific template is not found
> the genSocketOptionRegistry.c is compiled and run locally. The error below is caused by attempting to compile aarch64
> to run on x86_64.
> 
> 
> In file included from /Users/macbook/work/ios-java-mobile-dev/jdk/make/src/native/genconstants/ch/genSocketOptionRegistry.c:26:
> In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/stdio.h:64:
> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/cdefs.h:707:2: error: Unsupported architecture
> #error Unsupported architecture
> 
> 
> Here''s the changeset that added the aarch64 template files when the platform arch was corrected.
> Make sure these new files are in your repos.
> 
>  http://hg.openjdk.java.net/mobile/dev/jdk/rev/8b5486043132
> 
> I'll try some further testing when I'm in the office.
> 
> On 3/15/16 5:14 AM, Grigory Ptashko wrote:
>> Hello.
>> 
>> First, I’ll say that before the latest update I was able to build the openjdk9 for ios i386, x86_64 and arm64
>> and ran it on my device.
>> Then I made hg pull -u.
>> 
>> My source tree is up to date:
>> 
>> macbook at terminalx ~/work/ios-java-mobile-dev $ hg pull -u
>> pulling from http://hg.openjdk.java.net/mobile/dev
>> searching for changes
>> no changes found
>> 
>> I deleted the build dir and made "make clean”
>> 
>> Here’s the configure options I use for ios arm64:
>> 
>> bash configure \
>> --enable-option-checking=fatal \
>> --openjdk-target=aarch64-macos-ios \
>> --disable-warnings-as-errors \
>> --disable-headful \
>> --with-boot-jdk=/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home \
>> --with-jdk-variant=normal \
>> --with-jvm-variants=zero \
>> --enable-static-build=yes \
>> --with-libffi-include=$HOME/work/local-install/libffi-arm64/lib/libffi-3.2.1/include \
>> --with-libffi-lib=$HOME/work/local-install/libffi-arm64/lib \
>> --with-extra-cflags="-arch arm64 -Wno-implicit-function-declaration -Wno-unused-parameter -miphoneos-version-min=8.0.0" \
>> --with-extra-cxxflags="-arch arm64 -Wno-implicit-function-declaration -Wno-unused-parameter -miphoneos-version-min=8.0.0" \
>> --with-extra-ldflags="-arch arm64 -miphoneos-version-min=8.0.0 -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/system" \
>> --with-cups-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include \
>> --with-sys-root=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk \
>> --with-tools-dir=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin \
>> --with-debug-level=release \
>> --disable-precompiled-headers \
>> --with-freetype-lib=$FREETYPE_DIR/lib \
>> --disable-javac-server \
>> --without-x \
>> --without-alsa \
>> --without-dxsdk \
>> --with-freetype-lib=$HOME/work/local-install/freetype2.6.2-arm64/lib \
>> --with-freetype-include=$HOME/work/local-install/freetype2.6.2-arm64/include/freetype2
>> 
>> And then the build fails:
>> 
>> macbook at terminalx ~/work/ios-java-mobile-dev $ make
>> Compiling 5 files for BUILD_GENMODULESLIST
>> Building target 'default' in configuration 'ios-aarch64-normal-zero-release'
>> Compiling 8 files for BUILD_TOOLS_LANGTOOLS
>> Parsing 1 properties into enum-like class for jdk.compiler
>> Compiling 19 properties into resource bundles for jdk.javadoc
>> Compiling 9 properties into resource bundles for jdk.jdeps
>> Compiling 16 properties into resource bundles for jdk.compiler
>> Compiling 1 properties into resource bundles for jdk.jshell
>> Compiling 1029 files for BUILD_INTERIM_LANGTOOLS
>> Creating buildtools/interim_langtools.jar
>> Compiling 43 files for BUILD_INTERIM_JIMAGE
>> Compiling 141 files for BUILD_IDLJ
>> Compiling 6 files for BUILD_TOOLS_CORBA
>> Compiling 198 files for BUILD_INTERIM_RMIC
>> Compiling 163 files for BUILD_TOOLS_JDK
>> Note: /Users/macbook/work/ios-java-mobile-dev/corba/src/java.corba/share/classes/com/sun/tools/corba/se/idl/som/idlemit/MetaPragma.java uses or overrides a deprecated API.
>> Note: Recompile with -Xlint:deprecation for details.
>> Note: Some input files use unchecked or unsafe operations.
>> Note: Recompile with -Xlint:unchecked for details.
>> Note: Some input files use unchecked or unsafe operations.
>> Note: Recompile with -Xlint:unchecked for details.
>> Compiling 11 properties into resource bundles for java.logging
>> Compiling 4 files for BUILD_BREAKITERATOR
>> Generating blacklisted certs
>> Compiling 3 properties into resource bundles for jdk.jdi
>> Generating java.security
>> [Parsed DTD html32 in 102ms]
>> Compiling 11 properties into resource bundles for java.management
>> Creating support/jce/policy/unlimited/US_export_policy.jar
>> Creating support/jce/policy/limited/local_policy.jar
>> Creating support/jce/policy/unlimited/local_policy.jar
>> Compiling 2 files for COMPILE_CREATE_SYMBOLS
>> Creating genSocketOptionRegistry from 1 file(s)
>> Creating genUnixConstants from 1 file(s)                                                                                                                                                               [66/1594]
>> Creating ct.sym classes
>> Compiling 11 properties into resource bundles for java.base
>> Compiling 6 properties into resource bundles for java.base
>> In file included from /Users/macbook/work/ios-java-mobile-dev/jdk/make/src/native/genconstants/ch/genSocketOptionRegistry.c:26:
>> In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/stdio.h:64:
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/cdefs.h:707:2: error: Unsupported architecture
>> #error Unsupported architecture
>>  ^
>> In file included from /Users/macbook/work/ios-java-mobile-dev/jdk/make/src/native/genconstants/ch/genSocketOptionRegistry.c:26:
>> In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/stdio.h:67:
>> In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/_types.h:27:
>> In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types.h:33:
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
>> #error architecture not supported
>>  ^
>> In file included from /Users/macbook/work/ios-java-mobile-dev/jdk/make/src/native/genconstants/ch/genSocketOptionRegistry.c:26:
>> In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/stdio.h:67:
>> In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/_types.h:27:
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'; did you mean '__int128_t'?
>> typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
>>         ^
>> note: '__int128_t' declared here
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
>> typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
>>         ^
>> note: '__int128_t' declared here
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
>> typedef __int32_t       __darwin_dev_t;         /* dev_t */
>>         ^
>> note: '__int128_t' declared here
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
>> typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
>>         ^
>> note: '__uint128_t' declared here
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
>> typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
>>         ^
>> note: '__uint128_t' declared here
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'; did you mean '__uint128_t'?
>> typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
>>         ^
>> note: '__uint128_t' declared here
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
>> typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
>>         ^
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'; did you mean '__uint128_t'?
>> typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
>>         ^
>> note: '__uint128_t' declared here
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'; did you mean '__int128_t'?
>> typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
>>         ^
>> note: '__int128_t' declared here
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
>> typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
>>         ^
>> note: '__int128_t' declared here
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
>> typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
>>         ^
>> note: '__uint128_t' declared here
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
>> typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
>>         ^
>> note: '__int128_t' declared here
>> Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
>> typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
>>         ^
>> note: '__uint128_t' declared here
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
>> typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
>>         ^
>> note: '__uint128_t' declared here
>> In file included from /Users/macbook/work/ios-java-mobile-dev/jdk/make/src/native/genconstants/ch/genSocketOptionRegistry.c:26:
>> In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/stdio.h:67:
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/_types.h:42:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
>> typedef __uint32_t      __darwin_wctype_t;
>>         ^
>> note: '__uint128_t' declared here
>> In file included from /Users/macbook/work/ios-java-mobile-dev/jdk/make/src/native/genconstants/ch/genSocketOptionRegistry.c:26:
>> In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/stdio.h:71:
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types/_va_list.h:31:9: error: unknown type name '__darwin_va_list'
>> typedef __darwin_va_list va_list;
>>         ^
>> In file included from /Users/macbook/work/ios-java-mobile-dev/jdk/make/src/native/genconstants/ch/genSocketOptionRegistry.c:26:
>> In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/stdio.h:72:
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types/_size_t.h:30:9: error: unknown type name '__darwin_size_t'
>> typedef __darwin_size_t        size_t;
>>         ^
>> fatal error: too many errors emitted, stopping now [-ferror-limit=]
>> 20 errors generated.
>> make[3]: *** [/Users/macbook/work/ios-java-mobile-dev/build/ios-aarch64-normal-zero-release/buildtools/native/genSocketOptionRegistry/genSocketOptionRegistry.o] Error 1
>> make[2]: *** [java.base-gensrc-jdk] Error 2
>> make[2]: *** Waiting for unfinished jobs....
>> Creating support/symbols/ct.sym
>> 
>> 
>> **NOTICE** Dtrace support disabled for IPHONE builds
>> Linking static vm with libffi ...
>> ar: creating archive libjvm.a
>> Doing vm.make build:
>> All done.
>> Generating bsd_aarch64_docs/jvmti.html
>> 
>> ERROR: Build failed for target 'default' in configuration 'ios-aarch64-normal-zero-release' (exit code 2)
>> === Output from failing command(s) repeated here ===
>> * For target buildtools_native_genSocketOptionRegistry_genSocketOptionRegistry.o:
>> In file included from /Users/macbook/work/ios-java-mobile-dev/jdk/make/src/native/genconstants/ch/genSocketOptionRegistry.c:26:
>> In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/stdio.h:64:
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/cdefs.h:707:2: error: Unsupported architecture
>> #error Unsupported architecture
>>  ^
>> In file included from /Users/macbook/work/ios-java-mobile-dev/jdk/make/src/native/genconstants/ch/genSocketOptionRegistry.c:26:
>> In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/stdio.h:67:
>> In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/_types.h:27:
>> In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/_types.h:33:
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
>> #error architecture not supported
>>  ^
>>    ... (rest of output omitted)
>> === End of repeated output ===
>> No indication of failed target found.
>> Hint: Try searching the build log for '] Error'.
>> Hint: If caused by a warning, try configure --disable-warnings-as-errors.
>> 
>> make[1]: *** [main] Error 2
>> 
>> What happened?
>> 
>> Thank you.
>> 
>> 
>> --
>> Best regards,
>> Grigory Ptashko
>> 
>> +7 (916) 1489766
>> grigory.ptashko at gmail.com
>> facebook.com/GrigoryPtashko
>> 
> 


--
Best regards,
Grigory Ptashko

+7 (916) 1489766
grigory.ptashko at gmail.com
facebook.com/GrigoryPtashko



More information about the mobile-dev mailing list