-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cargo not finding deps after upgrade to 1.10 #84
Comments
We've recently modified cargo.bbclass (and cargo itself) to support not doing any fetching itself (all fetching is done in do_fetch). This section of the README has a few details, and for something a bit more concrete, the examples also show the general form for cargo.bbclass recipes to take. Right now we don't have a mechanism like the old cargo.bbclass (where cargo was allowed to handle fetching itself). |
@alexhumphreys You'll need to use |
You need to use https://crates.io/crates/cargo-bitbake to generate the dependency list for your package. I can see https://github.com/openivimobility/meta-oim/blob/master/recipes-oim/sota-client/sota-client.bb has no dependencies listed out at all which will cause this to fail. |
@jmesmon @cardoe Thanks for the tips, and sorry for not spotting that section of the README. Also, sorry for commenting on a closed issue, it took a while to get my head around the following. I've been trying to use the First (maybe this should be an issue on cargo-bitbake) the script outputs Second, the project I am building is not packaged as a cargo crate, so the generated I combined them to make the following updated recipe, and I am seeing some strange behaviour. On a fresh build ( If I comment out line 10, However, if I then add back in the So yeah, I'm not sure if I'm misconfiguring something again, or if it's that the cargo command doesn't like some stuff being in crates and others being in externalsrc. It would be possible to package the project as a cargo crate and do it that way, but I do like the externalsrc workflow. Also, if this should be a new issue, let me know and I can open one. Anyway, any pointers you can give me to solve would be greatly appreciated. |
@alexhumphreys not being able to use non-crates.io sources combined with crates.io sources definitely sounds like a problem, though I'm not sure how we can solve it when externalsrc is used. Perhaps we need an independent tool to form the cargo repository from crate specs? Or maybe there is a way to provide for some fetching even when externalsrc is used? An alternate might be to not use |
@jmesmon I would likely go the second route. There are changes coming to Cargo that will allow us to make a local crates.io repo in the future but that's not here yet and it will require a few improvement iterations. There is a tool to create this repo as well that I believe Mozilla uses and its called https://crates.io/crates/cargo-vendor @alexhumphreys I see the issue with the inherit. It looks like |
@jmesmon Thanks for clearing that up, was wondering why it took two runs. Like @cardoe said, the alternate route where the source is provided via SRC_URI also sounds good to me. Any idea what a vague timeline for that would be (or any other solution) would be? In the meantime I can either stay on 1.7, or package sota-client as a crate and build it from there. @cardoe just sat the new cargo-bitbake version, thanks! |
Still working on getting it published into crates.io. Upgrading to macOS Sierra had the fun side effect of breaking my Rust install. So give it a few more minutes hopefully before its published. |
chromium: Post-ozone-wayland cleanups
I'm having trouble using bitbake to compile a project after upgrading to rust 1.10
The error I see is:
Here
getopts
fails, but every time I try to build it names a different package from the Cargo.toml. If I run it a few more times the packages that fail are:toml
,lazy_static
,chan
,rustc-serialize
, etc.It seems to not have a local cargo registry, or possibly can't find the one that is there?
When I open up a devshell I see
$CARGO_HOME=/home/alex/work/pro/poky/build/tmp/work/core2-64-poky-linux/sota-client/1.0-10/cargo_home
The config file has a
local-registry
path that doesn't seem to exist:There's another registry under $CARGO_HOME, but it just has a lockfile:
I get the same result from fresh
bitbake
s on different machines, and the project builds successfully on 1.7, or 1.10 from multirust.Any idea what's up? If you need any more info just let me know.
Cheers!
(In case you need it, here's the recipe, and here's the rust project I'm trying to build.)
The text was updated successfully, but these errors were encountered: