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?
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
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
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.
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).

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.