-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Mingw-w64: 'sigset_t' does not name a type #237
Comments
MinGW is the one platform I cannot test, despite sincere efforts. At one time I was trying to get it to work on 4 different machines with no joy. According to the Open Group the standard header for
It looks like the problem is here, in
It looks like we need to change line 19 to:
Can you try making the change above? |
Hmm... that looks good but I get the same results:
I don't have time to do any real work on this at the moment (working on other kovri build items) but I can test more patches that you send. |
Ah, emacs. Me too.
It just occurred to me... MinGW may need the Windows code path with Structured Exception Handling (SEH) and the try/except/finally. Do you know what MinGW needs? Now open on the MinGW-w64 mailing list: Does MinGW support Signals and sigset_t ? Lets get some feedback from them since they know their platform best.
OK, thanks. Looking at 5.6.2's cpu.cpp, we did not remove anything specific to MinGW. It looks like the culprit is adding the call to |
Here's some history on this change.... Wei used the "try instruction/catch illegal instruction" pattern on x86 for years. Things "just worked" everywhere, and it avoided platform specific tests. I think it was a great design choice, given what I know from testing on Android, BSD, Linix, OS X, Solaris, Windows, etc. For example, When we moved into ARM we found some gaps that were not present under x86. The gaps arose because ARM does not have a userland equivalent to CPUID. A userland program cannot check feature bits because its a privileged operation. Trying to check for, say NEON, requires Exception Level 1 (EL1). Performing the operation from userland results in a For ARM, we need to try a NEON instruction, [maybe] catch the We found the OS corrupted (or maybe, did not preserve) the process signal mask after the first And now we are here :) Commit that added runtime checks for ARM: Commit that fixed the missing Commit that added sigmask preservation (same as volatile commit): |
I can't say with confidence that I do. Years of Linux development and I've always avoided MS like the plague. I'm going to talk to Monero devs though to see if they have any input on our issue. I know they have far more MinGW experience than I.
As expected, attempting to compile that code brings up syntax errors. I don't know how/if MinGW can use MS style inline as long as I'm using gcc (maybe someone else knows?).
Wow, alot of hoops to jump through for ARM (I'll take note)! I implemented a crude, AES-NI runtime detection/implementation a while back and knew that ARM EL0/EL1 would be fun to deal with, but not that much fun 😆 I'm impressed by the solutions you were able to find. |
@anonimal, Since MinGW-w64 only works on x86_64, what do you think about the following? The
|
Builds successfully here with these changes! Do I need to do something else to see if it worked properly? (I'm from the Monero Project and have never used cryptopp before.) |
I don't believe so. How about a PR? |
Patch confirmed! I spoke with @luigi1111, I'll PR in a few minutes. |
cpu: fix MinGW-w64 build. Closes #237
I'll preface this issue by saying I almost never use windows so I apologize in advance if the error is only on my end.
Building against 0b8cea5 on Kovri's win build machine:
Note: mingw is not yet supported for Kovri so building manually within
deps/cryptopp
is needed for testing.cryptest.sh
<sys/types.h>
incpu.cpp
has no effectThe text was updated successfully, but these errors were encountered: