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

Ximin Luo infinity0 at debian.org
Fri Nov 30 06:21:00 GMT 2018


It's a lot simpler than that these days Gus. I'd recommend using the instructions I pasted already, they work for everything and not just rustc/cargo itself. It also doesn't require you to know about rustc/cargo specific things like libssl/PKG_CONFIG_ALLOW_CROSS=1, you only have to learn things general to all Debian cross-compilation.

X

Angus Lees:
> See also this reply to a similar question on users.rust-lang.org:
> https://users.rust-lang.org/t/cross-compilation-using-debian-rust-not-rustup/20022/19?u=gus
> 
>  - Gus
> 
> On Fri, 30 Nov 2018 at 16:39, Ximin Luo <infinity0 at debian.org> wrote:
> 
>> 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
>>
>> _______________________________________________
>> Pkg-rust-maintainers mailing list
>> Pkg-rust-maintainers at alioth-lists.debian.net
>>
>> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-rust-maintainers
>>
> 
> 


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



More information about the Pkg-rust-maintainers mailing list