Skip to content

Compiling Kotlin on Windows appears to require --legacy_external_runfiles #1309

Open
@smowton

Description

@smowton

Bazel version: 8.1.1
rules_kotlin version: 2.1.3

I found that Kotlin compilation jobs specifically on Windows would fail with an Rlocation error complaining that the jars required to run the Kotlin compiler weren't in the manifest:

---8<---8<--- Start of log, file at C:/tmp/bazel-workers/worker-3-KotlinCompile.log ---8<---8<---
LAUNCHER ERROR: Rlocation failed on _main/external/rules_kotlin++rules_kotlin_extensions+com_github_jetbrains_kotlin_git/lib/annotations-13.0.jar, path doesn't exist in MANIFEST file
---8<---8<--- End of log ---8<---8<---

Noting that this began _main/external, and the actual manifest written to disk to run build.exe did contain annotations-13.0.jar but didn't have that _main/external prefix, I tried adding build:windows --legacy_external_runfiles to my bazelrc and the build now succeeds.

Note that our repository separator has been set to + rather than ~ in the example above; this appears consistently in the requested path and the manifest, so does not appear related to this issue.

Possibly relevant: my build already has build:windows --enable_runfiles for unrelated reasons.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions