Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 919202 - dev-lang/rust: cross-build target armv7a-XXX is not supported
Summary: dev-lang/rust: cross-build target armv7a-XXX is not supported
Status: RESOLVED DUPLICATE of bug 679878
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Georgy Yakovlev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-04 19:51 UTC by Marius Dinu
Modified: 2023-12-06 19:45 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marius Dinu 2023-12-04 19:51:29 UTC
Trying to cross-build any package with rust for armv7 targets, such as the CHOST used by Gentoo profile (armv7a-unknown-linux-musleabihf) results in this error:

Error loading target specification: Could not find specification for target "armv7a-unknown-linux-musleabihf". Run `rustc --print target-list` for a list of built-in targets

The rust supported targets are armv7 (without the "a" at the end). The matching target for the Gentoo profile in the example above would be "armv7-unknown-linux-musleabihf".

Reproducible: Always

Steps to Reproduce:
Install crossdev -t armv7a-unknown-linux-musleabihf.
Use armv7a-unknown-linux-musleabihf-emerge to install a rust package, such as librsvg.
Actual Results:  
See error in Description.

Expected Results:  
Rust package installed by Gentoo should be patched to support all target tuples in use by Gentoo profiles.

Why this is important:
- Updating Gentoo requires lots of CPU and RAM.
- Devboards such as Raspberry Pi and clones usually don't have much RAM or CPU.
- Cross building packages for these systems on a desktop/server running Gentoo should be not only possible, but recommended and easy.
- Without librsvg, there's no GTK and no desktop.
Comment 1 Georgy Yakovlev archtester gentoo-dev 2023-12-06 19:42:15 UTC
Check rust ebuild for how to add custom targets.
You have to install crossdev env (which you did already) and then rebuild host rust with extra targets.
Comment 2 Georgy Yakovlev archtester gentoo-dev 2023-12-06 19:45:44 UTC
https://bugs.gentoo.org/679878

Check here too.
cargo.eclass is not ready to handle complex packages that link to non rust libraries, but works for cross merging simple rust only things

*** This bug has been marked as a duplicate of bug 679878 ***