Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Native incremental build broken for Kotlin 2.1 #847

Open
Daeda88 opened this issue Dec 16, 2024 · 0 comments
Open

Native incremental build broken for Kotlin 2.1 #847

Daeda88 opened this issue Dec 16, 2024 · 0 comments
Labels
🐛bug Something isn't working 🏗build

Comments

@Daeda88
Copy link
Contributor

Daeda88 commented Dec 16, 2024

Describe the bug
When running the tests with kotlin.incremental.native=true on Kotlin 2.1 and the test fails, an error is reported as follows:

e: Failed to build cache for /Users/gijsvanveen/projects/kaluga/hud/build/classes/kotlin/iosSimulatorArm64/test/klib/hud_test.
As a workaround, please try to disable incremental compilation (kotlin.incremental.native=false)
Also, consider filing an issue with full Gradle log here: https://kotl.in/issue
null
java.lang.NullPointerException
    at org.jetbrains.kotlin.backend.konan.llvm.RTTIGenerator.makeExtendedInfo(RTTIGenerator.kt:438)
    at org.jetbrains.kotlin.backend.konan.llvm.RTTIGenerator.generate(RTTIGenerator.kt:246)
    at org.jetbrains.kotlin.backend.konan.llvm.RTTIGeneratorVisitor.visitClass(IrToBitcode.kt:106)
    at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitClass(IrElementVisitorVoid.kt:48)
    at org.jetbrains.kotlin.backend.konan.llvm.RTTIGeneratorVisitor.visitClass(IrToBitcode.kt:94)
    at org.jetbrains.kotlin.backend.konan.llvm.RTTIGeneratorVisitor.visitClass(IrToBitcode.kt:94)
    at org.jetbrains.kotlin.ir.declarations.IrClass.accept(IrClass.kt:72)
    at org.jetbrains.kotlin.ir.declarations.IrFile.acceptChildren(IrFile.kt:34)
    at org.jetbrains.kotlin.ir.visitors.IrVisitorsKt.acceptChildrenVoid(IrVisitors.kt:15)
    at org.jetbrains.kotlin.backend.konan.llvm.RTTIGeneratorVisitor.visitElement(IrToBitcode.kt:100)
    at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitPackageFragment(IrElementVisitorVoid.kt:172)
    at org.jetbrains.kotlin.backend.konan.llvm.RTTIGeneratorVisitor.visitPackageFragment(IrToBitcode.kt:94)
    at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitFile(IrElementVisitorVoid.kt:188)
    at org.jetbrains.kotlin.backend.konan.llvm.RTTIGeneratorVisitor.visitFile(IrToBitcode.kt:94)
    at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitFile(IrElementVisitorVoid.kt:184)
    at org.jetbrains.kotlin.backend.konan.llvm.RTTIGeneratorVisitor.visitFile(IrToBitcode.kt:94)
    at org.jetbrains.kotlin.backend.konan.llvm.RTTIGeneratorVisitor.visitFile(IrToBitcode.kt:94)
    at org.jetbrains.kotlin.ir.declarations.IrFile.accept(IrFile.kt:28)
    at org.jetbrains.kotlin.ir.declarations.IrModuleFragment.acceptChildren(IrModuleFragment.kt:39)
    at org.jetbrains.kotlin.ir.visitors.IrVisitorsKt.acceptChildrenVoid(IrVisitors.kt:15)
    at org.jetbrains.kotlin.backend.konan.llvm.RTTIGeneratorVisitor.visitElement(IrToBitcode.kt:100)
    at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitModuleFragment(IrElementVisitorVoid.kt:124)
    at org.jetbrains.kotlin.backend.konan.llvm.RTTIGeneratorVisitor.visitModuleFragment(IrToBitcode.kt:94)
    at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitModuleFragment(IrElementVisitorVoid.kt:120)
    at org.jetbrains.kotlin.backend.konan.llvm.RTTIGeneratorVisitor.visitModuleFragment(IrToBitcode.kt:94)
    at org.jetbrains.kotlin.backend.konan.llvm.RTTIGeneratorVisitor.visitModuleFragment(IrToBitcode.kt:94)
    at org.jetbrains.kotlin.ir.declarations.IrModuleFragment.accept(IrModuleFragment.kt:33)
    at org.jetbrains.kotlin.ir.visitors.IrVisitorsKt.acceptVoid(IrVisitors.kt:11)
    at org.jetbrains.kotlin.backend.konan.driver.phases.BitcodeGenerationKt.RTTIPhase$lambda$1(BitcodeGeneration.kt:50)
    at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$createSimpleNamedCompilerPhase$3.phaseBody(PhaseBuilders.kt:91)
    at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$createSimpleNamedCompilerPhase$3.phaseBody(PhaseBuilders.kt:79)
    at org.jetbrains.kotlin.backend.common.phaser.SimpleNamedCompilerPhase.phaseBody(CompilerPhase.kt:226)
    at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedCompilerPhase.invoke(CompilerPhase.kt:113)
    at org.jetbrains.kotlin.backend.konan.driver.PhaseEngine.runPhase(Machinery.kt:120)
    at org.jetbrains.kotlin.backend.konan.driver.PhaseEngine.runPhase$default(Machinery.kt:111)
    at org.jetbrains.kotlin.backend.konan.driver.phases.TopLevelPhasesKt.runCodegen(TopLevelPhases.kt:425)
    at org.jetbrains.kotlin.backend.konan.driver.phases.TopLevelPhasesKt.runBackendCodegen(TopLevelPhases.kt:370)
    at org.jetbrains.kotlin.backend.konan.driver.phases.TopLevelPhasesKt.compileModule(TopLevelPhases.kt:272)
    at org.jetbrains.kotlin.backend.konan.driver.phases.TopLevelPhasesKt.runBackend$lambda$13$runAfterLowerings(TopLevelPhases.kt:117)
    at org.jetbrains.kotlin.backend.konan.driver.phases.TopLevelPhasesKt.runBackend$lambda$13$lambda$11$lambda$10(TopLevelPhases.kt:157)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.lang.Thread.run(Thread.java:1570)

Disabling incremental builds circumvents the issue, but it should be reenabled when possible

@Daeda88 Daeda88 added 🐛bug Something isn't working 🏗build labels Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛bug Something isn't working 🏗build
Projects
None yet
Development

No branches or pull requests

1 participant