rust-on-raspberry-pi icon indicating copy to clipboard operation
rust-on-raspberry-pi copied to clipboard

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

Open timglabisch opened this issue 9 years ago • 5 comments

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

timglabisch avatar Jun 14 '16 21:06 timglabisch

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.

Ogeon avatar Jun 14 '16 21:06 Ogeon

Hi,

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

timglabisch avatar Jun 15 '16 20:06 timglabisch

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...

Ogeon avatar Jun 16 '16 20:06 Ogeon

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

timglabisch avatar Jun 19 '16 18:06 timglabisch

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

Ogeon avatar Jun 19 '16 20:06 Ogeon