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

JavaFX build fails with gcc 6

XMLWordPrintable

        OpenJFX-10 can not be built on linux with gcc 6 (Ubuntu 17.04):
        gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406

        Many C++ warnings are considered as errors (-Werror flag) and the function wait() is no more available.

        Here is the patch I quickly made to have a successfully build:
        1. Disable -Werror
        --- /tmp/meld-tmpg58KiV
        +++ /home/bourgesl/libs/graphics-rasterizer/openjfx/openjfx10/buildSrc/linux.gradle
        @@ -194,7 +194,9 @@
         LINUX.glass.glass = [:]
         LINUX.glass.glass.nativeSource = ft_gtk_launcher.getFiles()
         LINUX.glass.glass.compiler = compiler
        -LINUX.glass.glass.ccFlags = [ccFlags, gtk2CCFlags, "-Werror"].flatten()
        +LINUX.glass.glass.ccFlags = [ccFlags, gtk2CCFlags].flatten()
         LINUX.glass.glass.linker = linker
         LINUX.glass.glass.linkFlags = [linkFlags, "-lX11", "-ldl" ].flatten()
         LINUX.glass.glass.lib = "glass"

        2. Fix wait() call:
        --- /tmp/meld-tmpdJrWdz
        +++ /home/bourgesl/libs/graphics-rasterizer/openjfx/openjfx10/modules/jdk.packager/src/main/native/library/common/PosixPlatform.cpp
        @@ -46,6 +46,7 @@
         #include <sys/sysctl.h>
         #include <sys/file.h>
         #include <sys/stat.h>
        +#include <sys/wait.h>
         #include <errno.h>
         #include <limits.h>
         #include <pwd.h>
        @@ -370,7 +371,7 @@
             pid_t wpid = 0;
         
         #ifdef LINUX
        - wait();
        + wait(&status);
         #endif
         #ifdef MAC
             wpid = wait(&status);

              lbourges Laurent Bourgès
              lbourges Laurent Bourgès
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: