- 
    Bug 
- 
    Resolution: Fixed
- 
     P3 P3
- 
    8u172, 9, 10
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-8212106 | 8u202 | Pankaj Bansal | P3 | Resolved | Fixed | b01 | 
                    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);
            
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);
- backported by
- 
                    JDK-8212106 JavaFX build fails with gcc 6 -           
- Resolved
 
-         
- duplicates
- 
                    JDK-8088144 use waitpid instead of wait -           
- Closed
 
-         
- links to