Errors while building openjfx from sources

Alexander Zvegintsev alexander.zvegintsev at oracle.com
Tue Apr 21 09:52:07 UTC 2015


Hello Alexander,

It looks like that you have GCC version < 4.6 and it lacks diagnostics 
push/pop functionality[1]
that we are using to suppress deprecation warnings. We have moved to gcc 
4.8 on Linux recently[2].

So the fix is to upgrade GCC to at least 4.6. Or as a workaround you may 
apply following patch:

diff -r 8b7ea03165e9 buildSrc/linux.gradle
--- a/buildSrc/linux.gradle
+++ b/buildSrc/linux.gradle
@@ -138,7 +138,7 @@ LINUX.glass.javahInclude = [
      "com/sun/glass/ui/gtk/*"]
  LINUX.glass.nativeSource = 
file("modules/graphics/src/main/native-glass/gtk")
  LINUX.glass.compiler = compiler
-LINUX.glass.ccFlags = [ccFlags, "-Werror"].flatten()
+LINUX.glass.ccFlags = ccFlags
  LINUX.glass.linker = linker
  LINUX.glass.linkFlags = [linkFlags].flatten()
  LINUX.glass.lib = "glass"

It stops treating warning as errors[3].

[1] https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html
[2] 
http://mail.openjdk.java.net/pipermail/openjfx-dev/2015-March/016911.html
[3] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

Thanks,

Alexander.

On 04/21/2015 11:48 AM, Александр Свиридов wrote:
>   I am trying to build openjfx from sources - centos 6.4. 64 openjdk8 (build 25.60-b11, mixed mode), I run
>
> /gradle-1.8/bin/gradle --info --debug
>
> and this is what I get:
> 10:11:09.184 [ERROR] [system.err] cc1plus: warnings being treated as errors
> 10:11:09.186 [ERROR] [system.err] /home/PE/Temp/rt/modules/graphics/src/main/native-glass/gtk/glass_general.cpp:114: error: expected [error|warning|ignored] after '#pragma GCC diagnostic'
> 10:11:09.187 [ERROR] [system.err] /home/PE/Temp/rt/modules/graphics/src/main/native-glass/gtk/glass_general.cpp:132: error: expected [error|warning|ignored] after '#pragma GCC diagnostic'
> 10:11:09.187 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
> 10:11:09.188 [INFO] [org.gradle.process.internal.DefaultExecHandle] Process 'command 'gcc'' finished with exit value 1 (state: FAILED)
> 10:11:09.195 [DEBUG] [org.gradle.logging.internal.DefaultLoggingConfigurer] Finished configuring with level: DEBUG, configurers: [org.gradle.logging.internal.OutputEventRenderer at 675d3402, org.gradle.logging.internal.logback.LogbackLoggingConfigurer at 51565ec2, org.gradle.logging.internal.JavaUtilLoggingConfigurer at 482f8f11]
> 10:11:09.195 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':graphics:ccLinuxGlass'
> 10:11:09.195 [LIFECYCLE] [org.gradle.TaskExecutionLogger] :graphics:ccLinuxGlass FAILED
> 10:11:09.196 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :graphics:ccLinuxGlass (Thread[main,5,main]) completed. Took 1.1 secs.
> 10:11:09.196 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 5.129 secs, idle: 0.044 secs
> 10:11:09.212 [ERROR] [org.gradle.BuildExceptionReporter]
> 10:11:09.216 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
> 10:11:09.217 [ERROR] [org.gradle.BuildExceptionReporter]
> 10:11:09.220 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
> 10:11:09.221 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':graphics:ccLinuxGlass'.
> 10:11:09.222 [ERROR] [org.gradle.BuildExceptionReporter] > Could not call NativeCompileTask.compile() on task ':graphics:ccLinuxGlass'
> 10:11:09.225 [ERROR] [org.gradle.BuildExceptionReporter]
> 10:11:09.226 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
> 10:11:09.231 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':graphics:ccLinuxGlass'.
> 10:11:09.232 [ERROR] [org.gradle.BuildExceptionReporter]     at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
>
> how to solve it?



More information about the openjfx-dev mailing list