Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Help specifying toolchain

Open
#39 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, kotlin, rust

Research direction

Start by comparing the failing linker-wrapper.bat command with the working Android NDK clang.cmd command shown in the report. Inspect how local.properties supplies the NDK toolchain location and determine the directory format needed for the linker configuration. Done means the default build uses the intended NDK linker and exits successfully on the reported Windows setup.

Written by the indexing model from the issue text.

Description

By default, the build runs the following command:

rustc --crate-name lusna_ffi --edition=2018 lusna_ffi\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type cdylib --emit=dep-info,link -Cembed-bitcode=no -C debuginfo=2 -C metadata=fcf7fc3e883754d2 --out-dir C:\hyxe_wave\target\x86_64-linux-android\debug\deps --target x86_64-linux-android -C linker=C:\Users\tbrau\AndroidStudioProjects\Lusna\build\linker-wrapper\linker-wrapper.bat -C incremental=C:\hyxe_wave\target\x86_64-linux-android\debug\incremental -L dependency=C:\hyxe_wave\target\x86_64-linux-android\debug\deps -L dependency=C:\hyxe_wave\target\debug\deps --extern libc=C:\hyxe_wave\target\x86_64-linux-android\debug\deps\liblibc-f65a499a1c08d6d0.rlib -Ctarget-feature=+aes,+sse2,+sse4.1,+ssse3

Notice: linker=C:\Users\tbrau\AndroidStudioProjects\Lusna\build\linker-wrapper\linker-wrapper.bat

This fails with a nonzero exit code.

However, when I run the command in the command prompt with:

rustc --crate-name lusna_ffi --edition=2018 lusna_ffi\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type cdylib --emit=dep-info,link -Cembed-bitcode=no -C debuginfo=2 -C metadata=fcf7fc3e883754d2 --out-dir C:\hyxe_wave\target\x86_64-linux-android\debug\deps --target x86_64-linux-android -C linker=C:/android-ndk-r21d/toolchains/llvm/prebuilt/windows-x86_64/bin/x86_64-linux-android30-clang.cmd -C incremental=C:\hyxe_wave\target\x86_64-linux-android\debug\incremental -L dependency=C:\hyxe_wave\target\x86_64-linux-android\debug\deps -L dependency=C:\hyxe_wave\target\debug\deps --extern libc=C:\hyxe_wave\target\x86_64-linux-android\debug\deps\liblibc-f65a499a1c08d6d0.rlib -Ctarget-feature=+aes,+sse2,+sse4.1,+ssse3

where linker=C:/android-ndk-r21d/toolchains/llvm/prebuilt/windows-x86_64/bin/x86_64-linux-android30-clang.cmd, it runs perfectly (zero exit code). I see that I can change the local.properties to specify the ndk toolchain location, but which directory should be input therein? Thanks

Dominant language
Kotlin
Stars
1.3k
Forks
95
PR merge metrics
No merged PRs in 30d

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mozilla/rust-android-gradle

All issues in mozilla/rust-android-gradle

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.