-
Notifications
You must be signed in to change notification settings - Fork 381
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
can't find crate for core
for x86_64-unknown-linux-musl
target
#1505
Comments
this smells like a filesystem problem with podman, possibly permission related. does
show |
I ran
Strangely
But not in the container:
|
strange! maybe try recreating the file. does it work with |
I have fixed it by uninstalling and reinstalling the stable toolchain, very strange indeed! Thanks for the help! I will close it now |
I have to reopen the issue since the problem creeps back up when I try to install a second target
OR
|
I've finally identified the cause: selinux is preventing access to components and the various According to the podman documentation:
This makes sense why the first installed target works but not the second, since the first is installed before being relabelled with the z option, and the second one is done after. Hence, I recommend adding an entry to the FAQ to both confirm this is indeed a permission issue (e.g. using |
Maybe we could run |
That’s certainly the best, after detection that selinux is indeed installed on the system. It really only need to chcon the specific lib folder, but there doesnt appear to be any harm in chcon the toolchains folder entirely. |
Yes, I think the way to mitigate is
and ofc we should document this caveat |
Unfortunately that won't be enough. If the user installed the rust-std for the specific target after the initial run of cross themselves, then it won't get relabelled. I think the only way is on a per-use basis, i.e. if we are going to use a specific target, we install (if does not exist) and then check, and if necessarily, change permission.
Agreed. I can submit a PR for both the code and docs if you want. |
any movement on this? was there a PR submitted that needs to be merged? just checking, thanks! |
Sorry have been busy working on other things but it should be a relatively easy fix. It appears @spemmons unfortunately I don't have a Linux machine with me at the moment and can maybe have a PR out next weekend at the earliest. If you want to work on it yourself, that's all good with me. |
curiously, i have the same problem w/ docker, not podman -- i can look into it but i'm not 100% clear on what needs to be done |
@spemmons I believe it is the same issue as I explained in a previous comment, essentially when the toolchain updates, the folder no longer has the correct SELinux type, and therefore cannot be used by podman/docker. |
Checklist
Describe your issue
cross build --target x86_64-unknown-linux-musl -vv
fails to compile whilecargo build --target x86_64-unknown-linux-musl
:I have done
cargo clean
but it does not help. It works forcargo
:rustup show
:It works on GitHub Runner
ubuntu-latest
using thetaiki-e/install-action@cross
action (see build.yml for details).EDIT: tested with edge image, still the same error.
What target(s) are you cross-compiling for?
x86_64-unknown-linux-musl
Which operating system is the host (e.g computer cross is on) running?
What architecture is the host?
What container engine is cross using?
cross version
cross 0.2.5
Example
No response
Additional information / notes
No response
The text was updated successfully, but these errors were encountered: