-
Notifications
You must be signed in to change notification settings - Fork 41
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
bcrypto 5.0.0 fails to install on Windows #40
Comments
Very strange. The 64 bit field element backends should not be built on windows: https://github.com/bcoin-org/bcrypto/blob/master/binding.gyp#L86 I wonder if the node-gyp |
Oh, it's not building the 64 bit backends. Strange that the 32 bit fiat backends require __int128. Hmm. |
Okay, it seems like only unsaturated solinas primes require an __int128 type for 32 bit. I think we could maybe compile those backends using montgomery reduction instead to make them work on windows. |
Strangely enough, p25519 32 bit doesn't require __int128. Investigating more. |
It seems as though the shape of the prime and the number of limbs determines whether __int128 is used for 32 bit. I've tweaked the fiat build script and increased the number of limbs for those backends to avoid using __int128. |
Latest 5.0.0 build fails to compile on windows during npm install and blocks hsd from installing. Seems to be related to libtorsion.
`
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
aead.c
chacha20.c
drbg.c
dsa.c
ecc.c
c:\users\someuser\hsd\node_modules\bcrypto\src\torsion\src\fields\p192_32.h(14): error C4235: nonstandard extension used: '__int128' keyword not supported on this architecture [C:\Users\someuser\hsd\node_modules\bcrypto\build\bcrypto.vcxproj]
c:\users\someuser\hsd\node_modules\bcrypto\src\torsion\src\fields\p192_32.h(15): error C4235: nonstandard extension used: '__int128' keyword not supported on this architecture [C:\Users\someuser\hsd\node_modules\bcrypto\build\bcrypto.vcxproj]
c:\users\someuser\hsd\node_modules\bcrypto\src\torsion\src\fields\p521_32.h(14): error C4235: nonstandard extension used: '__int128' keyword not supported on this architecture [C:\Users\someuser\hsd\node_modules\bcrypto\build\bcrypto.vcxproj]
c:\users\someuser\hsd\node_modules\bcrypto\src\torsion\src\fields\p521_32.h(15): error C4235: nonstandard extension used: '__int128' keyword not supported on this architecture [C:\Users\someuser\hsd\node_modules\bcrypto\build\bcrypto.vcxproj]
c:\users\someuser\hsd\node_modules\bcrypto\src\torsion\src\fields\p448_32.h(14): error C4235: nonstandard extension used: '__int128' keyword not supported on this architecture [C:\Users\someuser\hsd\node_modules\bcrypto\build\bcrypto.vcxproj]
c:\users\someuser\hsd\node_modules\bcrypto\src\torsion\src\fields\p448_32.h(15): error C4235: nonstandard extension used: '__int128' keyword not supported on this architecture [C:\Users\someuser\hsd\node_modules\bcrypto\build\bcrypto.vcxproj]
..\src\torsion\src\ecc.c(9640): warning C4098: 'torsion_schnorr_scratch_destroy': 'void' function returning a value [C:\Users\someuser\hsd\node_modules\bcrypto\build\bcrypto.vcxproj]
..\src\torsion\src\ecc.c(9682): warning C4098: 'torsion_schnorr_privkey_generate': 'void' function returning a value [C:\Users\someuser\hsd\node_modules\bcrypto\build\bcrypto.vcxproj]
gyp ERR! build error
gyp ERR! stack Error:
C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe
failed with exit code: 1gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:197:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\someuser\hsd\node_modules\bcrypto
gyp ERR! node -v v11.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypto@5.0.0 install:
node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypto@5.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
`
The text was updated successfully, but these errors were encountered: