[GRADLE-3034] UnsatisfiedLinkError starting Gradle 1.11 on windows7 amd64 Created: 25/Feb/14  Updated: 10/Feb/17  Resolved: 10/Feb/17

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Gradle Forums Assignee: Unassigned
Resolution: Won't Fix Votes: 0


 Description   

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 [1]http://issues.gradle.org/browse/GRADL..., 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
----------------------------------------------------------------------------------------
[1] http://issues.gradle.org/browse/GRADLE-2705



 Comments   
Comment by Gradle Forums [ 25/Feb/14 ]

just to add, i run the native platform test provided at:
[1]http://repo.gradle.org/gradle/libs-re...

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)
    ----------------------------------------------------------------------------------------
    [1] http://repo.gradle.org/gradle/libs-releases-local/net/rubygrapefruit/native-platform-test/0.7/native-platform-test-0.7.zip
Comment by Gradle Forums [ 25/Feb/14 ]

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

Comment by Gradle Forums [ 25/Feb/14 ]

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.

Comment by Gradle Forums [ 25/Feb/14 ]

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

Comment by Gradle Forums [ 25/Feb/14 ]

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]([1]http://www.microsoft.com/en-US/downlo...).
----------------------------------------------------------------------------------------
[1] http://www.microsoft.com/en-US/download/details.aspx?id=40787

Comment by Gradle Forums [ 25/Feb/14 ]

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:
[1]https://gist.github.com/anonymous/920...
----------------------------------------------------------------------------------------
[1] https://gist.github.com/anonymous/9205617

Comment by rupert thurner [ 13/May/14 ]

the original error seems to be ok again with gradle-1.12. did not try again to build the native platform on windows.

Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Benjamin Muschko [ 10/Feb/17 ]

Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved.

Generated at Wed Jun 30 12:38:07 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.