[Pkg-rust-maintainers] Cross compiling using debian tools

Ximin Luo infinity0 at debian.org
Fri Nov 30 05:39:00 GMT 2018


Alex King:
> |How do I cross compile?|
> 
> |$ cargo run --target=i686-unknown-linux-gnu
>    Compiling cfg-if v0.1.6
>    Compiling lazy_static v1.2.0
> error[E0463]: can't find crate for `core`
> |
>   = note: the `i686-unknown-linux-gnu` target may not be installed
> 
> error: aborting due to previous error
> ....
> |
> 
> |
> |
> 
> |The upstream solution is "||rustup target add ..."|
> 
> |
> |
> 
> |How do I do the same using debian packages?|
> 

Hey Alex, you can follow the instructions here:

https://wiki.debian.org/Teams/RustPackaging#Porting_to_a_new_architecture

Note that the page talks about cross-compiling rustc and cargo, but the process is exactly the same for other packages, just use e.g. "rust-ripgrep" in place of $pkg in those instructions instead of "rustc" or "cargo".

You will need to first follow the setup instructions here: https://wiki.debian.org/sbuild

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git



More information about the Pkg-rust-maintainers mailing list