<div dir="ltr"><div dir="ltr">See also this reply to a similar question on <a href="http://users.rust-lang.org">users.rust-lang.org</a>:<br><a href="https://users.rust-lang.org/t/cross-compilation-using-debian-rust-not-rustup/20022/19?u=gus">https://users.rust-lang.org/t/cross-compilation-using-debian-rust-not-rustup/20022/19?u=gus</a><br></div><div dir="ltr"><br></div><div> - Gus</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, 30 Nov 2018 at 16:39, Ximin Luo <<a href="mailto:infinity0@debian.org">infinity0@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Alex King:<br>
> |How do I cross compile?|<br>
> <br>
> |$ cargo run --target=i686-unknown-linux-gnu<br>
>    Compiling cfg-if v0.1.6<br>
>    Compiling lazy_static v1.2.0<br>
> error[E0463]: can't find crate for `core`<br>
> |<br>
>   = note: the `i686-unknown-linux-gnu` target may not be installed<br>
> <br>
> error: aborting due to previous error<br>
> ....<br>
> |<br>
> <br>
> |<br>
> |<br>
> <br>
> |The upstream solution is "||rustup target add ..."|<br>
> <br>
> |<br>
> |<br>
> <br>
> |How do I do the same using debian packages?|<br>
> <br>
<br>
Hey Alex, you can follow the instructions here:<br>
<br>
<a href="https://wiki.debian.org/Teams/RustPackaging#Porting_to_a_new_architecture" rel="noreferrer" target="_blank">https://wiki.debian.org/Teams/RustPackaging#Porting_to_a_new_architecture</a><br>
<br>
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".<br>
<br>
You will need to first follow the setup instructions here: <a href="https://wiki.debian.org/sbuild" rel="noreferrer" target="_blank">https://wiki.debian.org/sbuild</a><br>
<br>
X<br>
<br>
-- <br>
GPG: ed25519/56034877E1F87C35<br>
GPG: rsa4096/1318EFAC5FBBDBCE<br>
<a href="https://github.com/infinity0/pubkeys.git" rel="noreferrer" target="_blank">https://github.com/infinity0/pubkeys.git</a><br>
<br>
_______________________________________________<br>
Pkg-rust-maintainers mailing list<br>
<a href="mailto:Pkg-rust-maintainers@alioth-lists.debian.net" target="_blank">Pkg-rust-maintainers@alioth-lists.debian.net</a><br>
<a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-rust-maintainers" rel="noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-rust-maintainers</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"> - Gus</div>