https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
n

natpryce

01/28/2019, 3:11 PM
How does one diagnose the cause of an “Invalid module” build error? When compiling tests for the macosX64 target, my build fails with an enormous error message that includes what looks like LLVM bitcode of the compiled module, and eventually ends with:
Copy code
* Compiler version info: Konan: 1.1.1 / Kotlin: 1.3.20
 * Output kind: PROGRAM

exception: java.lang.Error: Invalid module
        at org.jetbrains.kotlin.backend.konan.llvm.IrToBitcodeKt.verifyModule(IrToBitcode.kt:179)
        at org.jetbrains.kotlin.backend.konan.llvm.IrToBitcodeKt.verifyModule$default(IrToBitcode.kt:170)
What can I do to resolve the error?
s

svyatoslav.scherbina

01/28/2019, 3:34 PM
This is internal compiler error, probably caused by a compiler bug.
Could you provide code to reproduce the issue?
n

natpryce

01/28/2019, 3:35 PM
I’ll push the current state of the project to a branch, and create a youtrack issue
🙏 1
I’ve raised two issues from that branch. I also may have found a bug with the kotlin-test-junit5 library but I’m not sure if it’s not actually my mistake. When I change the dependency of my tests from kotlin-test-junit to kotlin-test-junit5, Gradle finds none of the tests, although they all run in IntelliJ.
I’m not sure if I need to add more config to Gradle to make kotlin-test-junit5 work
s

svyatoslav.scherbina

01/29/2019, 9:16 AM
Thank you. We have successfully reproduced KT-29542 and are investigating it.
n

natpryce

01/29/2019, 9:53 AM
Thank you.
5 Views