JDK-8200704 : Cannot disable javafx.web in armv6hf cross compile
  • Type: Bug
  • Component: javafx
  • Sub-Component: build
  • Affected Version: 9.0.4
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: linux_ubuntu
  • CPU: x86_64
  • Submitted: 2018-04-03
  • Updated: 2024-11-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Blocks :  
Description
FULL PRODUCT VERSION :
java version "9.0.4"
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)


ADDITIONAL OS VERSION INFORMATION :
Linux openjdk10-build 4.13.0-37-generic #42~16.04.1-Ubuntu SMP Wed Mar 7 16:03:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


A DESCRIPTION OF THE PROBLEM :
When cross compiling openjfx for armv6hf, javafx.web and native libraries are still compiled. 
The arm gradle build script/gradle.properties disables it, but still output is produced. 
Also what is produced is os x86_64 native libs even though cross compiling, all other libs are arm libs

javafx.web/libjfxwebkit.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=e8caeff53dd4ad387ec56d1865cd30fb4360e32c, not stripped


javafx.graphics/libglass_monocle_x11.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=d1735e47b13e56d58d4e9b7a7f6dee338ccccd9f, not stripped

javafx.graphics/libglass_monocle.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=f9305441860f255079646812acf50ef46774317e, not stripped



STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
bash ./gradlew -PCOMPILE_TARGETS=armv6hf sdk

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
all arm libraries if webkit requested else and nothing webkit related produced if webkit is disabled

openjfx/jfx-dev/rt/build/armv6hf-modular-sdk/modules_libs:
drwxrwxr-x 2 ubuntu ubuntu 4096 Apr  3 11:24 javafx.base
drwxrwxr-x 2 ubuntu ubuntu 4096 Apr  3 11:24 javafx.graphics
drwxrwxr-x 2 ubuntu ubuntu 4096 Apr  3 11:24 javafx.media

ACTUAL -
openjfx/jfx-dev/rt/build/armv6hf-modular-sdk/modules_libs:
drwxrwxr-x 2 ubuntu ubuntu 4096 Apr  3 11:24 javafx.base
drwxrwxr-x 2 ubuntu ubuntu 4096 Apr  3 11:24 javafx.graphics
drwxrwxr-x 2 ubuntu ubuntu 4096 Apr  3 11:24 javafx.media
drwxrwxr-x 2 ubuntu ubuntu 4096 Apr  3 11:24 javafx.web


REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
possibly deleting everything in armv6hf-modular-sdk directory relating to javafx.web before compiling openjdk with openjfx


Comments
That seems a correct analysis. While we can check explicitly on other targets (apart from android/ios/dalvik) I think the best approach here is to check if we are doing a cross-compile (check on CROSS_TOOLS_DIR) and in that case, don't copy the native libraries.
04-05-2018

Preliminary analysis shows that the following part of the code(else part) in `build.gradle` is copying the shared objects from host JDK (stub runtime) which will have host binaries(X86 ELFs) when doing cross compilation. if (IS_COMPILE_WEBKIT) { from ("${webProject.buildDir}/libs/${t.name}/${library('jfxwebkit')}") } else { if (t.name != "android" && t.name != "ios" && t.name != "dalvik") { from ("$WEB_STUB/${library('jfxwebkit')}") } }
10-04-2018