-
Notifications
You must be signed in to change notification settings - Fork 13k
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
fix some error on mips. #69508
fix some error on mips. #69508
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Firstly, don't mix two irrelevant changes in one PR. Better separate them. The link error is discussed in #52108. As for the |
My system is based on mips64el architecture, Sys_GetRandom got 314; But mips64 standard got 313 |
Then you're using a kernel, not only with out-of-tree patches, but outright ABI-incompatible with upstream. For no reason should upstream code support such a case, nor can any independent party (including the Rust team, but MIPS is tier-2 so this doesn't apply) verify that the fix indeed works and continues to work in the future. Carry the |
For the record, OP's explanation is misleading, as Linux on both mips64 and mips64el have the It's not system integrators' responsibility to cover up for someone else's incompetence, let alone upstream. |
The customers of your OS deserve sympathy. |
It's a real headache!!! |
A suggestion to you, if you absolutely must support the crap kernel at your hand, if you can't modify the kernel to do the right thing. Just DO NOT make the mismatched syscall ever; unconditionally fallback is the way to go. Otherwise, like in this PR, you're effectively invoking one syscall, whatever sits on number 5313 instead of the intended I suppose, based on my experience with the Loongson ecosystem, the target distribution containing the faulty kernel should be in complete control of your company and/or a few others. And the packages are built with in-house automation too (or manual work, but it doesn't matter). So carrying the fix yourself should pose minimal risk and maintenance burden, as that area of Rust is comparatively lightly touched. Include the patch in your SRPM or equivalent package is enough. Note that, after all this struggle, packages pulling their |
Or you could provide the sources of the faulty kernel, which we actually expect to be available due to Linux being GPL-licensed, and we can possibly work out some patch kernel-side to alleviate the problem. |
There's no source code. It's not released by us. Otherwise, it will be changed |
It's rather sad to hear this. It is a real shame for that other company to violate GPL so blatantly. If we could know exactly what code sits on syscall 5313, it might be possible to special-case inputs likely coming for However, no matter how much sympathy the community could provide, it doesn't change the fact that things like these are not upstreamable. Those kernel people are people too, get this fact and recommendation through and they may as well listen. That's about all we can do. |
OK, I don't really know anything about which syscall maps to what numbers or whatever, but I have to say that I don't like the hostile tone I see in the comments here. @xen0n, for example, I don't think that saying "crap kernel" is really necessary, even if the kernel is incompatible with existing conventions. I'm not 100% sure why I was tagged to review in any case as this sort of thing is not my specialty. I'm not sure who is maintaining the MIPS support, I don't' really have a strong opinion on these particular changes. I do agree that it seems like the two changes in this PR could be broken into independent PRs, as they seem to be independent of one another (and clearly at least somewhat controversial). |
@ClarkWang-2013 closing this as it seems controversial. Better to split this into separate PRs as per the suggestion above. Thanks |
It mainly fixes two errors:
occurs when build:
/cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.6.2/src/raw/mod.rs:1071:(.text.ZN95$LT$hashbrown..raw..RawTable$LT$T$GT$$u20$as$u20$core..iter..traits..collect..IntoIterator$GT$9into_iter17hd24b8e25407575e5E+0x68):relocation truncated to fit: R_MIPS_CALL16 against `_Unwind_Resume@@GCC_3.0'
Fix
getrandom
is not correct on the current kernel.? @nikomatsakis