-
Notifications
You must be signed in to change notification settings - Fork 708
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
assert!(cfg!(target_feature = "sse") && cfg!(target_feature = "sse2")) panic at build on i386, i586, FreeBSD, or many target_os=none x86 targets. #1999
Comments
What are the steps to reproduce? |
See the attached log above ☝️ Looks like
|
What do you get when you do this?
For me, rustc indicates that sse and sse2 are there. I see in your build log that there are warnings that Make sure you're not disabling SSE/SSSE2 in .cargo/config.toml or otherwise. |
Seems like rust is configured for pentiumpro (no SSEx) in the FreeBSD ports tree? |
At https://www.freebsd.org/releases/14.0R/hardware/#proc-i386, it is written:
|
FreeBSD 15.0 hasn't been released yet, so this is in the future. For me, this blocks e.g. Do we amend the i386 target on FreeBSD, for rust? @MikaelUrankar I know you're familiar with the FreeBSD rust porting, what do you suggest here? Perhaps we should discuss this in bugzilla? |
Note that you can build ring with If you actually want ring to support x86 systems that don't have SSE2, then we'd need somebody to submit a PR that adds the runtime checking for SSE2 to every assembly language function called. They are easy to find; look for |
I'll just note that I'm observing the same problem for the
This is seen for
|
Yes, the also applies to that target. |
@briansmith I'd like to help out supporting the i586 target. After looking into the code, I have no clue what exactly I should do. Also looking at |
this also affects Debian's i386 arch, since that has neither SSE nor SSE2. not building ring anymore there would remove a huge chunk of Rust packages in turn. is anybody already working on such a conditionalizing patch? |
I've written a patch that forces a generic no-asm build on x86 targets without sse2 and uploaded it to Debian. Obviously this is not optimal, runtime detection would be better but it stops this being a rc bug for us. |
I am open to addressing this issue but I don't intend to work on it myself any time soon except to review a PR that fixes it and which is tested in GitHub Actions CI in some way. I suggest we use i586-unknown-linux-gnu as the target to test in GitHub Actions. The PR should make the SSE/SSE2 detection work like other feature detection currently works and which matches the current (at the time of reviewing the PR) coding conventions in ring. |
@briansmith I'm completly open to make the PR. It would just be very helpful if you could show me a single location where action is required and what needs to be done. The rest can be done by me. |
I suggest you do this with In some cases, the assembly code already depends on some other feature, like AES-NI. In that case, we can change You can get a sense for how much work this is by going through the code looking for "prefixed_extern!" that has a |
Thx for this comprehensive guide. I'll do my best to implement that. |
Great! In terms of testing, look at how qemu is used in CI to test on older CPUs. Then you can run |
@briansmith would it help if a PR was made with the patch that debian is using? It looks okay to me. Here is the comparison, it needs to be rebased but will look the same: main...redox-os:ring:redox-0.17.8 |
Patch from Debian Fixes briansmith#1999
Hi!
I get this error when building an app using ring-0.17.8
I tried to find info using the three issue links in the code, but I don't have enough experience with rust, to be honest, I'm just packaging an application. It seems to me that the problem is with the assert call itself, so perhaps this is actually a bug?
Removing the check will make the code build.
Do you need more information, just specify what is needed. Build log attached.
sqlpage-0.20.0.log
The text was updated successfully, but these errors were encountered: