Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8195669

JavaFX: Cross Compile for Arm fails on linux

XMLWordPrintable

    • x86_64
    • linux

      FULL PRODUCT VERSION :
      java version "9.0.1"
      Java(TM) SE Runtime Environment (build 9.0.1+11)
      Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Ubuntu 16.04.3 LTS
      Linux dell-virtual-machine 4.13.0-26-generic #29~16.04.2-Ubuntu SMP Tue Jan 9 22:00:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Gradle 4.3
      ------------------------------------------------------------

      Build time: 2017-10-30 15:43:29 UTC
      Revision: c684c202534c4138b51033b52d871939b8d38d72

      Groovy: 2.4.12
      Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
      JVM: 9.0.1 (Oracle Corporation 9.0.1+11)
      OS: Linux 4.13.0-26-generic amd64


      A DESCRIPTION OF THE PROBLEM :
      Currently use Arm java8 from Oracle and compile Openjfx for Arm and overlay libraries for current product line. Looking to test Java9 on Arm and upgrade product line in next generation release.

      Cross Compiling openJdk9 for Arm works fine

      Trying to compile openJfx from http://hg.openjdk.java.net/openjfx/jfx-dev/rt
      Running gradle -PCOMPILE_TARGETS=armv6hf produces swing errors even though COMPILE_SWING is false in build.gradle.

      Problem seems to be with build.gradle line 2154 which has swing tasks being disabled if COMPILE_SWING is false. This code is commented out.

      /* should not be built, but needed in JMX
          tasks.all {
              if (!COMPILE_SWING) it.enabled = false
          }
         */

      if I uncomment it these errors go away and the build completes.

      The resulting armv6hf-modular-sdk folder created by the build is added to jdk configure script with '-with-import-modules=' option as per build instructions.
      Building the jdk now fails with java.base module FindException, are these 2 problems related?



      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Followed insturctions

      https://wiki.openjdk.java.net/display/OpenJFX/Building+OpenJFX#BuildingOpenJFX-Ubuntu16.04

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Full JVM produced for Arm which includes JavaFX support
      ACTUAL -
      Failed builds

      ERROR MESSAGES/STACK TRACES THAT OCCUR :

      <Building OpenJfx error message>
      Task :swing:compileJava FAILED
      /home/dell/Documents/IwOpenJdk9/src/openjfx/rt/modules/javafx.swing/src/main/java/module-info.java:36: error: file should be on source path, or on patch path for module
      module javafx.swing {

      /home/dell/Documents/IwOpenJdk9/src/openjfx/rt/modules/javafx.swing/src/main/java/com/sun/javafx/embed/swing/SwingNodeHelper.java:26: error: file should be on source path, or on patch path for module
      package com.sun.javafx.embed.swing;

      /home/dell/Documents/IwOpenJdk9/src/openjfx/rt/modules/javafx.swing/src/main/java/com/sun/javafx/embed/swing/Disposer.java:26: error: file should be on source path, or on patch path for module
      package com.sun.javafx.embed.swing;

      /home/dell/Documents/IwOpenJdk9/src/openjfx/rt/modules/javafx.swing/src/main/java/com/sun/javafx/embed/swing/SwingFXUtilsImpl.java:26: error: file should be on source path, or on patch path for module
      package com.sun.javafx.embed.swing;

      /home/dell/Documents/IwOpenJdk9/src/openjfx/rt/modules/javafx.swing/src/main/java/com/sun/javafx/embed/swing/DisposerRecord.java:26: error: file should be on source path, or on patch path for module
      package com.sun.javafx.embed.swing;

      /home/dell/Documents/IwOpenJdk9/src/openjfx/rt/modules/javafx.swing/src/main/java/javafx/embed/swing/SwingFXUtils.java:26: error: file should be on source path, or on patch path for module
      package javafx.embed.swing;

      /home/dell/Documents/IwOpenJdk9/src/openjfx/rt/modules/javafx.swing/src/main/java/javafx/embed/swing/FXDnD.java:26: error: file should be on source path, or on patch path for module
      package javafx.embed.swing;

      /home/dell/Documents/IwOpenJdk9/src/openjfx/rt/modules/javafx.swing/src/main/java/javafx/embed/swing/InputMethodSupport.java:26: error: file should be on source path, or on patch path for module
      package javafx.embed.swing;

      /home/dell/Documents/IwOpenJdk9/src/openjfx/rt/modules/javafx.swing/src/main/java/javafx/embed/swing/JFXPanel.java:26: error: file should be on source path, or on patch path for module
      package javafx.embed.swing;

      /home/dell/Documents/IwOpenJdk9/src/openjfx/rt/modules/javafx.swing/src/main/java/javafx/embed/swing/CachingTransferable.java:26: error: file should be on source path, or on patch path for module
      package javafx.embed.swing;

      /home/dell/Documents/IwOpenJdk9/src/openjfx/rt/modules/javafx.swing/src/main/java/javafx/embed/swing/SwingCursors.java:26: error: file should be on source path, or on patch path for module
      package javafx.embed.swing;

      /home/dell/Documents/IwOpenJdk9/src/openjfx/rt/modules/javafx.swing/src/main/java/javafx/embed/swing/DataFlavorUtils.java:26: error: file should be on source path, or on patch path for module
      package javafx.embed.swing;

      /home/dell/Documents/IwOpenJdk9/src/openjfx/rt/modules/javafx.swing/src/main/java/javafx/embed/swing/SwingEvents.java:26: error: file should be on source path, or on patch path for module
      package javafx.embed.swing;

      /home/dell/Documents/IwOpenJdk9/src/openjfx/rt/modules/javafx.swing/src/main/java/javafx/embed/swing/SwingDnD.java:26: error: file should be on source path, or on patch path for module
      package javafx.embed.swing;

      /home/dell/Documents/IwOpenJdk9/src/openjfx/rt/modules/javafx.swing/src/main/java/javafx/embed/swing/SwingNode.java:26: error: file should be on source path, or on patch path for module
      package javafx.embed.swing;

      /home/dell/Documents/IwOpenJdk9/src/openjfx/rt/modules/javafx.swing/src/main/java/javafx/embed/swing/SwingDragSource.java:26: error: file should be on source path, or on patch path for module
      package javafx.embed.swing;

      16 errors

      FAILURE: Build failed with an exception.
      </Building OpenJfx error message>





      <Linking OpenJfx into openJdk build error message>
      Error: Module javafx.base not found
      java.lang.module.FindException: Module javafx.base not found
      at java.base/java.lang.module.Resolver.findFail(Resolver.java:889)
      at java.base/java.lang.module.Resolver.resolve(Resolver.java:128)
      at java.base/java.lang.module.Configuration.resolve(Configuration.java:357)
      at java.base/java.lang.module.Configuration.resolve(Configuration.java:187)
      at jdk.jlink/jdk.tools.jlink.internal.Jlink$JlinkConfiguration.resolve(Jlink.java:242)
      at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImageProvider(JlinkTask.java:439)
      at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImage(JlinkTask.java:386)
      at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.run(JlinkTask.java:263)
      at jdk.jlink/jdk.tools.jlink.internal.Main.run(Main.java:54)
      at jdk.jlink/jdk.tools.jlink.internal.Main.main(Main.java:33)
      make3: *** [/home/dell/Documents/IwOpenJdk9/src/jdk9dev/build/linux-arm-normal-client-release/images/jre/bin/java] Error 1
      Images.gmk:144: recipe for target '/home/dell/Documents/IwOpenJdk9/src/jdk9dev/build/linux-arm-normal-client-release/images/jre/bin/java' failed
      </Linking OpenJfx into openJdk build error message>


      REPRODUCIBILITY :
      This bug can be reproduced always.

            jvos Johan Vos
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: