Skip to content

error occurred: Failed to find tool. Is aarch64-linux-gnu-gcc installed? #115

@youngzhaozju

Description

@youngzhaozju

I am compling sys info from windows to arm64, I found the following error:

PS G:\2.Codingx\TEST\testlinux> cargo build --release --target aarch64-unknown-linux-gnu
Compiling libc v0.2.139
Compiling cc v1.0.78
Compiling sys-info v0.9.1
error: failed to run custom build command for sys-info v0.9.1

Caused by:
process didn't exit successfully: G:\2.Codingx\TEST\testlinux\target\release\build\sys-info-bb6b5d424202c977\build-script-build (exit code: 1)
--- stdout
TARGET = Some("aarch64-unknown-linux-gnu")
OPT_LEVEL = Some("3")
HOST = Some("x86_64-pc-windows-msvc")
cargo:rerun-if-env-changed=CC_aarch64-unknown-linux-gnu
CC_aarch64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CC_aarch64_unknown_linux_gnu
CC_aarch64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
RUSTC_LINKER = Some("G:\Program Files (x86)\Arm GNU Toolchain aarch64-none-linux-gnu\12.2 rel1\bin\aarch64-none-linux-gnu-gcc")
cargo:rerun-if-env-changed=CROSS_COMPILE
CROSS_COMPILE = None
cargo:rerun-if-env-changed=CFLAGS_aarch64-unknown-linux-gnu
CFLAGS_aarch64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CFLAGS_aarch64_unknown_linux_gnu
CFLAGS_aarch64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("neon")
running: "aarch64-linux-gnu-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-Wall" "-Wextra" "-o" "G:\2.Codingx\TEST\testlinux\target\aarch64-unknown-linux-gnu\release\build\sys-info-acfd68cc9c785b8d\out\c/linux.o" "-c" "c/linux.c"

--- stderr

error occurred: Failed to find tool. Is aarch64-linux-gnu-gcc installed? (see https://github.com/rust-lang/cc-rs#compile-time-requirements for help)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions