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

Cannot compile openJFX 8 on Ubuntu 20.4

XMLWordPrintable

    • x86_64
    • linux_ubuntu

      ADDITIONAL SYSTEM INFORMATION :
      OS: Ubuntu 20.04 LTS (64 bit)
      JDK:
      OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1ubuntu1-b09
      OpenJDK 64-Bit server VM (build 25.252-b09, mixed mode)
      Attempted openJFX mercurial revision: 10300

      A DESCRIPTION OF THE PROBLEM :
      There are no instructions for compiling openJFX 8 on any ubuntu platforms after 16. I attempted to build it via the instructions for 14-16, but was unsuccessful.

      Building for newer versions of Ubuntu is critical because there no longer exists (as far as I can find) and openjfx 8 packages for ubuntu, so the only way to install it would be to build it from source. (See https://bugs.launchpad.net/ubuntu/+source/openjfx/+bug/1799946 which had a workaround solution which worked until recently when version 8u161-b12-1ubuntu2 was removed). There are still many applications out there which do not support Java 9+, so this capability is a necessity.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      On fresh Ubuntu 20.4 VM:
      apt -y update && apt -y install openjdk-8-jdk unzip
      export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre
      apt -y install ksh bison flex gperf libasound2-dev libgl1-mesa-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libjpeg-dev libpng-dev libx11-dev libxml2-dev libxslt1-dev libxt-dev libxxf86vm-dev pkg-config x11proto-core-dev x11proto-xf86vidmode-dev libavcodec-dev mercurial libgtk2.0-dev libgtk-3-dev libxtst-dev libudev-dev libavformat-dev
      apt -y install cmake ruby
      wget https://services.gradle.org/distributions/gradle-5.0-bin.zip -P /tmp
      unzip -d /opt/gradle /tmp/gradle-*.zip
      export GRADLE_HOME=/opt/gradle/gradle-5.0
      export PATH=${GRADLE_HOME}/bin:${PATH}
      hg clone https://hg.openjdk.java.net/openjfx/8u-dev/rt
      cd rt
      gradle --scan


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Compile open JFX
      ACTUAL -
      gradle --scan

      > Task :buildSrc:compileGroovy
      startup failed:
      /home/nathan/Documents/repos/rt/buildSrc/src/main/groovy/com/sun/javafx/gradle/NativeCompileTask.groovy: 118: The variable [files] is declared final but is reassigned
      . At [118:21] @ line 118, column 21.
                             files += file;
                             ^

      1 error


      > Task :buildSrc:compileGroovy FAILED

      FAILURE: Build failed with an exception.

      * What went wrong:
      Execution failed for task ':buildSrc:compileGroovy'.
      > Compilation failed; see the compiler error output for details.

      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
      * Get more help at https://help.gradle.org
      BUILD FAILED in 4s


      FREQUENCY : always


            kcr Kevin Rushforth
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: