Skip to content

Commit 872ffbc

Browse files
dpsoftclaude
andcommitted
fix(ci): use real musl cross-compiler for aarch64, fix nfpm download
Replace glibc symlink hack with proper musl-cross toolchain from musl.cc. The glibc linker can't link musl objects (undefined ref to __memcpy_chk in zstd-sys). Also add retry to nfpm download. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cb1dff9 commit 872ffbc

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

.github/workflows/guest-image.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@ jobs:
3030
sudo apt-get update
3131
sudo apt-get install -y musl-tools cpio gzip xz-utils zstd
3232
33-
- name: Install aarch64 cross-compiler
33+
- name: Install aarch64 musl cross-compiler
3434
if: matrix.arch == 'aarch64'
3535
run: |
36-
sudo apt-get install -y gcc-aarch64-linux-gnu
37-
# Rust's aarch64-unknown-linux-musl target looks for aarch64-linux-musl-gcc
38-
# but the GNU cross-linker works fine for static musl builds.
39-
sudo ln -s /usr/bin/aarch64-linux-gnu-gcc /usr/local/bin/aarch64-linux-musl-gcc
36+
curl -fsSL https://musl.cc/aarch64-linux-musl-cross.tgz | tar xz -C /opt
37+
echo "/opt/aarch64-linux-musl-cross/bin" >> "$GITHUB_PATH"
4038
4139
- name: Download static busybox
4240
run: |

.github/workflows/release.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ jobs:
3434
sudo apt-get update
3535
sudo apt-get install -y musl-tools cpio gzip xz-utils zstd
3636
37-
- name: Install aarch64 cross-compiler
37+
- name: Install aarch64 musl cross-compiler
3838
if: matrix.arch == 'aarch64'
3939
run: |
40-
sudo apt-get install -y gcc-aarch64-linux-gnu
41-
sudo ln -s /usr/bin/aarch64-linux-gnu-gcc /usr/local/bin/aarch64-linux-musl-gcc
40+
curl -fsSL https://musl.cc/aarch64-linux-musl-cross.tgz | tar xz -C /opt
41+
echo "/opt/aarch64-linux-musl-cross/bin" >> "$GITHUB_PATH"
4242
4343
- name: Download static busybox
4444
run: |
@@ -64,8 +64,9 @@ jobs:
6464
6565
- name: Install nfpm
6666
run: |
67-
curl -sfL https://github.com/goreleaser/nfpm/releases/latest/download/nfpm_linux_amd64.tar.gz \
68-
| tar -xz -C /usr/local/bin nfpm
67+
curl -sfL --retry 3 --retry-delay 5 https://github.com/goreleaser/nfpm/releases/latest/download/nfpm_linux_amd64.tar.gz \
68+
-o /tmp/nfpm.tar.gz
69+
tar -xzf /tmp/nfpm.tar.gz -C /usr/local/bin nfpm
6970
7071
- name: Build .deb package
7172
run: |

0 commit comments

Comments
 (0)