Skip to content

Installation fails on Windows ARM64 (aarch64) due to yaml12 Rust compilation target error #39

@benediktschfr

Description

@benediktschfr

Description

Hi! When trying to install Rapp (v0.4.0) on a Windows ARM64 system (aarch64), the installation fails during the compilation of the new dependency yaml12.

The yaml12 build script (Makevars.win) likely forces Cargo to compile for a GNU target, but it drops the architecture prefix, resulting in --target -pc-windows-gnu instead of aarch64-pc-windows-gnu. Furthermore, the official stable Rust toolchain for Windows ARM64 (stable-aarch64-pc-windows-msvc) does not inherently support the GNU target, if I understand it correctly.

Standard Output / Error Message

During devtools::install() or pak::pak(), the build fails with the following Cargo error:

RUSTFLAGS=" --print=native-static-libs" cargo build -j 2 --offline --target=-pc-windows-gnu --lib --release --manifest-path=rust/Cargo.toml --target-dir=./rust/target
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `...\bin\rustc.exe - --crate-name ___ --print=file-names --print=native-static-libs --target -pc-windows-gnu ...` (exit code: 1)
  --- stderr
  error: error loading target specification: could not find specification for target "-pc-windows-gnu"

Environment

  • OS: Windows 11 (ARM64 / aarch64)
  • R Version: 4.5.x (aarch64-w64-mingw32)
  • Rust Toolchain: stable-aarch64-pc-windows-msvc
  • Rapp Version: 0.4.0 (relies on yaml12 v0.1.0)

Suggested Fix / Workaround

For now, rolling back to Rapp v0.3.0 bypasses the issue since it doesn't depend on yaml12.
For v0.4.0+, the configuration script in yaml12 needs, if possible, to properly detect the aarch64 architecture on Windows when setting up the --target flag for Cargo, or fallback gracefully if the required target isn't supported by the host's MSVC toolchain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions