Skip to content

fallback for the x86-64-linux-musl-gcc is not available and cause build failures #1452

@Majestry

Description

@Majestry

Build env (docker image):

cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian

Installed musl packages:

musl/oldstable,now 1.2.2-1 amd64 [installed,automatic]
musl-dev/oldstable,now 1.2.2-1 amd64 [installed]
musl-tools/oldstable,now 1.2.2-1 amd64 [installed]
Cargo version:

cargo 1.85.0 (d73d2caf9 2024-12-31)
release: 1.85.0
commit-hash: d73d2caf9e41a39daf2a8d6ce60ec80bf354d2a7
commit-date: 2024-12-31
host: x86_64-unknown-linux-gnu
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.9.0-DEV (sys:0.4.74+curl-8.9.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w 11 Sep 2023
os: Linux [64-bit]

After update of cc to 1.2.18, the build for the target x86_64-unknown-linux-musl fails with the error message

/bin/sh: 1: x86_64-linux-musl-gcc: not found
make[1]: *** [Makefile:3058: apps/lib/libapps-lib-app_libctx.o] Error 127
make: *** [Makefile:1577: build_libs] Error 2

According to the #1443, the /usr/bin/musl-gcc should be the symlink, but it's actually not:

file /usr/bin/musl-gcc
/usr/bin/musl-gcc: POSIX shell script, ASCII text executable

The issue first appeared with the cc crate 1.2.18, it was not present in 1.2.17 and below

Looks like the fallback for the musl-gcc should be preserved

UPD: workaround which works for me: creating the symlink to musl-gcc:

ln -s /usr/bin/musl-gcc /usr/bin/x86_64-linux-musl-gcc

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