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

Fix build of Monocle for Linux

XMLWordPrintable

    • aarch32
    • linux

      DESCRIPTION

      JavaFX with Monocle fails to compile when building for embedded systems like the Raspberry Pi.

      SYSTEM / OS / JAVA RUNTIME INFORMATION

      The system is Ubuntu 20.04.1 LTS with OpenJDK 14.0.2, Ant 1.10.7, and Gradle 6.3. The build environment is set up by sourcing the following shell script:

          # Sets up the environment for building JavaFX
          syspath=/usr/sbin:/usr/bin:/sbin:/bin

          export JAVA_HOME=/usr/lib/jvm/java-14-openjdk-amd64
          export ANT_HOME=/usr/share/ant
          export GRADLE_HOME=$HOME/opt/gradle-6.3

          # JDK_HOME and PATH are required by the build
          export JDK_HOME=$JAVA_HOME
          export PATH=$GRADLE_HOME/bin:$ANT_HOME/bin:$JAVA_HOME/bin:$syspath

      STEPS TO REPRODUCE

      Follow the instructions for building JavaFX with Monocle on the following two pages:

      Building OpenJFX
      https://wiki.openjdk.java.net/display/OpenJFX/Building+OpenJFX

      Cross Building for ARM Hard Float
      https://wiki.openjdk.java.net/display/OpenJFX/Cross+Building+for+ARM+Hard+Float

      Build the latest JavaFX 16 with the command:

          $ gradle -PCOMPILE_TARGETS=armv6hf

      EXPECTED RESULTS

      The build should end with the message "BUILD SUCCESSFUL."

      ACTUAL RESULT

      The build ends with the message "BUILD FAILED" due to the following error:

        /home/ubuntu/src/jfx/modules/javafx.graphics/
          src/main/native-prism-es2/monocle/MonocleGLFactory.c:116:19:
        error: ‘RTLD_DEFAULT’ undeclared (first use in this function)

      SOURCE CODE FOR AN EXECUTABLE TEST CASE

      None

      WORKAROUND

      None

            jgneff John Neffenger
            jgneff John Neffenger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: