fix: use target-specific Debian arch names in Cross.toml#34
Merged
Conversation
Problem: v0.1.2 release failed on 4/5 cross-compilation targets with: E: Unable to locate package libssl-dev:armel Root cause: Cross.toml used $CROSS_DEB_ARCH variable which doesn't map correctly to Debian architecture names for all Rust targets. Specifically: - armv7-unknown-linux-gnueabi needs armhf (not armel) - aarch64-unknown-linux-musl needs arm64 - x86_64-unknown-linux-musl needs amd64 - Windows/FreeBSD targets don't support multi-arch packages Solution: Replace generic [build] section with target-specific configurations that use the correct Debian architecture names: - x86_64-unknown-linux-musl → amd64 - aarch64-unknown-linux-musl → arm64 - armv7-unknown-linux-gnueabi → armhf - x86_64-pc-windows-gnu → no multi-arch (install native packages) - x86_64-unknown-freebsd → no multi-arch (install native packages) This matches the pattern used in other Rust cross-compilation projects that depend on OpenSSL (e.g., cargo-chef with explicit target configs). Verified approach: - Debian arch names from: https://wiki.debian.org/Multiarch/HOWTO - Cross target-specific config: https://github.com/cross-rs/cross/wiki/Configuration#target - ARMv7 gnueabi uses armhf (hard-float ABI), not armel (soft-float) Fixes failed workflow: https://github.com/MostroP2P/mostrix/actions/runs/23092917539
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the Debian architecture mapping issue in
Cross.tomlthat caused 4 out of 5 cross-compilation targets to fail in v0.1.2 release.Problem
Release workflow v0.1.2 failed: https://github.com/MostroP2P/mostrix/actions/runs/23092917539
Failed targets:
armv7-unknown-linux-gnueabi→E: Unable to locate package libssl-dev:armelaarch64-unknown-linux-musl→ package not foundx86_64-unknown-linux-musl→ package not foundx86_64-unknown-freebsd→ package not foundOnly succeeded:
x86_64-pc-windows-gnu(by accident, uses different OpenSSL linking)Root cause: Generic
[build]section used$CROSS_DEB_ARCHvariable which doesn't map correctly to Debian multi-arch package names for all Rust targets.Solution
Replace generic configuration with target-specific sections using correct Debian architecture names:
Rust Target → Debian Arch Mapping
x86_64-unknown-linux-muslamd64aarch64-unknown-linux-muslarm64armv7-unknown-linux-gnueabiarmhfarmel)x86_64-pc-windows-gnux86_64-unknown-freebsdKey insight: ARMv7
gnueabisuffix doesn't mean soft-float (armel) — it uses hard-float (armhf). This is a common cross-compilation gotcha.Validation
cargo fmt— no changescargo clippy --all-targets --all-features -- -D warnings— passescargo test— passesNext step: After merge, re-trigger v0.1.2 release tag to verify all 5 targets build successfully.
References
cargo-chef: uses explicit target configs for OpenSSL