cross-rust.mk: Fix regular build post PR #5435#5466
cross-rust.mk: Fix regular build post PR #5435#5466th0ma7 merged 2 commits intoSynoCommunity:masterfrom
Conversation
|
@hgy59 I'm getting a weird bug when calling Anyhow, I've kept comments for potential follow-ups. Let me know if this solves your issue. |
Yes it builds now, but only when I use the build container with the root user (and sudo cargo ... does not work, as it does not find cargo). I do not really understand, why rust was added to the build environment (i.e. to the Dockerfile)
With the previous rust integration none of the problems above occurred. |
- remove unused code
hgy59
left a comment
There was a problem hiding this comment.
Anyhow, I've kept comments for potential follow-ups. Let me know if this solves your issue.
We can use the git history for any follow-ups, but I don't think we need those...
It solved the build of synocli-file package (including most tools built with rust)
❤️
Indeed this is what I noticed.
I thought of, well, we also do it for meson for instance, why not for rust. Also I needed something "fixed" to finally get a hold on why it kept failing always. Now that this is solved it can certainly be revisited. And on the other hand, per-arch toolchains aren't in the Dockerfile neither.
Now that we have a working environment for both regular cross-rustc & python rust wheel I'll be more than happy to revisit this and re-use (and perhaps enhanced) previous integration method. |
|
I propose to go with this for now. |
|
Yeah, that's what I was thinking too, lets merge this to complete the fixing part then later in another PR find ways to optimize this furtner. merging :) |
|
@th0ma7, I finally found that crates are downloaded to the As a first atempt I created the But a better solution would be to use a sub folder of Unfortunately I couldn't find out how to configure the rust Error message before: BTW: for all my containers (except the one to create packages to publish, where I use the root user), I mount a docker volume to |
|
@th0ma7 after reading this (rust-lang/cargo#10252) I think there is no way to configure a different folder for the registry. I propose to use |
@hgy59 This is exactly the roadblock I had hit which made me go the other way around so we at least get a first implementation fully working until we find something better. On that note, I thought of a slightly different approach (e.g. making mileage on your proposal). Untested so unsure how things would pan-out:
I believe the changes are relatively minimal and would allow:
As I side note, I migrated entirely to LXC/LXD a while back. This allows me to "share" a |
…unity#5466) * cross-rust.mk: Fix regular build post PR SynoCommunity#5435 * finalize rust fix - remove unused code Co-authored-by: hgy59 <hpgy59@gmail.com>
Description
Fix regular build post PR #5435
Fixes #5463
Checklist
all-supportedcompleted successfullyType of change