From 8eb41eb27af63c2b977e352b9a358c616ff59d29 Mon Sep 17 00:00:00 2001 From: Victor Adossi Date: Fri, 10 Jul 2026 21:27:32 +0900 Subject: [PATCH] fix(ci): add riscv64 sources list explicitly for cross-rs This commit adds a hack to fix riscv64 cross builds which were missing libssl-dev packages on Ubuntu. While the package *is* present, attempting to install via the normal route seems to fail, and the existing package is not properly resolved. By more explicitly adding riscv64 noble as a source, the libssl-dev:riscv64 package is properly picked up and used during the build. --- Cross.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Cross.toml b/Cross.toml index 44f9814..878885e 100644 --- a/Cross.toml +++ b/Cross.toml @@ -13,7 +13,10 @@ image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:edge" [target.riscv64gc-unknown-linux-gnu] pre-build = [ "dpkg --add-architecture $CROSS_DEB_ARCH", - "apt-get update && apt-get --assume-yes install libssl-dev:$CROSS_DEB_ARCH", + # NOTE: on Noble, dpkg --add-architecture does not do enough to add riscv64 + # sources properly, so we do it manually below + 'echo -e "Types: deb\nURIs: http://ports.ubuntu.com/ubuntu-ports\nSuites: noble noble-updates noble-security\nComponents: main restricted universe multiverse\nArchitectures: riscv64" >> /etc/apt/sources.list.d/ubuntu.sources', + "apt update && apt --assume-yes install libssl-dev:$CROSS_DEB_ARCH", ] env.passthrough = [ "OPENSSL_LIB_DIR=/usr/lib/riscv64-linux-gnu",