Ogeon / rust-on-raspberry-pi

[OUTDATED] Instructions for how to cross compile Rust projects for the Raspberry Pi
292 stars 15 forks source link

can't find crate for `syntax` [E0463] #19

Open timglabisch opened 8 years ago

timglabisch commented 8 years ago

Hello,

today i created this docker container and tryed to compile a project for RPi 3. i've am using serde (*) as a dependency, whis results in:

....
 Downloading num-traits v0.1.32
   Compiling num-traits v0.1.32
   Compiling aster v0.18.0
/home/cross/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.18.0/src/lib.rs:10:1: 10:21 error: can't find crate for `syntax` [E0463]
/home/cross/.cargo/registry/src/github.com-1ecc6299db9ec823/aster-0.18.0/src/lib.rs:10 extern crate syntax;

dependencies of my project:

[dependencies]
nickel = "0.8.0"
unicase = "*"
serde = "*"
serde_json = "*"
serde_macros = "*"
xml-rs = "0.3"
cp437 = "*"
plugin = "0.2"
typemap = "*"
rustc-serialize = "0.3"

may this is related to https://github.com/rust-lang/rust/issues/32984

Ogeon commented 8 years ago

Hi,

I have never tried to use syntax on RPi, but I think it should just work™ if std works. Have you checked that you can compile a simpler crate? That issue you linked looks like it's a similar case, but it looks like it was fixed. It's hard to say if it has made a comeback, based on this info.

A possible workaround, in any case, if you can stand a longer initial build time, could be to use syntex instead. It's also usable on stable Rust. I'm assuming that you are using nightly, by the way.

Edit: Never mind, the docker container compiles Rust, so it counts a nightly.

timglabisch commented 8 years ago

Hi,

i successfully tryed it on another project with no (just rusts default) dependencies.

Ogeon commented 8 years ago

Ok, so we can probably rule that out, then. I have, honestly, no idea why that's happening. Something you could try, if you are using Linux, is to follow the regular instructions, but skip the part where you are building the compiler, and instead install the cross compiled standard libraries through rustup. It's the same approach that's used when testing the wiringpi bindings (see the install section). This will most likely require the same version of the buildXX script as in that same repository.

I really need to update this guide...

timglabisch commented 8 years ago

i am sorry but at the moment i don't have the time to try this :( i'll try this later.

Ogeon commented 8 years ago

Oh, don't worry about it. Take your time :smile: