Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Danger Kotlin does not install #9

Open
arthurabreu opened this issue Aug 24, 2021 · 14 comments
Open

Danger Kotlin does not install #9

arthurabreu opened this issue Aug 24, 2021 · 14 comments

Comments

@arthurabreu
Copy link

When it gets to this part below, I'm always receiving a crash in the installation. Can some help?

`make install PREFIX=/usr/local/Cellar/danger-kotlin/0.7.1
./gradlew shadowJar -p danger-kotlin-library
Picked up _JAVA_OPTIONS: -Duser.home=/Users/arthurabreu/Library/Caches/Homebrew/java_cache

FAILURE: Build failed with an exception.

Where:
Settings file '/private/tmp/danger-kotlin-20210823-12389-iwjeau/kotlin-0.7.1/settings.gradle'

What went wrong:
Could not compile settings file '/private/tmp/danger-kotlin-20210823-12389-iwjeau/kotlin-0.7.1/settings.gradle'.

startup failed:
General error during semantic analysis: Unsupported class file major version 60
java.lang.IllegalArgumentException: Unsupported class file major version 60
at groovyjarjarasm.asm.ClassReader.(ClassReader.java:196)
at groovyjarjarasm.asm.ClassReader.(ClassReader.java:177)
at groovyjarjarasm.asm.ClassReader.(ClassReader.java:163)
at groovyjarjarasm.asm.ClassReader.(ClassReader.java:284)
at org.codehaus.groovy.ast.decompiled.AsmDecompiler.parseClass(AsmDecompiler.java:81)
at org.codehaus.groovy.control.ClassNodeResolver.findDecompiled(ClassNodeResolver.java:251)
at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:189)
at org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:169)
at org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:125)
at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveClassNullable(AsmReferenceResolver.java:57)
at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveClass(AsmReferenceResolver.java:44)
at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveNonArrayType(AsmReferenceResolver.java:79)
at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveType(AsmReferenceResolver.java:70)
at org.codehaus.groovy.ast.decompiled.MemberSignatureParser.createMethodNode(MemberSignatureParser.java:57)
at org.codehaus.groovy.ast.decompiled.DecompiledClassNode$2.get(DecompiledClassNode.java:234)
at org.codehaus.groovy.ast.decompiled.DecompiledClassNode$2.get(DecompiledClassNode.java:231)
at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.createMethodNode(DecompiledClassNode.java:242)
at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.lazyInitMembers(DecompiledClassNode.java:199)
at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.getDeclaredMethods(DecompiledClassNode.java:122)
at org.codehaus.groovy.ast.ClassNode.getMethods(ClassNode.java:912)`

java -version
java version "16.0.2" 2021-07-20
Java(TM) SE Runtime Environment (build 16.0.2+7-67)
Java HotSpot(TM) 64-Bit Server VM (build 16.0.2+7-67, mixed mode, sharing)

I have danger js and swift installed, no issues with those.

@afaucogney
Copy link

I'm in the same situation:

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 11s
make: *** [build] Error 1
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/danger/homebrew-tap/issues
These open issues may also help:
Danger Kotlin does not install #9

@trietbui85
Copy link

I also get the same issue while install Danger Kotlin in MacOS.

@ghost
Copy link

ghost commented Dec 23, 2021

Same issue here:

==> make install PREFIX=/usr/local/Cellar/danger-kotlin/1.0.0
Last 15 lines from /Users/jamie/Library/Logs/Homebrew/danger-kotlin/01.make:
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.base/java.lang.Thread.run(Thread.java:833)

1 error

@bopbi
Copy link

bopbi commented Feb 1, 2022

based on the full gradle line, the cause is

* What went wrong:
Could not compile settings file '/private/tmp/danger-kotlin-20220201-13772-1ddysvi/kotlin-1.0.0/settings.gradle'.
> startup failed:
  General error during semantic analysis: Unsupported class file major version 61

  java.lang.IllegalArgumentException: Unsupported class file major version 61
  	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:196)
  	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:177)
  	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:163)
  	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:284)

it might caused by the openjdk version compatibility

@dvdciri
Copy link

dvdciri commented Mar 10, 2022

Having the same issue here with mac os version 11.5.2

==> make install PREFIX=/usr/local/Cellar/danger-kotlin/1.0.0
Last 15 lines from /Users/davide.cirillo/Library/Logs/Homebrew/danger-kotlin/01.make:
  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
  	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
  	at java.base/java.lang.Thread.run(Thread.java:833)

  1 error

Any way to fix this?

@joeshawcroft
Copy link

Same issue here, any ideas?

==> Installing danger-kotlin from danger/tap
==> make install PREFIX=/usr/local/Cellar/danger-kotlin/1.0.0
Last 15 lines from /Users/josephshawcroft/Library/Logs/Homebrew/danger-kotlin/01.make:
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
        at java.base/java.lang.Thread.run(Thread.java:833)
  
  1 error

@arthurabreu
Copy link
Author

Sup guys, it's been some time since I tried it but what I remember is that I used another Danger version to enable it for my Android project at the time. This Kotlin version ended up never working for me, just like your recent errors.

@PMazzaReply
Copy link

Hi! We are having the same issue. Had anyone figured how to solve it?

@BekaChachua
Copy link

Hola, same issue guys, any news?

@bmarty
Copy link

bmarty commented Jul 25, 2022

Similar annoying issue here (MacOS 12.5):

> brew install danger-kotlin                                             
==> Downloading https://github.com/danger/kotlin/archive/1.0.0.tar.gz
Already downloaded: /Users/me/Library/Caches/Homebrew/downloads/2da0064f0499e91686bdf704226a8ac9adfef081a7684645ca36c4203079ec1f--kotlin-1.0.0.tar.gz
==> Installing danger-kotlin from danger/tap
==> make install PREFIX=/opt/homebrew/Cellar/danger-kotlin/1.0.0
Last 15 lines from /Users/me/Library/Logs/Homebrew/danger-kotlin/01.make:
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
        at java.base/java.lang.Thread.run(Thread.java:833)
  
  1 error

More lines from /Users/me/Library/Logs/Homebrew/danger-kotlin/01.make

FAILURE: Build failed with an exception.

* Where:
Settings file '/private/tmp/danger-kotlin-20220725-21220-12ourbm/kotlin-1.0.0/settings.gradle'

* What went wrong:
Could not compile settings file '/private/tmp/danger-kotlin-20220725-21220-12ourbm/kotlin-1.0.0/settings.gradle'.
> startup failed:
  General error during semantic analysis: Unsupported class file major version 62
  
  java.lang.IllegalArgumentException: Unsupported class file major version 62
        at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:196)

@dunyakirkali
Copy link

Same issue

@nuhkoca
Copy link

nuhkoca commented Nov 2, 2022

Same!

@JustJerem
Copy link

JustJerem commented Nov 24, 2022

The issue is still here.

==> Downloading https://github.com/danger/kotlin/archive/1.0.0.tar.gz
Already downloaded: /Users/me/Library/Caches/Homebrew/downloads/2da0064f0499e91686bdf704226a8ac9adfef081a7684645ca36c4203079ec1f--kotlin-1.0.0.tar.gz
==> Installing danger-kotlin from danger/tap
==> make install PREFIX=/usr/local/Cellar/danger-kotlin/1.0.0
Last 15 lines from /Users/me/Library/Logs/Homebrew/danger-kotlin/01.make:
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.base/java.lang.Thread.run(Thread.java:1589)
1 error

But you can try to install it like described in this comment :
danger/kotlin#225 (comment)

This was working fine for me 🎉

@bartwell
Copy link

bartwell commented Dec 9, 2023

Also faced with the problem. In my case I do the next steps to install kotlin-danger on Mac OS:

  1. git clone https://github.com/danger/kotlin.git --branch 1.2.0 --depth 1 _danger-kotlin
  2. cd _danger-kotlin
  3. Find a directory with JDK 17 with command /usr/libexec/java_home -v 17
  4. Open to edit Makefile
  5. Add in the top of Make file line like export JAVA_HOME=/path/from/step3
  6. Run make install

During the installation I also faced with two another troubles:

  1. It was unable to install libffi. So I just installed it manually with command brew install libffi
  2. I got an error ld: unknown options: -sdk-version. As I know this error occurs on Mac OS after update xCode to version 15. To fix it I found the executable() string in file danger-kotlin/build.gradle.kts and replace it with the code below:
executable {
     linkerOpts += "-ld64"
}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests