Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-10350

groovysh doesn't work on Arm64 architecture (Apple M1)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.2
    • None
    • None

    Description

      I've tried various combinations of groovy and java but can't get the groovy repl "groovysh" working with an Apple M1 processor.

      no jansi in java.library.path

       groovysh  
                                                                                                127 ↵
      java.lang.reflect.InvocationTargetException
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.base/java.lang.reflect.Method.invoke(Method.java:568)
          at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:111)
          at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:129)
      Caused by: java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no jansi in java.library.path: /Users/steve/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:., /private/var/folders/z0/mk6j542j3f72nf0hdj2d_6rw0000gn/T/libjansi-64-16484150978020761129.jnilib: dlopen(/private/var/folders/z0/mk6j542j3f72nf0hdj2d_6rw0000gn/T/libjansi-64-16484150978020761129.jnilib, 0x0001): tried: '/private/var/folders/z0/mk6j542j3f72nf0hdj2d_6rw0000gn/T/libjansi-64-16484150978020761129.jnilib' (fat file, but missing compatible architecture (have 'x86_64,i386', need 'arm64e')), '/usr/lib/libjansi-64-16484150978020761129.jnilib' (no such file)]
          at org.fusesource.hawtjni.runtime.Library.doLoad(Library.java:182)
          at org.fusesource.hawtjni.runtime.Library.load(Library.java:140)
          at org.fusesource.jansi.internal.CLibrary.<clinit>(CLibrary.java:42)
          at org.fusesource.jansi.AnsiConsole.wrapOutputStream(AnsiConsole.java:48)
          at org.fusesource.jansi.AnsiConsole.<clinit>(AnsiConsole.java:38)
          at java.base/java.lang.Class.forName0(Native Method)
          at java.base/java.lang.Class.forName(Class.java:467)
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.lambda$createCallStaticSite$2(CallSiteArray.java:65)
          at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:63)
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:156)
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:130)
          at org.apache.groovy.groovysh.Main.installAnsi(Main.groovy:249)
          at org.apache.groovy.groovysh.Main.setTerminalType(Main.groovy:235)
          at org.apache.groovy.groovysh.Main.main(Main.groovy:120)
          ... 6 more

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              eadyos Steve Eady
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: