[GRADLE-2705] UnsatisfiedLinkError running Gradle with 64-bit JVM on Windows 2003 and earlier Created: 12/Mar/13  Updated: 28/Mar/13  Resolved: 15/Mar/13

Status: Resolved
Project: Gradle
Affects Version/s: 1.5-rc-1
Fix Version/s: 1.5-rc-2

Type: Bug
Reporter: Gradle Forums Assignee: Unassigned
Resolution: Fixed Votes: 0


 Description   

We just tried Gradle 15 RC1 and it fails on windows with following error:

15:57:07 Downloading [1]http://services.gradle.org/distributi...
15:58:33 ......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
15:58:33 Unzipping C:\WINDOWS\system32\config\systemprofile\.gradle\wrapper\dists\gradle-1.5-rc-1-bin\48r6habbfrmh4hqqss9ndrhba\gradle-1.5-rc-1-bin.zip to C:\WINDOWS\system32\config\systemprofile\.gradle\..\gradle-bin\gradle-1.5-rc-1-bin\48r6habbfrmh4hqqss9ndrhba
15:58:34
15:58:34 FAILURE: Build aborted because of an internal error.
15:58:34
15:58:34 * What went wrong:
15:58:34 Build aborted because of an unexpected internal error. Please file an issue at: [2]http://forums.gradle.org.
15:58:34
15:58:34 * Try:
15:58:34 Run with --debug option to get additional debug info.
15:58:34
15:58:34 * Exception is:
15:58:34 java.lang.UnsatisfiedLinkError: net.rubygrapefruit.platform.internal.jni.WindowsConsoleFunctions.isConsole(ILnet/rubygrapefruit/platform/internal/FunctionResult;)Z
15:58:34 at net.rubygrapefruit.platform.internal.jni.WindowsConsoleFunctions.isConsole(Native Method)
15:58:34 at net.rubygrapefruit.platform.internal.WindowsTerminals.isTerminal(WindowsTerminals.java:28)
15:58:34 at org.gradle.internal.nativeplatform.console.NativePlatformConsoleDetector.getConsole(NativePlatformConsoleDetector.java:39)
15:58:34 at org.gradle.logging.internal.ConsoleConfigureAction.execute(ConsoleConfigureAction.java:32)
15:58:34 at org.gradle.logging.internal.ConsoleConfigureAction.execute(ConsoleConfigureAction.java:27)
15:58:34 at org.gradle.logging.internal.OutputEventRenderer.attachConsole(OutputEventRenderer.java:68)
15:58:34 at org.gradle.logging.internal.DefaultLoggingManager.attachConsole(DefaultLoggingManager.java:149)
15:58:34 at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:168)
15:58:34 at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
15:58:34 at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
15:58:34 at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
15:58:34 at org.gradle.launcher.Main.doAction(Main.java:48)
15:58:34 at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
15:58:34 at org.gradle.launcher.Main.main(Main.java:39)
15:58:34 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:58:34 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
15:58:34 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
15:58:34 at java.lang.reflect.Method.invoke(Method.java:597)
15:58:34 at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
15:58:34 at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
15:58:34 at org.gradle.launcher.GradleMain.main(GradleMain.java:26)
15:58:34 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:58:34 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
15:58:34 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
15:58:34 at java.lang.reflect.Method.invoke(Method.java:597)
15:58:34 at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
15:58:34 at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
15:58:34 at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
15:58:34
15:58:34 Build step 'Execute Windows batch command' marked build as failure

It was working perfectly with 1.4. Any help is appreciated.
----------------------------------------------------------------------------------------
[1] http://services.gradle.org/distributions/gradle-1.5-rc-1-bin.zip
[2] http://forums.gradle.org



 Comments   
Comment by Gradle Forums [ 12/Mar/13 ]

Hi, can you run (with Gradle 1.4) `gradle v` and send us the output. Also, the output of running Gradle 1.5-rc-1 with `-debug` would be useful.

Comment by Gradle Forums [ 12/Mar/13 ]

Sure.

E:\w\tr-gr_expweb_node6_0\trunk>call gradlew -v
17:36:01
17:36:01 ------------------------------------------------------------
17:36:01 Gradle 1.4
17:36:01 ------------------------------------------------------------
17:36:01
17:36:01 Gradle build time: Monday, January 28, 2013 3:42:46 AM UTC
17:36:01 Groovy: 1.8.6
17:36:01 Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012
17:36:01 Ivy: 2.2.0
17:36:01 JVM: 1.6.0_29 (Sun Microsystems Inc. 20.4-b02)
17:36:01 OS: Windows 2003 5.2 amd64

17:40:36 E:\w\tr-grcl_expweb_node3_0\trunk>call gradlew --parallel -s --profile -Penv=ci clean build -Pp4Changelist=728059 --rerun-tasks --debug
17:40:37 17:42:40.541 [DEBUG] [org.gradle.logging.internal.DefaultLoggingConfigurer] Finished configuring with level: DEBUG, configurers: [org.gradle.logging.internal.OutputEventRenderer@664883c, org.gradle.logging.internal.logback.LogbackLoggingConfigurer@322c1e6b, org.gradle.logging.internal.JavaUtilLoggingConfigurer@6e811c88]
17:40:37 17:42:40.603 [DEBUG] [org.gradle.internal.nativeplatform.services.NativeServices] Unable to initialize native-platform. Failure: net.rubygrapefruit.platform.NativeException: Failed to load native library 'native-platform-windows-amd64.dll' for Windows 2003 amd64.
17:40:37 caused by: java.lang.UnsatisfiedLinkError: C:\Documents and Settings\Default User\.gradle\native\15\native-platform-windows-amd64.dll: The specified procedure could not be found
17:40:37 17:42:40.619 [ERROR] [org.gradle.BuildExceptionReporter]
17:40:37 17:42:40.619 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build aborted because of an internal error.
17:40:37 17:42:40.619 [ERROR] [org.gradle.BuildExceptionReporter]
17:40:37 17:42:40.619 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
17:40:37 17:42:40.619 [ERROR] [org.gradle.BuildExceptionReporter] Build aborted because of an unexpected internal error. Please file an issue at: [1]http://forums.gradle.org.
17:40:37 Build step 'Execute Windows batch command' marked build as failure
----------------------------------------------------------------------------------------
[1] http://forums.gradle.org

Comment by Gradle Forums [ 12/Mar/13 ]

Thanks for that. Would you mind downloading and running the test application for our native integration:
[1]http://repo.gradle.org/gradle/libs-re...

You just need to unzip this and run `bin/native-platform-test.bat`. You should get a bunch of information. I'm interested in whether this application succeeds or fails, and if it fails, what the stacktrace is.

Could you also run the test application for the version of native integration that we used in Gradle 1.4: [2]http://repo.gradle.org/gradle/libs-re...
----------------------------------------------------------------------------------------
[1] http://repo.gradle.org/gradle/libs-releases-local/net/rubygrapefruit/native-platform-test/0.3-rc-2/native-platform-test-0.3-rc-2.zip
[2] http://repo.gradle.org/gradle/libs-releases-local/net/rubygrapefruit/native-platform-test/0.2/native-platform-test-0.2.zip

Comment by Lari Hotari [ 28/Mar/13 ]

On Ubuntu I get a similar problem when using 32-bit JVM on 64-bit Ubuntu. The workaround is to install lib32ncurses5 and libstdc++6:i386 packages.

sudo apt-get install  lib32ncurses5 libstdc++6:i386
Generated at Wed Jun 30 12:29:15 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.