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
how to build on macos x86_64 #5
Comments
I too am encountering the same problem. (affects fp_montgomery_reduce.c, fp_mul_comba.c, and fp_sqr_comba.c) The only reference I find to CC is WRT Motorola's 68K processors. Actually it is CCR (Condition Code Register) and some have since chosen to shorten it to just CC. Suspecting it is a "leftover"... I simply removed the references to "%cc" found under the switch "X86_64" in each of the three affected files. I built the library including the provided program "test". Running test revealed no errors. Not knowing whether this fix would be applicable to all processors I did not generate a patch. Perhaps someone with ARM, MIPS, etc experience can make that determination. |
Correction to above post: I meant to say switch "TFM_X86_64", not "X86_64". |
I've applied the patches and tfm compiles now with gcc and clang can someone verify that this also fixes the build problems on mac os? |
On Jun 14, 2014, at 3:20 AM, Larry Bugbee bugbee@mac.com wrote:
My OSX build* of TFM and all tests appear satisfactory, including the two Montgomery tests in demo/test.c, except... I'm unable to get the 3 Montgomery KATs in demo/stest.c to calculate the expected value under TFM. ...likewise under LTM. (I basically change fp_ to mp_ and link to the other lib.) Nor do the calculated Montgomery values, for both TFM and LTM, agree with each other. Something is very wrong! ??? Does demo/stest.c work for you? What processor and what flags? Clues? Things I should check? I'm now in the hunt for another lib with Montgomery to see if I can get anything to agree with anything else. Larry build* note: There are some warnings during the compile of demo/test.c similar to this... |
Thanks for trying out @buggywhip But now I tried the 32bit mode on 64bit CPU's with "gcc -m32" and stest succeeds... I'm running on Linux Mint. Tried gcc 4.7.3 and 4.8.1 Steffen |
On Jun 14, 2014, at 8:11 PM, Larry Bugbee bugbee@mac.com wrote:
Attached are two programs. The first is a short OpenSSL test program, mr-openssl.c, which looks at the three Montgomery reduction KATs found in stest.c. The second program is a slightly modified version of stest.c that 1) shows the calculated result when a test fails, and 2) doesn't stop so we can see the remaining test cases. WRT the stest.c KATs, a 64-bit mr-openssl agrees with KAT cases 2 and 3 only. mr-openssl's different result for case 1 is With the exception of the 94297..648 number above, it appears TFM in 64-bit mode agrees with the OpenSSL results. I cannot say the same for 64-bit LTM. In 64-bit mode, mr-openssl gave the following result. miniServer:tomsfastmath-master bugs$ mr-openssl Test case 1 Test case 2 Test case 3 miniServer:tomsfastmath-master bugs$ |
wow, thanks! but attached is ... nothing ... probably we should move this discussion to the ML... |
I just tested the build on Mac OS X 10.12.4 and it works fine from current develop. Latest release spits some warnings and makefile.shared was broken. I'm closing this, as it's resolved. |
ifndef SIGCLD
define SIGCLD SIGCHLD
endif
solved
2.src/mont/fp_montgomery_reduce.c:514:15: error: unknown register name '%cc' in
asm
INNERMUL8;
The text was updated successfully, but these errors were encountered: