[image] voltagex: #9 13.34 cargo:warning=aarch64-linux-musl-gcc: error: unrecognized command-line option ‘-m64’ this line seems a build script output to me. the -m64 is typically used when cross compiling for the x86-64 target from 32 bit x86 environment. I would guess the build script from… Answer from nerditation on users.rust-lang.org
🌐
GitHub
github.com › oracle › graal › issues › 7103
ARM64 build failed: 'x86_64-linux-musl-gcc' not found · Issue #7103 · oracle/graal
August 2, 2023 - (0.0s @ 0.23GB) Error: Default ... Error: To prevent native-toolchain checking provide command-line option -H:-CheckToolchain Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception ...
Author   power721
🌐
GitHub
github.com › rust-lang › stacker › issues › 80
`aarch64-unknown-linux-musl` target on amd64 Linux fails? · Issue #80 · rust-lang/stacker
May 15, 2023 - $ export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-gnu-gcc $ cargo build -p prqlc --release --target=aarch64-unknown-linux-musl Compiling cfg-if v1.0.0 Compiling once_cell v1.17.1 Compiling bitflags v1.3.2 Compiling linux-raw-sys v0.1.4 Compiling libc v0.2.140 Compiling utf8parse v0.2.1 Compiling lazy_static v1.4.0 Compiling memchr v2.5.0 Compiling concolor-override v1.0.0 Compiling concolor-query v0.3.3 Compiling anstyle v0.3.5 Compiling adler v1.0.2 Compiling gimli v0.27.2 Compiling serde v1.0.157 Compiling psm v0.1.21 Compiling pin-project-lite v0.2.9 error: failed to run
Published   May 15, 2023
Author   eitsupi
Discussions

Cross compilation, Linux, x86_64 host, aarch64 target
I am trying to CC=aarch64-linux-musl-gcc cargo install atuin --target aarch64-unknown-linux-musl Rust 1.75 was installed with curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --target aarch64-unknown-linux-musl and my PATH is set. My cross compiler is built with GitHub ... More on users.rust-lang.org
🌐 users.rust-lang.org
10
0
January 22, 2024
gcc - Cross building sys based crates - Stack Overflow
I think you want the aarch64-unknown-linux-musl target; I don't think aarch64-linux-musl-gcc is even a thing. More on stackoverflow.com
🌐 stackoverflow.com
Can't compile ring with target aarch64-unknown-linux-musl
I don't use ring directly but via jsowebtoken, rustls, etc. I am trying to compile on AWS Graviton EC2 and get the following error for the following command: cargo build --release --target aarc... More on github.com
🌐 github.com
23
October 13, 2021
Aarch64-none-linux-gnu-gcc: not found
Hi, i am using colibri-imx6ull SOM and trying to create the costume linux by using “Build U-Boot From Source Code | Toradex Developer Center” right now i am in the phase of host image creation in host device, while i am trying to follow the same i am facing the following issue ... More on community.toradex.com
🌐 community.toradex.com
1
0
July 11, 2024
🌐
Stack Exchange
unix.stackexchange.com › questions › 619233 › how-to-get-aarch64-version-of-musl-on-debian-for-qemu-user-mode
windows subsystem for linux - How to get aarch64 version of musl on Debian for qemu user mode - Unix & Linux Stack Exchange
I have qemu user mode and I try running it with qemu-aarch64 -L /usr/aarch64-linux-gnu/ binary_name but I get the error · /lib/ld-musl-aarch64.so.1: No such file or directory ... sudo apt-get install install gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user-static libc6-dev-arm64-cross gcc-aarch64-linux-gnu
🌐
GitHub
github.com › briansmith › ring › issues › 1414
Can't compile ring with target aarch64-unknown-linux-musl · Issue #1414 · briansmith/ring
October 13, 2021 - Caused by: process didn't exit successfully: /tmp/lambda_build/target/release/build/ring-6fdf78c41c5d5ad7/build-script-build (exit status: 101) --- stdout OPT_LEVEL = Some("z") TARGET = Some("aarch64-unknown-linux-musl") HOST = Some("aarch64-unknown-linux-gnu") CC_aarch64-unknown-linux-musl = None CC_aarch64_unknown_linux_musl = None TARGET_CC = None CC = None CROSS_COMPILE = None CFLAGS_aarch64-unknown-linux-musl = None CFLAGS_aarch64_unknown_linux_musl = None TARGET_CFLAGS = None CFLAGS = None CRATE_CC_NO_DEFAULTS = None DEBUG = Some("false") CARGO_CFG_TARGET_FEATURE = None
Author   ghost
🌐
musl libc
wiki.musl-libc.org › getting-started.html
Using the musl-gcc wrapper
Whether building your own or downloading binaries, you need to select the appropriate GCC-style tuple for the architecture/ABI you want to target. It takes the form [arch]-linux-musl[abi_modifiers]. For example, ARM is arm-linux-musleabi for standard soft-float EABI and arm-linux-musleabihf for the hard-float variant. x86_64 is x86_64-linux-musl. A fairly complete list of interesting tuple patterns can be found in musl-cross-make’s README.md.
🌐
Toradex Community
community.toradex.com › technical support
Aarch64-none-linux-gnu-gcc: not found - Technical Support - Toradex Community
July 11, 2024 - Hi, i am using colibri-imx6ull SOM and trying to create the costume linux by using “Build U-Boot From Source Code | Toradex Developer Center” right now i am in the phase of host image creation in host device, while i am trying to follow the same i am facing the following issue lcl@lcl-Latitude-5430:~/workdir/u-boot$ make mrproper /bin/sh: 1: aarch64-none-linux-gnu-gcc: not found make: aarch64-none-linux-gnu-gcc: No such file or directory /bin/sh: 1: aarch64-none-linux-gnu-gcc: not found ...
Find elsewhere
🌐
GitHub
github.com › rust-lang › rust › issues › 46651
Cannot cross-compile aarch64-musl on x86_64 linux · Issue #46651 · rust-lang/rust
December 11, 2017 - C-bugCategory: This is a bug.Category: This is a bug.O-ArmTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateO-muslTarget: The musl libcTarget: The musl libcT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue. ... asonix@asonix-boxes-16-04:~/hello-world-rust$ cat src/main.rs fn main() { println!("Hello, world!"); } I'm compiling the default hello-world application, and it works fine for aarch64-unknown-linux-gnu in addition to working fine for arm-unknown-linux-musleabihf.
Author   asonix
🌐
Reddit
reddit.com › r/learnrust › cross compiling - having issues with musl-gcc across 2 programs
r/learnrust on Reddit: Cross Compiling - Having issues with musl-gcc across 2 programs
August 11, 2021 -

Hi,I'm trying to build a release version using the following target and linker:

[target.x86_64-unknown-linux-musl]
linker = "x86_64-linux-musl-gcc"

But i'm getting this error:

error occurred: Failed to find tool. Is `musl-gcc` installed?

Before you say "install musl-gcc", I have another program on the same system cross compiling the same target and linker above which is compiling just fine.

Any idea where I could start checking into why this is happening? Also, if you need more info, please let me know what I can provide.

Thanks!

edit: Creating a symlink fixed the problem!

🌐
GitHub
github.com › axodotdev › cargo-dist › issues › 1581
Cross compiling to 'aarch64-unknown-linux-musl' doesn't work · Issue #1581 · axodotdev/cargo-dist
November 28, 2024 - RUSTC_WRAPPER = None ... = None cargo:warning=Compiler family detection failed due to error: ToolNotFound: Failed to find tool. Is `aarch64-linux-musl-gcc` installed?...
Author   simonsan
🌐
Reddit
reddit.com › r/rust › crosscompile aarch64-unknown-linux-gnu to aarch64-unknown-linux-musl?
r/rust on Reddit: Crosscompile aarch64-unknown-linux-GNU to aarch64-unknown-linux-MUSL?
November 4, 2024 -

I did read that for cross-compiling from Windows to Linux, you need to supply the rust-lld linker in the Cargo config; but (un?)fortunately my situation does not seem to be that simple.

On Ubuntu, I installed musl and musl-dev. This means that I have aarch64-linux-musl-gcc in my $PATH and should have the required libraries. However, when I try to cargo build --target aarch64-unknown-linux-musl, I see this:

error: failed to run custom build command for `rquickjs-sys v0.6.2`

Caused by:
  process didn't exit successfully: `/opt/surrealdb/target/debug/build/rquickjs-sys-f5cc455b87df8099/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=build.rs
  cargo:rerun-if-env-changed=CARGO_FEATURE_BINDGEN
  cargo:rerun-if-env-changed=CARGO_FEATURE_UPDATE_BINDINGS
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_BYTECODE
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_GC
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_GC_FREE
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_FREE
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_LEAKS
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_MEM
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_OBJECTS
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_ATOMS
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_SHAPES
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_MODULE_RESOLVE
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_PROMISE
  cargo:rerun-if-env-changed=CARGO_FEATURE_DUMP_READ_OBJECT
  Applying patch patches/error_column_number.patch
  can't find file to patch at input line 5
  Perhaps you used the wrong -p or --strip option?
  The text leading up to this was:
  --------------------------
  |diff --git a/Makefile b/Makefile
  |index 0270a6a..1c78547 100644
  |--- a/Makefile
  |+++ b/Makefile
  --------------------------
  No file to patch.  Skipping patch.
  1 out of 1 hunk ignored
  patching file cutils.c
  patching file cutils.h
  patching file quickjs-atom.h
  patching file quickjs-opcode.h
  patching file quickjs.c
  patching file quickjs.h
  patching file tests/test_line_column.js
  Applying patch patches/get_function_proto.patch
  patching file quickjs.c
  Hunk #1 succeeded at 2222 (offset 7 lines).
  patching file quickjs.h
  Applying patch patches/check_stack_overflow.patch
  patching file quickjs.c
  Hunk #1 succeeded at 1622 (offset 32 lines).
  Applying patch patches/infinity_handling.patch
  patching file quickjs.c
  Hunk #1 succeeded at 10391 (offset 105 lines).
  Hunk #2 succeeded at 43407 (offset 317 lines).
  Hunk #3 succeeded at 49735 (offset 317 lines).
  Bindings for target: aarch64-unknown-linux-gnu

  --- stderr
  Ubuntu clang version 18.1.3 (1ubuntu1)
  Target: aarch64-unknown-linux-gnu
  Thread model: posix
  InstalledDir:
  Found candidate GCC installation: /../lib/gcc/aarch64-linux-gnu/11
  Found candidate GCC installation: /../lib/gcc/aarch64-linux-gnu/13
  Selected GCC installation: /../lib/gcc/aarch64-linux-gnu/13
  Candidate multilib: .;@m64
  Selected multilib: .;@m64
  ignoring nonexistent directory "/usr/include/clang/18.1.3/include/"
  ignoring nonexistent directory "/../lib/gcc/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/include"
  ignoring nonexistent directory "/include"
  #include "..." search starts here:
  #include <...> search starts here:
   /usr/local/include
   /usr/include/aarch64-linux-gnu
   /usr/include
  End of search list.
  /usr/include/stdio.h:34:10: fatal error: 'stddef.h' file not found
  thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rquickjs-sys-0.6.2/build.rs:351:39:
  Unable to generate bindings: ClangDiagnostic("/usr/include/stdio.h:34:10: fatal error: 'stddef.h' file not found\n")
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

A few things stand out to me:

  • It's using Clang instead of the totally available GCC. Do I need to manually specify cc?

  • stddef.h is most definitively included in musl. But, just to make sure, I went to verify:

# dpkg -L musl-dev | grep -i stddef
/usr/include/aarch64-linux-musl/stddef.h

Sure enough. Technically, everything should be present. I made sure the target is also installed:

# rustup target list --installed
aarch64-unknown-linux-gnu
aarch64-unknown-linux-musl

So... what exactly am I missing here?

Thanks and kind regards!

🌐
Alpine Linux
pkgs.alpinelinux.org › contents
Package index - Alpine Linux packages
Contents filter · Alpine Linux | Privacy Policy | Apkbrowser Project
🌐
GitHub
github.com › crosstool-ng › crosstool-ng › issues › 2178
Redefinition errors when building aarch64-unknown-linux-musl toolchain with strace open · Issue #2178 · crosstool-ng/crosstool-ng
July 5, 2024 - Abstarct: I try to build aarch64-unknown-linux-musl toochain. I made some specific settings: gcc version 9.5.0; linux version 4.20; open strace. Then I got some redefinition errors: [ERROR] /home/a...
Author   YogzZ
🌐
musl libc
wiki.musl-libc.org › porting › aarch64
musl libc - Porting/AArch64
There are 2 official proprietary emulators called Versatile Express “fast model” and “foundation model”. The latter is available for free after registering on the ARM website. Use Rich Felker’s musl-cross-make and just set ARCH to aarch64 to build the stage1 toolchain for testing (build errors will happen as soon as stage1 gcc is compiled and kernel headers are installed, that is expected.)
🌐
GitHub
github.com › FiloSottile › homebrew-musl-cross › issues › 25
aarch64-linux-musl-gcc: error: unrecognized command line option '-marm' · Issue #25 · FiloSottile/homebrew-musl-cross
March 2, 2021 - COLLECT_GCC=aarch64-linux-musl-gcc COLLECT_LTO_WRAPPER=/usr/local/Cellar/musl-cross/0.9.9/libexec/bin/../libexec/gcc/aarch64-linux-musl/9.2.0/lto-wrapper Target: aarch64-linux-musl Configured with: ../src_gcc/configure --enable-languages=c,c++ --disable-nls --with-debug-prefix-map=/private...
Author   Abirdcfly