Gradle

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
To raise new issues or bugs against Gradle, please use forums.gradle.org.
  • Gradle
  • GRADLE-1479

OS-X OpenJDK7 Issue with libjnidispatch.dylib

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Resolution: Fixed
  • Affects Version/s: 1.0-milestone-2
  • Fix Version/s: 1.0-milestone-4

Description

Something changed between Milestone 1 and Milestone 2 to cause this:

Sanctum-Sanctorium:bin robert$ gradle -version

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not locate JNA native lib resource '/com/sun/jna/darwin-universal/libjnidispatch.dylib'.
  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Milestone 1 works just fine. Now, that's almost certainly an OS-X OpenJDK 7 issue, so I marked it as "trivial", but I wanted to make people aware.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    Gradle-1479.patch
    22/Jul/11 9:49 AM
    1 kB
    Jochen Hinrichsen

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • History
  • Activity
  • TeamCity
  • Commits
  • Source
  • Reviews
Hide
Permalink
Glen Stampoultzis added a comment - 27/Apr/11 12:31 AM - edited

I've found the same thing going from mileston-1 to milestone-2 but with Solaris-i386.

$ ./gradle

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not locate JNA native lib resource '/com/sun/jna/sunos-i386/libjnidispatch.so'.
  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

$ java -version
java version "1.6.0_21"

Show
Glen Stampoultzis added a comment - 27/Apr/11 12:31 AM - edited I've found the same thing going from mileston-1 to milestone-2 but with Solaris-i386. $ ./gradle FAILURE: Build failed with an exception.
  • What went wrong: Could not locate JNA native lib resource '/com/sun/jna/sunos-i386/libjnidispatch.so'.
  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
$ java -version java version "1.6.0_21"
Hide
Permalink
Glen Stampoultzis added a comment - 27/Apr/11 6:53 PM

Seems to be this library causing the problem: http://jna.java.net/

I got around this by forcing the JVM to run in 64-bit mode using the -d64 switch for Solaris. I'm not sure what the options are for OS-X.

It would be nice if this degraded gracefully. What does this Gradle use this library for?

Show
Glen Stampoultzis added a comment - 27/Apr/11 6:53 PM Seems to be this library causing the problem: http://jna.java.net/ I got around this by forcing the JVM to run in 64-bit mode using the -d64 switch for Solaris. I'm not sure what the options are for OS-X. It would be nice if this degraded gracefully. What does this Gradle use this library for?
Adam Murdoch made changes - 30/Apr/11 8:34 PM
Field Original Value New Value
Assignee Adam Murdoch [ adammurdoch ]
Hide
Permalink
Adam Murdoch added a comment - 30/Apr/11 8:36 PM

Can you paste in the output of gradle -v?

Show
Adam Murdoch added a comment - 30/Apr/11 8:36 PM Can you paste in the output of gradle -v?
Hide
Create a new review for changeset 6106610edff43e626defb6e5b8e7939e46451b62
adammurdoch <adam.murdoch@gradleware.com> submitted changeset 6106610edff43e626defb6e5b8e7939e46451b62 to RB_1.0-milestone-5 in Gradle (4 files) - 02/May/11 1:05 AM

GRADLE-1479 - Fixed terminal detection on os x when using openjdk, and on solaris x86.

  • subprojects/core/src/main/groovy/org/gradle/logging/internal/TerminalDetector.java (+1 -3)
    • View diff to previous
    • View full source
    • View file history
    • Download raw file
  • subprojects/core/src/main/groovy/org/gradle/util/OperatingSystem.java (+98 -57)
    • View diff to previous
    • View full source
    • View file history
    • Download raw file
  • subprojects/core/src/test/groovy/org/gradle/util/JvmTest.groovy (+0 -1)
    • View diff to previous
    • View full source
    • View file history
    • Download raw file
  • subprojects/core/src/test/groovy/org/gradle/util/OperatingSystemTest.groovy (+98)
    • View diff to previous
    • View full source
    • View file history
    • Download raw file
Show
Create a new review for changeset 6106610edff43e626defb6e5b8e7939e46451b62
adammurdoch <adam.murdoch@gradleware.com> submitted changeset 6106610edff43e626defb6e5b8e7939e46451b62 to RB_1.0-milestone-5 in Gradle (4 files) - 02/May/11 1:05 AM
Adam Murdoch made changes - 02/May/11 4:38 PM
Resolution Fixed [ 1 ]
Fix Version/s 1.0-milestone-4 [ 10060 ]
Status Open [ 1 ] Resolved [ 5 ]
Hide
Permalink
Robert Fischer added a comment - 19/May/11 7:06 PM - edited

It's not fixed as of milestone 3. I'll try milestone 4 as soon as it's out.

I'm currently running Gradle milestone 1 (the last one that worked):
Sanctum-Sanctorium:bin robert$ gradle -v

------------------------------------------------------------
Gradle 1.0-milestone-1
------------------------------------------------------------

Gradle build time: Sunday, 27 February 2011 02:13:20 PM EST
Groovy: 1.7.8
Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Ivy: 2.2.0
JVM: 1.7.0-internal (Oracle Corporation 21.0-b11)
OS: Darwin 10.7.0 universal

Here's some demonstrable failures with gradle milestone 3, even with -d64 set

Sanctum-Sanctorium:bin robert$ echo $JAVA_OPTS ; gradle -v
-server -d64 -XX:NewRatio=1 -XX:NewSize=16m -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:+DoEscapeAnalysis -XX:+AggressiveOpts -XX:+OptimizeStringConcat -Done-jar.verbose=false -Xmx2g

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not locate JNA native lib resource '/com/sun/jna/darwin-universal/libjnidispatch.dylib'.
  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    Sanctum-Sanctorium:bin robert$ env JAVA_OPTS="" gradle -v

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not locate JNA native lib resource '/com/sun/jna/darwin-universal/libjnidispatch.dylib'.
  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Show
Robert Fischer added a comment - 19/May/11 7:06 PM - edited It's not fixed as of milestone 3. I'll try milestone 4 as soon as it's out. I'm currently running Gradle milestone 1 (the last one that worked): Sanctum-Sanctorium:bin robert$ gradle -v ------------------------------------------------------------ Gradle 1.0-milestone-1 ------------------------------------------------------------ Gradle build time: Sunday, 27 February 2011 02:13:20 PM EST Groovy: 1.7.8 Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010 Ivy: 2.2.0 JVM: 1.7.0-internal (Oracle Corporation 21.0-b11) OS: Darwin 10.7.0 universal Here's some demonstrable failures with gradle milestone 3, even with -d64 set Sanctum-Sanctorium:bin robert$ echo $JAVA_OPTS ; gradle -v -server -d64 -XX:NewRatio=1 -XX:NewSize=16m -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:+DoEscapeAnalysis -XX:+AggressiveOpts -XX:+OptimizeStringConcat -Done-jar.verbose=false -Xmx2g FAILURE: Build failed with an exception.
  • What went wrong: Could not locate JNA native lib resource '/com/sun/jna/darwin-universal/libjnidispatch.dylib'.
  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Sanctum-Sanctorium:bin robert$ env JAVA_OPTS="" gradle -v
FAILURE: Build failed with an exception.
  • What went wrong: Could not locate JNA native lib resource '/com/sun/jna/darwin-universal/libjnidispatch.dylib'.
  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Hide
Permalink
Szczepan Faber added a comment - 07/Jun/11 5:48 AM

I heard from the reliable source that this is fixed on trunk. Can someone try the latest snapshot?

To use the latest snapshot update your wrapper properties:
distributionUrl=http\://repo.gradle.org/gradle/distributions/gradle-snapshots/gradle-1.0-milestone-4-20110605214820+0200-bin.zip

Show
Szczepan Faber added a comment - 07/Jun/11 5:48 AM I heard from the reliable source that this is fixed on trunk. Can someone try the latest snapshot? To use the latest snapshot update your wrapper properties: distributionUrl=http\://repo.gradle.org/gradle/distributions/gradle-snapshots/gradle-1.0-milestone-4-20110605214820+0200-bin.zip
Hide
Permalink
Robert Fischer added a comment - 07/Jun/11 7:21 PM

Tried it out, and it seems to work for me:

Sanctum-Sanctorium:bin robert$ ./gradle -v

------------------------------------------------------------
Gradle 1.0-milestone-4-20110605214820+0200
------------------------------------------------------------

Gradle build time: Sunday, June 5, 2011 3:48:20 PM EDT
Groovy: 1.7.10
Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Ivy: 2.2.0
JVM: 1.7.0-internal (Oracle Corporation 21.0-b14)
OS: Mac OS X 10.6.7 universal

Show
Robert Fischer added a comment - 07/Jun/11 7:21 PM Tried it out, and it seems to work for me: Sanctum-Sanctorium:bin robert$ ./gradle -v ------------------------------------------------------------ Gradle 1.0-milestone-4-20110605214820+0200 ------------------------------------------------------------ Gradle build time: Sunday, June 5, 2011 3:48:20 PM EDT Groovy: 1.7.10 Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010 Ivy: 2.2.0 JVM: 1.7.0-internal (Oracle Corporation 21.0-b14) OS: Mac OS X 10.6.7 universal
Hide
Permalink
Marc Silverboard added a comment - 15/Jun/11 1:15 PM

We're still getting the error on gradle-1.0-milestone-4-20110610162713. AIX 5.3 ppc64, IBM Java 1.6.0 (2.4). Any suggestions, or a work-around?

root@teak:/usr/gradle/gradle-1.0-milestone-4-20110610162713+0200/bin# ls
gradle gradle.bat
root@teak:/usr/gradle/gradle-1.0-milestone-4-20110610162713+0200/bin# ./gradle -v

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not locate JNA native lib resource '/com/sun/jna/aix-ppc64/libjnidispatch.a'.
  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Show
Marc Silverboard added a comment - 15/Jun/11 1:15 PM We're still getting the error on gradle-1.0-milestone-4-20110610162713. AIX 5.3 ppc64, IBM Java 1.6.0 (2.4). Any suggestions, or a work-around? root@teak:/usr/gradle/gradle-1.0-milestone-4-20110610162713+0200/bin# ls gradle gradle.bat root@teak:/usr/gradle/gradle-1.0-milestone-4-20110610162713+0200/bin# ./gradle -v FAILURE: Build failed with an exception.
  • What went wrong: Could not locate JNA native lib resource '/com/sun/jna/aix-ppc64/libjnidispatch.a'.
  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Hide
Permalink
Shawn Ma added a comment - 29/Jun/11 4:30 AM

Doesn't work on solaris x86 as well:
FAILURE: Build failed with an exception.

  • What went wrong:
    Could not locate JNA native lib resource '/com/sun/jna/sunos-i386/libjnidispatch.so'.
  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Show
Shawn Ma added a comment - 29/Jun/11 4:30 AM Doesn't work on solaris x86 as well: FAILURE: Build failed with an exception.
  • What went wrong: Could not locate JNA native lib resource '/com/sun/jna/sunos-i386/libjnidispatch.so'.
  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Hide
Permalink
Jochen Hinrichsen added a comment - 21/Jul/11 9:10 AM

I just built HEAD, same problem on AIX 6.1, IBM Java 1.6.0:

$ /applications/CDS/gradle-1.0-milestone-4-20110721150841+0200/bin/gradle -v

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not locate JNA native lib resource '/com/sun/jna/aix-ppc64/libjnidispatch.a'.
  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Show
Jochen Hinrichsen added a comment - 21/Jul/11 9:10 AM I just built HEAD, same problem on AIX 6.1, IBM Java 1.6.0: $ /applications/CDS/gradle-1.0-milestone-4-20110721150841+0200/bin/gradle -v FAILURE: Build failed with an exception.
  • What went wrong: Could not locate JNA native lib resource '/com/sun/jna/aix-ppc64/libjnidispatch.a'.
  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Hide
Permalink
Jochen Hinrichsen added a comment - 22/Jul/11 9:49 AM

Workaround for esoteric OS/ arch combinations

Show
Jochen Hinrichsen added a comment - 22/Jul/11 9:49 AM Workaround for esoteric OS/ arch combinations
Jochen Hinrichsen made changes - 22/Jul/11 9:49 AM
Attachment Gradle-1479.patch [ 10229 ]
Daz DeBoer made changes - 03/Aug/11 3:29 PM
Workflow jira [ 12901 ] jira with pivotal tracker [ 13321 ]
Hide
Permalink
Jochen Hinrichsen added a comment - 09/Sep/11 2:37 AM

Retried on milestone-5-20110908101939, still same problem.

Show
Jochen Hinrichsen added a comment - 09/Sep/11 2:37 AM Retried on milestone-5-20110908101939, still same problem.
Balthasar Nebel made changes - 14/Oct/11 4:46 AM
Comment [ I am getting the same errors (Could not locate JNA native lib resource) on AIX 6.1 Power (IBM Java) and HP-UX 11.31 IA64 and PA-RISC (HP Java) and on Linux IBM System z. I installed gradle-1.0-milestone-5-20111007085726+0200-all. This snapshot does not abort with 'gradle -v', but aborts later when used in our production environment:

---
$ /FS/fs0439/edatst/gradle-1.0-milestone-5-20111007/bin/gradle -Dnodeparameter=edatst.aixwm5t -DbrokerPort=3849 -Dwebmethods.installer.dir=/EDA/WebMethodsInstaller -Dserverurl=aquarius-dae.hq.sag -DmonitorPort=3850 -Dunsupported.eclipse.platform=true -Dinstalldir=/EDA/SoftwareAG5 -Dskip.reporting=true -Dsandbox=EDA_PI_TR -PpmdKpiValidateFailOnError=true clean build
13:39:58.998 [main] INFO o.g.l.i.TerminalDetectorFactory - Unable to find native jna lib for current platform: AIX 7.1 ppc64. Details: Could not locate JNA native lib resource '/com/sun/jna/aix-ppc64/libjnidispatch.a'.

FAILURE: Build aborted because of an internal error.

* What went wrong:
Build aborted because of an unexpected internal error. Please file an issue at: http://www.gradle.org.

* Try:
Run with --debug option to get additional debug info.

* Exception is:
java.lang.UnsatisfiedLinkError: jnidispatch (/com/sun/jna/aix-ppc64/libjnidispatch.a) not found in resource path
at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:698)
at com.sun.jna.Native.loadNativeLibrary(Native.java:678)
at com.sun.jna.Native.<clinit>(Native.java:106)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
at org.gradle.os.jna.NativeEnvironment$Unix.<init>(NativeEnvironment.java:95)
at org.gradle.os.jna.NativeEnvironment.current(NativeEnvironment.java:51)
at org.gradle.launcher.daemon.registry.PersistentDaemonRegistry.<init>(PersistentDaemonRegistry.java:44)
at org.gradle.launcher.daemon.client.ExternalDaemonConnector.<init>(ExternalDaemonConnector.java:52)
at org.gradle.launcher.daemon.client.ExternalDaemonConnector.<init>(ExternalDaemonConnector.java:48)
at org.gradle.launcher.cli.CommandLineActionFactory.createAction(CommandLineActionFactory.java:130)
at org.gradle.launcher.cli.CommandLineActionFactory.convert(CommandLineActionFactory.java:94)
at org.gradle.launcher.Main.doAction(Main.java:48)
at org.gradle.launcher.exec.EntryPoint$1.execute(EntryPoint.java:53)
at org.gradle.launcher.exec.EntryPoint$1.execute(EntryPoint.java:51)
at org.gradle.launcher.exec.Execution.execute(Execution.java:28)
at org.gradle.launcher.exec.EntryPoint.run(EntryPoint.java:39)
at org.gradle.launcher.Main.main(Main.java:39)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:51)
at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:33)
at org.gradle.launcher.GradleMain.main(GradleMain.java:24)
--- ]
Hide
Permalink
Peter Niederwieser added a comment - 24/Oct/11 11:09 AM

A stack trace would help. Regardless, I'm fairly certain that the problem is fixed on master, because we now have a CI build that simulates a JNA-less OS. Not sure if it's fixed in m5 though (we have done some work on this since m5).

Show
Peter Niederwieser added a comment - 24/Oct/11 11:09 AM A stack trace would help. Regardless, I'm fairly certain that the problem is fixed on master, because we now have a CI build that simulates a JNA-less OS. Not sure if it's fixed in m5 though (we have done some work on this since m5).
Luke Daley made changes - 03/Jan/13 5:09 AM
Status Resolved [ 5 ] Closed [ 6 ]
Workflow jira with pivotal tracker [ 13321 ] jira with pivotal tracker (no resolved, only closed) [ 18457 ]
Luke Daley made changes - 04/Jan/13 5:10 AM
Status Closed [ 6 ] Resolved [ 5 ]
Workflow jira with pivotal tracker (no resolved, only closed) [ 18457 ] Copy of jira with pivotal tracker (no closed, only resolved) [ 21065 ]
Unable to get TeamCity builds: No active plugin license is found! Please visit http://stiltsoft.com/teamcity for details

People

  • Assignee:
    Adam Murdoch
    Reporter:
    Robert Fischer
Vote (1)
Watch (3)

Dates

  • Created:
    16/Apr/11 6:17 PM
    Updated:
    04/Jan/13 5:10 AM
    Resolved:
    02/May/11 4:38 PM
  • Atlassian JIRA (v5.0.3#729-sha1:bf569e4)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Gradle. Try JIRA - bug tracking software for your team.