From support at sparseway.com Mon Feb 25 13:14:54 2019 From: support at sparseway.com (Sparse Way) Date: Mon, 25 Feb 2019 13:14:54 +0000 Subject: Make Failed Message-ID: Hi, I am building openjdk for android arm using Ubuntu 64 bit, andoid-ndk-r13b Followed the guide at the official page (seems outdated) and applied the workarounds from mailing http://mail.openjdk.java.net/pipermail/mobile-dev/2018-August.txt since encountered same issues. 1. android-ndk-r13b doesn't have dependencies needed to make openjdk like sys/signal.h and types.h, even though i found them in /usr/include but for some reason make cannot find them. 2. Linking them using "ln -s" doesn't completely help either; make hotspot problem was fixed but ended having this error: /media/user/W/mobile-dev/jdk/src/java.base/unix/native/include/bits/byteswap-16.h:31:5: error: invalid 'asm': invalid operand for code 'w' __asm__ ("rorw $8, %w0" \ ^ /media/user/W/mobile-dev/jdk/src/java.base/unix/native/include/netinet/in.h:405:21: note: in expansion of macro '__bswap_16' # define htons(x) __bswap_16 (x) ^ /media/user/W/mobile-dev/jdk/src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c:136:12: note: in expansion of macro 'htons' return htons(hostshort); ^ {standard input}: Assembler messages: {standard input}:424: Error: bad instruction `rorw $8,' make[3]: *** [/media/user/W/mobile-dev/build/android-arm-normal-zero-release/support/native/jdk.jdwp.agent/libdt_socket/socket_md.o] Error 1 make[2]: *** [jdk.jdwp.agent-libs] Error 1 ERROR: Build failed for target 'images' in configuration 'android-arm-normal-zero-release' (exit code 2) ----- Build times ------- Start 2019-02-25 04:34:14 End 2019-02-25 04:34:54 00:00:40 TOTAL ------------------------- Thanks for your time. From gary.adams at oracle.com Mon Feb 25 14:48:00 2019 From: gary.adams at oracle.com (Gary Adams) Date: Mon, 25 Feb 2019 09:48:00 -0500 Subject: Make Failed In-Reply-To: References: Message-ID: <5C74001F.6080500@oracle.com> Which repository are you using? What configure arguments did you use? I don't see this file in the mobile/dev repos. jdk/src/java.base/unix/native/include/bits/byteswap-16.h Which android-xx api are you targetting? Best guess is there is something wrong in locating the sysroot files. On 2/25/19, 8:14 AM, Sparse Way wrote: > Hi, > I am building openjdk for android arm using Ubuntu 64 bit, andoid-ndk-r13b > Followed the guide at the official page (seems outdated) and applied the workarounds from mailing http://mail.openjdk.java.net/pipermail/mobile-dev/2018-August.txt since encountered same issues. > > 1. android-ndk-r13b doesn't have dependencies needed to make openjdk like sys/signal.h and types.h, even though i found them in /usr/include but for some reason make cannot find them. > 2. Linking them using "ln -s" doesn't completely help either; make hotspot problem was fixed but ended having this error: > > /media/user/W/mobile-dev/jdk/src/java.base/unix/native/include/bits/byteswap-16.h:31:5: error: invalid 'asm': invalid operand for code 'w' > __asm__ ("rorw $8, %w0" \ > ^ > /media/user/W/mobile-dev/jdk/src/java.base/unix/native/include/netinet/in.h:405:21: note: in expansion of macro '__bswap_16' > # define htons(x) __bswap_16 (x) > ^ > /media/user/W/mobile-dev/jdk/src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c:136:12: note: in expansion of macro 'htons' > return htons(hostshort); > ^ > {standard input}: Assembler messages: > {standard input}:424: Error: bad instruction `rorw $8,' > make[3]: *** [/media/user/W/mobile-dev/build/android-arm-normal-zero-release/support/native/jdk.jdwp.agent/libdt_socket/socket_md.o] Error 1 > make[2]: *** [jdk.jdwp.agent-libs] Error 1 > > ERROR: Build failed for target 'images' in configuration 'android-arm-normal-zero-release' (exit code 2) > ----- Build times ------- > Start 2019-02-25 04:34:14 > End 2019-02-25 04:34:54 > > 00:00:40 TOTAL > ------------------------- > Thanks for your time. From support at sparseway.com Tue Feb 26 19:27:04 2019 From: support at sparseway.com (Sparse Way) Date: Tue, 26 Feb 2019 19:27:04 +0000 Subject: Java Silent Fail Message-ID: Hello, ./java -Djava.home=/data/app/jre -version Running this on android armv7a doesn't produce any output, the arguments are ignored as replacing them with invalid ones will make no difference. The process exits with value 6, the input stream (process's stdout) is empty. It would be nice to have debug flag or maybe a debug build variant. Error stream buffer: WARNING: linker: ./java: unused DT entry: type 0x6ffffffe arg 0x3a8 WARNING: linker: ./java: unused DT entry: type 0x6fffffff arg 0x2 WARNING: linker: libjli.so: unused DT entry: type 0x6ffffffe arg 0xf00 WARNING: linker: libjli.so: unused DT entry: type 0x6fffffff arg 0x2 WARNING: linker: ./java: unused DT entry: type 0x6ffffffe arg 0x3a8 WARNING: linker: ./java: unused DT entry: type 0x6fffffff arg 0x2 WARNING: linker: libjli.so: unused DT entry: type 0x6ffffffe arg 0xf00 WARNING: linker: libjli.so: unused DT entry: type 0x6fffffff arg 0x2 WARNING: linker: libjvm.so: unused DT entry: type 0x6ffffffe arg 0x472c WARNING: linker: libjvm.so: unused DT entry: type 0x6fffffff arg 0x3 Back bash configure produced warning which I ignored: The following warnings were produced. Repeated here for convenience: WARNING: using cross tools not prefixed with host triplet WARNING: Unknown autoconf target triplet ABI: "androideabi" Plus I am not sure if using arm-linux-gnueabihf for arm build is obligatory so didn't use it. From gary.adams at oracle.com Tue Feb 26 19:50:46 2019 From: gary.adams at oracle.com (Gary Adams) Date: Tue, 26 Feb 2019 14:50:46 -0500 Subject: Java Silent Fail In-Reply-To: References: Message-ID: <5C759896.3000000@oracle.com> Don't worry about the "unused DT entry" warnings. Those are just VERNEED entries in the libraries, that are not used on android. I presume the executable and libraries are installed OK, since the warnings below indicate they were found. I assume the target android api is compatible with the runtime device or emulator you are using. Note that the use of java on the command line (adb shell) is just a smoke test that the build was complete. The real test of the libraries is when they've been incorporated in an apk and installed as an app. On 2/26/19, 2:27 PM, Sparse Way wrote: > Hello, > > ./java -Djava.home=/data/app/jre -version > > Running this on android armv7a doesn't produce any output, the arguments are ignored as replacing them with invalid ones will make no difference. > The process exits with value 6, the input stream (process's stdout) is empty. > > It would be nice to have debug flag or maybe a debug build variant. > > Error stream buffer: > WARNING: linker: ./java: unused DT entry: type 0x6ffffffe arg 0x3a8 > WARNING: linker: ./java: unused DT entry: type 0x6fffffff arg 0x2 > WARNING: linker: libjli.so: unused DT entry: type 0x6ffffffe arg 0xf00 > WARNING: linker: libjli.so: unused DT entry: type 0x6fffffff arg 0x2 > WARNING: linker: ./java: unused DT entry: type 0x6ffffffe arg 0x3a8 > WARNING: linker: ./java: unused DT entry: type 0x6fffffff arg 0x2 > WARNING: linker: libjli.so: unused DT entry: type 0x6ffffffe arg 0xf00 > WARNING: linker: libjli.so: unused DT entry: type 0x6fffffff arg 0x2 > WARNING: linker: libjvm.so: unused DT entry: type 0x6ffffffe arg 0x472c > WARNING: linker: libjvm.so: unused DT entry: type 0x6fffffff arg 0x3 > > Back bash configure produced warning which I ignored: > > The following warnings were produced. Repeated here for convenience: > WARNING: using cross tools not prefixed with host triplet > WARNING: Unknown autoconf target triplet ABI: "androideabi" > > Plus I am not sure if using arm-linux-gnueabihf for arm build is obligatory so didn't use it. From bob.vandette at oracle.com Tue Feb 26 19:57:07 2019 From: bob.vandette at oracle.com (Bob Vandette) Date: Tue, 26 Feb 2019 14:57:07 -0500 Subject: Java Silent Fail In-Reply-To: <5C759896.3000000@oracle.com> References: <5C759896.3000000@oracle.com> Message-ID: <917F37E0-9335-4066-BE87-088EC28CA8E6@oracle.com> To run on the command line, I used to have to set the LD_LIBRARY_PATH environment variable to the paths containing the shared libraries. export LD_LIBRARY_PATH=/data/app/jre/lib/arm:/data/app/jre/lib/arm/jli:/data/app/jre/lib/arm/{minimal or client} Bob. > On Feb 26, 2019, at 2:50 PM, Gary Adams wrote: > > Don't worry about the "unused DT entry" warnings. > Those are just VERNEED entries in the libraries, > that are not used on android. > > I presume the executable and libraries are installed OK, > since the warnings below indicate they were found. > > I assume the target android api is compatible with the > runtime device or emulator you are using. > > Note that the use of java on the command line (adb shell) > is just a smoke test that the build was complete. > The real test of the libraries is when they've been > incorporated in an apk and installed as an app. > > > On 2/26/19, 2:27 PM, Sparse Way wrote: >> Hello, >> >> ./java -Djava.home=/data/app/jre -version >> >> Running this on android armv7a doesn't produce any output, the arguments are ignored as replacing them with invalid ones will make no difference. >> The process exits with value 6, the input stream (process's stdout) is empty. >> >> It would be nice to have debug flag or maybe a debug build variant. >> >> Error stream buffer: >> WARNING: linker: ./java: unused DT entry: type 0x6ffffffe arg 0x3a8 >> WARNING: linker: ./java: unused DT entry: type 0x6fffffff arg 0x2 >> WARNING: linker: libjli.so: unused DT entry: type 0x6ffffffe arg 0xf00 >> WARNING: linker: libjli.so: unused DT entry: type 0x6fffffff arg 0x2 >> WARNING: linker: ./java: unused DT entry: type 0x6ffffffe arg 0x3a8 >> WARNING: linker: ./java: unused DT entry: type 0x6fffffff arg 0x2 >> WARNING: linker: libjli.so: unused DT entry: type 0x6ffffffe arg 0xf00 >> WARNING: linker: libjli.so: unused DT entry: type 0x6fffffff arg 0x2 >> WARNING: linker: libjvm.so: unused DT entry: type 0x6ffffffe arg 0x472c >> WARNING: linker: libjvm.so: unused DT entry: type 0x6fffffff arg 0x3 >> >> Back bash configure produced warning which I ignored: >> >> The following warnings were produced. Repeated here for convenience: >> WARNING: using cross tools not prefixed with host triplet >> WARNING: Unknown autoconf target triplet ABI: "androideabi" >> >> Plus I am not sure if using arm-linux-gnueabihf for arm build is obligatory so didn't use it. > From support at sparseway.com Tue Feb 26 20:30:36 2019 From: support at sparseway.com (Sparse Way) Date: Tue, 26 Feb 2019 20:30:36 +0000 Subject: Java Silent Fail In-Reply-To: <917F37E0-9335-4066-BE87-088EC28CA8E6@oracle.com> References: <5C759896.3000000@oracle.com>, <917F37E0-9335-4066-BE87-088EC28CA8E6@oracle.com> Message-ID: Already set paths after they were reported missing. When invoking ./java from process within the application, it ignores any arguments returning 6 as an exit value. I've missed the CFLAG -fPIE -pie, maybe that's the issue. ________________________________ From: Bob Vandette Sent: Tuesday, February 26, 2019 9:57 PM To: gary.adams at oracle.com Cc: Sparse Way; mobile-dev at openjdk.java.net Subject: Re: Java Silent Fail To run on the command line, I used to have to set the LD_LIBRARY_PATH environment variable to the paths containing the shared libraries. export LD_LIBRARY_PATH=/data/app/jre/lib/arm:/data/app/jre/lib/arm/jli:/data/app/jre/lib/arm/{minimal or client} Bob. > On Feb 26, 2019, at 2:50 PM, Gary Adams wrote: > > Don't worry about the "unused DT entry" warnings. > Those are just VERNEED entries in the libraries, > that are not used on android. > > I presume the executable and libraries are installed OK, > since the warnings below indicate they were found. > > I assume the target android api is compatible with the > runtime device or emulator you are using. > > Note that the use of java on the command line (adb shell) > is just a smoke test that the build was complete. > The real test of the libraries is when they've been > incorporated in an apk and installed as an app. > > > On 2/26/19, 2:27 PM, Sparse Way wrote: >> Hello, >> >> ./java -Djava.home=/data/app/jre -version >> >> Running this on android armv7a doesn't produce any output, the arguments are ignored as replacing them with invalid ones will make no difference. >> The process exits with value 6, the input stream (process's stdout) is empty. >> >> It would be nice to have debug flag or maybe a debug build variant. >> >> Error stream buffer: >> WARNING: linker: ./java: unused DT entry: type 0x6ffffffe arg 0x3a8 >> WARNING: linker: ./java: unused DT entry: type 0x6fffffff arg 0x2 >> WARNING: linker: libjli.so: unused DT entry: type 0x6ffffffe arg 0xf00 >> WARNING: linker: libjli.so: unused DT entry: type 0x6fffffff arg 0x2 >> WARNING: linker: ./java: unused DT entry: type 0x6ffffffe arg 0x3a8 >> WARNING: linker: ./java: unused DT entry: type 0x6fffffff arg 0x2 >> WARNING: linker: libjli.so: unused DT entry: type 0x6ffffffe arg 0xf00 >> WARNING: linker: libjli.so: unused DT entry: type 0x6fffffff arg 0x2 >> WARNING: linker: libjvm.so: unused DT entry: type 0x6ffffffe arg 0x472c >> WARNING: linker: libjvm.so: unused DT entry: type 0x6fffffff arg 0x3 >> >> Back bash configure produced warning which I ignored: >> >> The following warnings were produced. Repeated here for convenience: >> WARNING: using cross tools not prefixed with host triplet >> WARNING: Unknown autoconf target triplet ABI: "androideabi" >> >> Plus I am not sure if using arm-linux-gnueabihf for arm build is obligatory so didn't use it. > From support at sparseway.com Tue Feb 26 20:33:59 2019 From: support at sparseway.com (Sparse Way) Date: Tue, 26 Feb 2019 20:33:59 +0000 Subject: Java Silent Fail In-Reply-To: References: <5C759896.3000000@oracle.com>, <917F37E0-9335-4066-BE87-088EC28CA8E6@oracle.com>, Message-ID: Testing on api 22 device, build minimum api is 19. ________________________________ From: Sparse Way Sent: Tuesday, February 26, 2019 10:30 PM To: Bob Vandette; gary.adams at oracle.com Cc: mobile-dev at openjdk.java.net Subject: Re: Java Silent Fail Already set paths after they were reported missing. When invoking ./java from process within the application, it ignores any arguments returning 6 as an exit value. I've missed the CFLAG -fPIE -pie, maybe that's the issue. ________________________________ From: Bob Vandette Sent: Tuesday, February 26, 2019 9:57 PM To: gary.adams at oracle.com Cc: Sparse Way; mobile-dev at openjdk.java.net Subject: Re: Java Silent Fail To run on the command line, I used to have to set the LD_LIBRARY_PATH environment variable to the paths containing the shared libraries. export LD_LIBRARY_PATH=/data/app/jre/lib/arm:/data/app/jre/lib/arm/jli:/data/app/jre/lib/arm/{minimal or client} Bob. > On Feb 26, 2019, at 2:50 PM, Gary Adams wrote: > > Don't worry about the "unused DT entry" warnings. > Those are just VERNEED entries in the libraries, > that are not used on android. > > I presume the executable and libraries are installed OK, > since the warnings below indicate they were found. > > I assume the target android api is compatible with the > runtime device or emulator you are using. > > Note that the use of java on the command line (adb shell) > is just a smoke test that the build was complete. > The real test of the libraries is when they've been > incorporated in an apk and installed as an app. > > > On 2/26/19, 2:27 PM, Sparse Way wrote: >> Hello, >> >> ./java -Djava.home=/data/app/jre -version >> >> Running this on android armv7a doesn't produce any output, the arguments are ignored as replacing them with invalid ones will make no difference. >> The process exits with value 6, the input stream (process's stdout) is empty. >> >> It would be nice to have debug flag or maybe a debug build variant. >> >> Error stream buffer: >> WARNING: linker: ./java: unused DT entry: type 0x6ffffffe arg 0x3a8 >> WARNING: linker: ./java: unused DT entry: type 0x6fffffff arg 0x2 >> WARNING: linker: libjli.so: unused DT entry: type 0x6ffffffe arg 0xf00 >> WARNING: linker: libjli.so: unused DT entry: type 0x6fffffff arg 0x2 >> WARNING: linker: ./java: unused DT entry: type 0x6ffffffe arg 0x3a8 >> WARNING: linker: ./java: unused DT entry: type 0x6fffffff arg 0x2 >> WARNING: linker: libjli.so: unused DT entry: type 0x6ffffffe arg 0xf00 >> WARNING: linker: libjli.so: unused DT entry: type 0x6fffffff arg 0x2 >> WARNING: linker: libjvm.so: unused DT entry: type 0x6ffffffe arg 0x472c >> WARNING: linker: libjvm.so: unused DT entry: type 0x6fffffff arg 0x3 >> >> Back bash configure produced warning which I ignored: >> >> The following warnings were produced. Repeated here for convenience: >> WARNING: using cross tools not prefixed with host triplet >> WARNING: Unknown autoconf target triplet ABI: "androideabi" >> >> Plus I am not sure if using arm-linux-gnueabihf for arm build is obligatory so didn't use it. > From support at sparseway.com Tue Feb 26 21:50:05 2019 From: support at sparseway.com (Sparse Way) Date: Tue, 26 Feb 2019 21:50:05 +0000 Subject: Java Silent Fail In-Reply-To: References: <5C759896.3000000@oracle.com>, <917F37E0-9335-4066-BE87-088EC28CA8E6@oracle.com>, , Message-ID: Nothing changes using -fPIE -pie flags, still the process's output stream is empty. Snippet used to make process: ProcessBuilder pb = new ProcessBuilder("./java", "-Djava.home=" + jre, "-version"); Map env = pb.environment(); env.put("LD_LIBRARY_PATH", jre + "/lib/jli:" + jre + "/lib:" + jre + "/lib/server:$LD_LIBRARY_PATH"); pb.directory(new File(jre + "/bin")); Process process = pb.start(); process.waitFor(); ________________________________ From: Sparse Way Sent: Tuesday, February 26, 2019 10:33 PM To: Bob Vandette; gary.adams at oracle.com Cc: mobile-dev at openjdk.java.net Subject: Re: Java Silent Fail Testing on api 22 device, build minimum api is 19. ________________________________ From: Sparse Way Sent: Tuesday, February 26, 2019 10:30 PM To: Bob Vandette; gary.adams at oracle.com Cc: mobile-dev at openjdk.java.net Subject: Re: Java Silent Fail Already set paths after they were reported missing. When invoking ./java from process within the application, it ignores any arguments returning 6 as an exit value. I've missed the CFLAG -fPIE -pie, maybe that's the issue. ________________________________ From: Bob Vandette Sent: Tuesday, February 26, 2019 9:57 PM To: gary.adams at oracle.com Cc: Sparse Way; mobile-dev at openjdk.java.net Subject: Re: Java Silent Fail To run on the command line, I used to have to set the LD_LIBRARY_PATH environment variable to the paths containing the shared libraries. export LD_LIBRARY_PATH=/data/app/jre/lib/arm:/data/app/jre/lib/arm/jli:/data/app/jre/lib/arm/{minimal or client} Bob. > On Feb 26, 2019, at 2:50 PM, Gary Adams wrote: > > Don't worry about the "unused DT entry" warnings. > Those are just VERNEED entries in the libraries, > that are not used on android. > > I presume the executable and libraries are installed OK, > since the warnings below indicate they were found. > > I assume the target android api is compatible with the > runtime device or emulator you are using. > > Note that the use of java on the command line (adb shell) > is just a smoke test that the build was complete. > The real test of the libraries is when they've been > incorporated in an apk and installed as an app. > > > On 2/26/19, 2:27 PM, Sparse Way wrote: >> Hello, >> >> ./java -Djava.home=/data/app/jre -version >> >> Running this on android armv7a doesn't produce any output, the arguments are ignored as replacing them with invalid ones will make no difference. >> The process exits with value 6, the input stream (process's stdout) is empty. >> >> It would be nice to have debug flag or maybe a debug build variant. >> >> Error stream buffer: >> WARNING: linker: ./java: unused DT entry: type 0x6ffffffe arg 0x3a8 >> WARNING: linker: ./java: unused DT entry: type 0x6fffffff arg 0x2 >> WARNING: linker: libjli.so: unused DT entry: type 0x6ffffffe arg 0xf00 >> WARNING: linker: libjli.so: unused DT entry: type 0x6fffffff arg 0x2 >> WARNING: linker: ./java: unused DT entry: type 0x6ffffffe arg 0x3a8 >> WARNING: linker: ./java: unused DT entry: type 0x6fffffff arg 0x2 >> WARNING: linker: libjli.so: unused DT entry: type 0x6ffffffe arg 0xf00 >> WARNING: linker: libjli.so: unused DT entry: type 0x6fffffff arg 0x2 >> WARNING: linker: libjvm.so: unused DT entry: type 0x6ffffffe arg 0x472c >> WARNING: linker: libjvm.so: unused DT entry: type 0x6fffffff arg 0x3 >> >> Back bash configure produced warning which I ignored: >> >> The following warnings were produced. Repeated here for convenience: >> WARNING: using cross tools not prefixed with host triplet >> WARNING: Unknown autoconf target triplet ABI: "androideabi" >> >> Plus I am not sure if using arm-linux-gnueabihf for arm build is obligatory so didn't use it. > From support at sparseway.com Wed Feb 27 14:20:36 2019 From: support at sparseway.com (Sparse Way) Date: Wed, 27 Feb 2019 14:20:36 +0000 Subject: Java Silent Fail In-Reply-To: References: <5C759896.3000000@oracle.com>, <917F37E0-9335-4066-BE87-088EC28CA8E6@oracle.com>, , , Message-ID: The signal SIGABRT was the only clue received from jvm, it indicates memory corruption. Will make a new fresh build. Which repository is mainstream https://hg.openjdk.java.net/mobile/jdk9/ or https://hg.openjdk.java.net/mobile/jdk/ and latest recommended build for production use? Is it okay to ignore the jdk image and just use jre? ________________________________ From: mobile-dev on behalf of Sparse Way Sent: Tuesday, February 26, 2019 11:50 PM To: Bob Vandette; gary.adams at oracle.com Cc: mobile-dev at openjdk.java.net Subject: Re: Java Silent Fail Nothing changes using -fPIE -pie flags, still the process's output stream is empty. Snippet used to make process: ProcessBuilder pb = new ProcessBuilder("./java", "-Djava.home=" + jre, "-version"); Map env = pb.environment(); env.put("LD_LIBRARY_PATH", jre + "/lib/jli:" + jre + "/lib:" + jre + "/lib/server:$LD_LIBRARY_PATH"); pb.directory(new File(jre + "/bin")); Process process = pb.start(); process.waitFor(); ________________________________ From: Sparse Way Sent: Tuesday, February 26, 2019 10:33 PM To: Bob Vandette; gary.adams at oracle.com Cc: mobile-dev at openjdk.java.net Subject: Re: Java Silent Fail Testing on api 22 device, build minimum api is 19. ________________________________ From: Sparse Way Sent: Tuesday, February 26, 2019 10:30 PM To: Bob Vandette; gary.adams at oracle.com Cc: mobile-dev at openjdk.java.net Subject: Re: Java Silent Fail Already set paths after they were reported missing. When invoking ./java from process within the application, it ignores any arguments returning 6 as an exit value. I've missed the CFLAG -fPIE -pie, maybe that's the issue. ________________________________ From: Bob Vandette Sent: Tuesday, February 26, 2019 9:57 PM To: gary.adams at oracle.com Cc: Sparse Way; mobile-dev at openjdk.java.net Subject: Re: Java Silent Fail To run on the command line, I used to have to set the LD_LIBRARY_PATH environment variable to the paths containing the shared libraries. export LD_LIBRARY_PATH=/data/app/jre/lib/arm:/data/app/jre/lib/arm/jli:/data/app/jre/lib/arm/{minimal or client} Bob. > On Feb 26, 2019, at 2:50 PM, Gary Adams wrote: > > Don't worry about the "unused DT entry" warnings. > Those are just VERNEED entries in the libraries, > that are not used on android. > > I presume the executable and libraries are installed OK, > since the warnings below indicate they were found. > > I assume the target android api is compatible with the > runtime device or emulator you are using. > > Note that the use of java on the command line (adb shell) > is just a smoke test that the build was complete. > The real test of the libraries is when they've been > incorporated in an apk and installed as an app. > > > On 2/26/19, 2:27 PM, Sparse Way wrote: >> Hello, >> >> ./java -Djava.home=/data/app/jre -version >> >> Running this on android armv7a doesn't produce any output, the arguments are ignored as replacing them with invalid ones will make no difference. >> The process exits with value 6, the input stream (process's stdout) is empty. >> >> It would be nice to have debug flag or maybe a debug build variant. >> >> Error stream buffer: >> WARNING: linker: ./java: unused DT entry: type 0x6ffffffe arg 0x3a8 >> WARNING: linker: ./java: unused DT entry: type 0x6fffffff arg 0x2 >> WARNING: linker: libjli.so: unused DT entry: type 0x6ffffffe arg 0xf00 >> WARNING: linker: libjli.so: unused DT entry: type 0x6fffffff arg 0x2 >> WARNING: linker: ./java: unused DT entry: type 0x6ffffffe arg 0x3a8 >> WARNING: linker: ./java: unused DT entry: type 0x6fffffff arg 0x2 >> WARNING: linker: libjli.so: unused DT entry: type 0x6ffffffe arg 0xf00 >> WARNING: linker: libjli.so: unused DT entry: type 0x6fffffff arg 0x2 >> WARNING: linker: libjvm.so: unused DT entry: type 0x6ffffffe arg 0x472c >> WARNING: linker: libjvm.so: unused DT entry: type 0x6fffffff arg 0x3 >> >> Back bash configure produced warning which I ignored: >> >> The following warnings were produced. Repeated here for convenience: >> WARNING: using cross tools not prefixed with host triplet >> WARNING: Unknown autoconf target triplet ABI: "androideabi" >> >> Plus I am not sure if using arm-linux-gnueabihf for arm build is obligatory so didn't use it. > From support at sparseway.com Wed Feb 27 23:38:13 2019 From: support at sparseway.com (Sparse Way) Date: Wed, 27 Feb 2019 23:38:13 +0000 Subject: Bug Message-ID: Hello, Failed to find class DalvikProxySelector when loading ocldvk library, during JVM creation. jdk/src/java.base/android/native/libocldvk/net/ProxyDalvikSelector.c: static jclass initDalvikProxySelectorClass(JNIEnv* env) { jclass localClass = (*env)->FindClass(env, "com/oracle/dalvik/net/DalvikProxySelector"); dalvikProxySelectorClass = (jclass) (*env)->NewGlobalRef(env,localClass); ... } DalvikProxySelector.java can be found in openjfx repository. From support at sparseway.com Thu Feb 28 01:17:53 2019 From: support at sparseway.com (Sparse Way) Date: Thu, 28 Feb 2019 01:17:53 +0000 Subject: Initialization Error Message-ID: Hi, Library ocldvk loaded without problems, however loadJavaVM in javalauncher_api.c is returning JL_CANTLOADLIBJVM after calling JavaLauncher.createJavaVM(jre, new String[]{}, null). D/JVM: JavaLauncher_jni::initialize: Cannot initialize javalauncher_api, errocode -1019. java.lang.IllegalArgumentException: Cannot initialize Java runtime at com.oracle.dalvik.javalauncher.JavaLauncher.initialize(JavaLauncher.java:280) at com.oracle.dalvik.javalauncher.JavaLauncher.createJavaVM(JavaLauncher.java:349) From gary.adams at oracle.com Thu Feb 28 10:53:09 2019 From: gary.adams at oracle.com (gary.adams at oracle.com) Date: Thu, 28 Feb 2019 05:53:09 -0500 Subject: Initialization Error In-Reply-To: References: Message-ID: <8e3df4c5-b679-107d-f2c7-7d804553bef4@oracle.com> Check the path to the libjvm in the dlopen call: jdk/src/java.base/share/native/javalauncher_api/javalauncher_api.c On 2/27/19 8:17 PM, Sparse Way wrote: > Hi, > > Library ocldvk loaded without problems, however loadJavaVM in javalauncher_api.c is returning JL_CANTLOADLIBJVM after calling JavaLauncher.createJavaVM(jre, new String[]{}, null). > > D/JVM: JavaLauncher_jni::initialize: Cannot initialize javalauncher_api, errocode -1019. > java.lang.IllegalArgumentException: Cannot initialize Java runtime > at com.oracle.dalvik.javalauncher.JavaLauncher.initialize(JavaLauncher.java:280) > at com.oracle.dalvik.javalauncher.JavaLauncher.createJavaVM(JavaLauncher.java:349) From support at sparseway.com Thu Feb 28 15:52:00 2019 From: support at sparseway.com (Sparse Way) Date: Thu, 28 Feb 2019 15:52:00 +0000 Subject: Initialization Error In-Reply-To: <8e3df4c5-b679-107d-f2c7-7d804553bef4@oracle.com> References: , <8e3df4c5-b679-107d-f2c7-7d804553bef4@oracle.com> Message-ID: Turned out libffi.so.6 is missing and after checking the configuration log file, the library is not bundled: checking if libffi works... yes checking if libffi should be bundled... no Configuration: bash configure --enable-option-checking=fatal --build=x86_64-unknown-linux-gnu --host=arm-linux-androideabi --target=arm-linux-androideabi --disable-warnings-as-errors --enable-headless-only --with-jdk-variant=normal --with-jvm-variants=zero --with-libffi=$LIBFFI_DIR --with-cups-include=$CUPS_DIR --with-devkit=$ANDROID_DEVKIT --with-debug-level=fastdebug --with-freetype=$FREETYPE_DIR Tried to replace --with-libffi with --with-libffi-include=$LIBFFI_DIR/include --with-libffi-lib=$LIBFFI_DIR/lib but still it's not bundled. ________________________________ From: gary.adams at oracle.com Sent: Thursday, February 28, 2019 12:53 PM To: Sparse Way; mobile-dev at openjdk.java.net Subject: Re: Initialization Error Check the path to the libjvm in the dlopen call: jdk/src/java.base/share/native/javalauncher_api/javalauncher_api.c On 2/27/19 8:17 PM, Sparse Way wrote: > Hi, > > Library ocldvk loaded without problems, however loadJavaVM in javalauncher_api.c is returning JL_CANTLOADLIBJVM after calling JavaLauncher.createJavaVM(jre, new String[]{}, null). > > D/JVM: JavaLauncher_jni::initialize: Cannot initialize javalauncher_api, errocode -1019. > java.lang.IllegalArgumentException: Cannot initialize Java runtime > at com.oracle.dalvik.javalauncher.JavaLauncher.initialize(JavaLauncher.java:280) > at com.oracle.dalvik.javalauncher.JavaLauncher.createJavaVM(JavaLauncher.java:349) From support at sparseway.com Thu Feb 28 16:00:29 2019 From: support at sparseway.com (Sparse Way) Date: Thu, 28 Feb 2019 16:00:29 +0000 Subject: Initialization Error In-Reply-To: References: , <8e3df4c5-b679-107d-f2c7-7d804553bef4@oracle.com>, Message-ID: --enable-libffi-bundling=yes ________________________________ From: Sparse Way Sent: Thursday, February 28, 2019 5:52 PM To: gary.adams at oracle.com; mobile-dev at openjdk.java.net Subject: Re: Initialization Error Turned out libffi.so.6 is missing and after checking the configuration log file, the library is not bundled: checking if libffi works... yes checking if libffi should be bundled... no Configuration: bash configure --enable-option-checking=fatal --build=x86_64-unknown-linux-gnu --host=arm-linux-androideabi --target=arm-linux-androideabi --disable-warnings-as-errors --enable-headless-only --with-jdk-variant=normal --with-jvm-variants=zero --with-libffi=$LIBFFI_DIR --with-cups-include=$CUPS_DIR --with-devkit=$ANDROID_DEVKIT --with-debug-level=fastdebug --with-freetype=$FREETYPE_DIR Tried to replace --with-libffi with --with-libffi-include=$LIBFFI_DIR/include --with-libffi-lib=$LIBFFI_DIR/lib but still it's not bundled. ________________________________ From: gary.adams at oracle.com Sent: Thursday, February 28, 2019 12:53 PM To: Sparse Way; mobile-dev at openjdk.java.net Subject: Re: Initialization Error Check the path to the libjvm in the dlopen call: jdk/src/java.base/share/native/javalauncher_api/javalauncher_api.c On 2/27/19 8:17 PM, Sparse Way wrote: > Hi, > > Library ocldvk loaded without problems, however loadJavaVM in javalauncher_api.c is returning JL_CANTLOADLIBJVM after calling JavaLauncher.createJavaVM(jre, new String[]{}, null). > > D/JVM: JavaLauncher_jni::initialize: Cannot initialize javalauncher_api, errocode -1019. > java.lang.IllegalArgumentException: Cannot initialize Java runtime > at com.oracle.dalvik.javalauncher.JavaLauncher.initialize(JavaLauncher.java:280) > at com.oracle.dalvik.javalauncher.JavaLauncher.createJavaVM(JavaLauncher.java:349) From support at sparseway.com Thu Feb 28 18:20:27 2019 From: support at sparseway.com (Sparse Way) Date: Thu, 28 Feb 2019 18:20:27 +0000 Subject: Initialization Error In-Reply-To: References: , <8e3df4c5-b679-107d-f2c7-7d804553bef4@oracle.com>, , Message-ID: libjvm cannot find libffi.so.6 despite that it is in jre/lib. javalauncher_api::loadJavaVM: dlopen failed for /storage/emulated/0/jre/lib/server/libjvm.so (dlerr r dlopen failed: library "libffi.so.6" not found). Any ideas? ________________________________ From: mobile-dev on behalf of Sparse Way Sent: Thursday, February 28, 2019 6:00 PM To: gary.adams at oracle.com; mobile-dev at openjdk.java.net Subject: Re: Initialization Error --enable-libffi-bundling=yes ________________________________ From: Sparse Way Sent: Thursday, February 28, 2019 5:52 PM To: gary.adams at oracle.com; mobile-dev at openjdk.java.net Subject: Re: Initialization Error Turned out libffi.so.6 is missing and after checking the configuration log file, the library is not bundled: checking if libffi works... yes checking if libffi should be bundled... no Configuration: bash configure --enable-option-checking=fatal --build=x86_64-unknown-linux-gnu --host=arm-linux-androideabi --target=arm-linux-androideabi --disable-warnings-as-errors --enable-headless-only --with-jdk-variant=normal --with-jvm-variants=zero --with-libffi=$LIBFFI_DIR --with-cups-include=$CUPS_DIR --with-devkit=$ANDROID_DEVKIT --with-debug-level=fastdebug --with-freetype=$FREETYPE_DIR Tried to replace --with-libffi with --with-libffi-include=$LIBFFI_DIR/include --with-libffi-lib=$LIBFFI_DIR/lib but still it's not bundled. ________________________________ From: gary.adams at oracle.com Sent: Thursday, February 28, 2019 12:53 PM To: Sparse Way; mobile-dev at openjdk.java.net Subject: Re: Initialization Error Check the path to the libjvm in the dlopen call: jdk/src/java.base/share/native/javalauncher_api/javalauncher_api.c On 2/27/19 8:17 PM, Sparse Way wrote: > Hi, > > Library ocldvk loaded without problems, however loadJavaVM in javalauncher_api.c is returning JL_CANTLOADLIBJVM after calling JavaLauncher.createJavaVM(jre, new String[]{}, null). > > D/JVM: JavaLauncher_jni::initialize: Cannot initialize javalauncher_api, errocode -1019. > java.lang.IllegalArgumentException: Cannot initialize Java runtime > at com.oracle.dalvik.javalauncher.JavaLauncher.initialize(JavaLauncher.java:280) > at com.oracle.dalvik.javalauncher.JavaLauncher.createJavaVM(JavaLauncher.java:349)