UnsatisfiedLinkError starting Gradle 1.11 on windows7 amd64


(rupert THURNER) #1

on windows-7, after upgrading to gradle-1.11, we get the below exception.

java.lang.UnsatisfiedLinkError: net.rubygrapefruit.platform.internal.jni.WindowsHandleFunctions.markStandardHandlesUninheritable(Lnet/rubygrapefruit/platform/internal/FunctionResult

it looks somehow similar to http://issues.gradle.org/browse/GRADLE-2705, the long stacktrace, just in case:

09:51:17.608 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong: 09:51:17.623 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ‘:compileGroovy’. 09:51:17.639 [ERROR] [org.gradle.BuildExceptionReporter] > A problem occurred starting process ‘Gradle Worker 1’ 09:51:17.655 [ERROR] [org.gradle.BuildExceptionReporter] 09:51:17.670 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is: 09:51:17.701 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:compileGroovy’. 09:51:17.701 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69) 09:51:17.717 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) 09:51:17.733 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) 09:51:17.748 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64) 09:51:17.779 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) 09:51:17.779 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42) 09:51:17.795 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) 09:51:17.811 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53) 09:51:17.826 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) 09:51:17.842 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:289) 09:51:17.873 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79) 09:51:17.889 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63) 09:51:17.904 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51) 09:51:17.920 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23) 09:51:17.935 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86) 09:51:17.951 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29) 09:51:17.967 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61) 09:51:17.982 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23) 09:51:17.998 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67) 09:51:18.013 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32) 09:51:18.029 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61) 09:51:18.045 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54) 09:51:18.060 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166) 09:51:18.076 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113) 09:51:18.107 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81) 09:51:18.123 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64) 09:51:18.154 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33) 09:51:18.169 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24) 09:51:18.185 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35) 09:51:18.185 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26) 09:51:18.201 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50) 09:51:18.216 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171) 09:51:18.216 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201) 09:51:18.232 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174) 09:51:18.232 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170) 09:51:18.247 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139) 09:51:18.263 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) 09:51:18.263 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) 09:51:18.279 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.Main.doAction(Main.java:46) 09:51:18.279 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) 09:51:18.294 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.Main.main(Main.java:37) 09:51:18.294 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50) 09:51:18.310 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32) 09:51:18.310 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.GradleMain.main(GradleMain.java:23) 09:51:18.325 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.process.internal.ExecException: A problem occurred starting process ‘Gradle Worker 1’ 09:51:18.325 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.process.internal.DefaultExecHandle.setEndStateInfo(DefaultExecHandle.java:196) 09:51:18.341 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.process.internal.DefaultExecHandle.failed(DefaultExecHandle.java:325) 09:51:18.341 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:83) 09:51:18.357 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64) 09:51:18.357 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.UnsatisfiedLinkError: net.rubygrapefruit.platform.internal.jni.WindowsHandleFunctions.markStandardHandlesUninheritable(Lnet/rubygrapefruit/platform/internal/FunctionResult; )V 09:51:18.372 [ERROR] [org.gradle.BuildExceptionReporter]

at net.rubygrapefruit.platform.internal.jni.WindowsHandleFunctions.markStandardHandlesUninheritable(Native Method) 09:51:18.372 [ERROR] [org.gradle.BuildExceptionReporter]

at net.rubygrapefruit.platform.internal.WindowsProcessLauncher.start(WindowsProcessLauncher.java:16) 09:51:18.388 [ERROR] [org.gradle.BuildExceptionReporter]

at net.rubygrapefruit.platform.internal.WrapperProcessLauncher.start(WrapperProcessLauncher.java:36) 09:51:18.388 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:65) 09:51:18.403 [ERROR] [org.gradle.BuildExceptionReporter]

… 1 more


(rupert THURNER) #2

just to add, i run the native platform test provided at: http://repo.gradle.org/gradle/libs-releases-local/net/rubygrapefruit/native-platform-test/0.7/native-platform-test-0.7.zip

and the result was: * OS: Windows 7 6.1 amd64 * JVM: Oracle Corporation 1.7.0_45 * Encoding: Cp1252 * Kernel: Windows 7 6.1 (build 7601) amd64 (amd64) * PID: 10992 * File systems: Exception in thread “main” net.rubygrapefruit.platform.NativeException: Could not query file systems: could not query volume information (errno 5)

at net.rubygrapefruit.platform.internal.PosixFileSystems.getFileSystems(PosixFileSystems.java:32)

at net.rubygrapefruit.platform.test.Main.main(Main.java:60)


(Adam Murdoch) #3

Can you try removing the ‘~/.gradle/native’ directory?


(rupert THURNER) #4

did that, i removed the whole .gradle folder after the upgrade. and i got the error after that as well. now i tried to use an elevated (administrator) cmd, but same error with the test suite:

Exception in thread “main” net.rubygrapefruit.platform.NativeException: Could not query file systems: could not query volume information (errno 5)

i wanted to build the trunk of it, but i noticed it uses visual studio, which i do not have.


(Markus Niederost) #5

same problem with gradle-1.11, even after deletion of ~/.gradle/native directory. No problems with gradle-1.10.

Just after start of a build, I get this message: c:\data\projects\git\xxxxx\yyyyyyyy>gradle build --debug 13:53:52.986 [DEBUG] [org.gradle.internal.nativeplatform.services.NativeServices] Unable to initialize native-platform.

Failure: net.rubygrapefruit.platform.NativeException: Failed to load native library ‘native-platform.dll’ for Windows 7 amd64. caused by: java.lang.UnsatisfiedLinkError: C:\data\projects.gradle\native\18\windows-amd64\native-platform.dll: Access is denied 13:53:54.318 [INFO] [org.gradle.BuildLogger] Starting Build 13:53:54.323 [DEBUG] [org.gradle.BuildLogger] Gradle user home: C:\data\projects.gradle 13:53:54.326 [DEBUG] [org.gradle.BuildLogger] Current dir: C:\data\projects\git\xxxxx\yyyyyyyy 13:53:54.330 [DEBUG] [org.gradle.BuildLogger] Settings file: null 13:53:54.334 [DEBUG] [org.gradle.BuildLogger] Build file: null


#6

To build native-platform for Windows, you require the Visual Studio command-line tools. The best way to get these is the free download of Visual Studio Express 2013 for Desktop.


(rupert THURNER) #7

downloaded and installed it. when calling “gradlew” it says: Could not create plugin of type ‘MicrosoftVisualCppPlugin’

i tried it with gradle-1.10 as well, same error, see here the stacktrace: https://gist.github.com/anonymous/9205617


#8

Thanks for the report: I’ve raised GRADLE-3034 to track this.