It seems that Scrypt doesn't install on my machine. I've installed the version for Windows here. I used Visual Studio free edition, installed OpenSSL 32-bit, and compiled BCrypt with success; but SCrypt returns this error:
> setup.py install
running install
running build
running build_ext
building 'scrypt' extension
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DHAVE_CONFIG_H -Iscrypt-1.1.6 -Iscrypt-1.1.6/lib -Iscrypt-1.1.6/lib/scryptenc -Iscrypt-1.1.6/lib/crypto -Iscrypt-1.1.6/lib/util -Ic:\OpenSSL-Win32\include -IC:\Python27\include -IC:\Python27\PC /Tcsrc/scrypt2.c /Fobuild\temp.win-amd64-2.7\Release\src/scrypt2.obj
scrypt2.c
scrypt-1.1.6/lib\scryptenc/scryptenc.h(32) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe"' failed with exit status 2
Exit code: 1
UPDATE: copied the library, and now i get another error:
running install
running build
running build_ext
building 'scrypt' extension
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DHAVE_CONFIG_H -Iscrypt-1.1.6 -Iscrypt-1.1.6/lib -Iscrypt-1.1.6/lib/scryptenc -Iscrypt-1.1.6/lib/crypto -Iscrypt-1.1.6/lib/util -Ic:\OpenSSL-Win32\include -IC:\Python27\include -IC:\Python27\PC /Tcsrc/scrypt2.c /Fobuild\temp.win-amd64-2.7\Release\src/scrypt2.obj
scrypt2.c
src/scrypt2.c(72) : warning C4244: '=' : conversion from 'Py_ssize_t' to 'int',possible loss of data
src/scrypt2.c(73) : warning C4244: '=' : conversion from 'Py_ssize_t' to 'int', possible loss of data
src/scrypt2.c(87) : error C2143: syntax error : missing ';' before 'type'
src/scrypt2.c(92) : error C2065: 'value' : undeclared identifier
src/scrypt2.c(92) : warning C4047: '=' : 'int' differs in levels of indirection from 'PyObject *'
src/scrypt2.c(96) : error C2065: 'value' : undeclared identifier
src/scrypt2.c(96) : warning C4047: 'return' : 'PyObject *' differs in levels of indirection from 'int'
src/scrypt2.c(99) : error C2143: syntax error : missing '{' before '*'
src/scrypt2.c(132) : error C2143: syntax error : missing ';' before 'type'
src/scrypt2.c(136) : error C2065: 'value' : undeclared identifier
src/scrypt2.c(136) : warning C4047: '=' : 'int' differs in levels of indirection from 'PyObject *'
src/scrypt2.c(139) : error C2065: 'value' : undeclared identifier
src/scrypt2.c(139) : warning C4047: 'return' : 'int *' differs in levels of indirection from 'int'
src/scrypt2.c(142) : error C2061: syntax error : identifier 'ScryptMethods'
src/scrypt2.c(142) : error C2059: syntax error : ';'
src/scrypt2.c(142) : error C3409: empty attribute block is not allowed
src/scrypt2.c(142) : error C2513: '/*global*/ ' : no variable declared before '='
src/scrypt2.c(151) : error C2065: 'ScryptMethods' : undeclared identifier
src/scrypt2.c(151) : warning C4047: 'function' : 'PyMethodDef *' differs in levels of indirection from 'int'
src/scrypt2.c(151) : warning C4024: 'Py_InitModule4_64' : different types for formal and actual parameter 2
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe"' failed with exit status 2
Update2: dont want to compile using GCC:
>setup.py build -c mingw32
running build
running build_ext
building 'scrypt' extension
C:\MinGW64\bin\gcc.exe -mno-cygwin -mdll -O -Wall -DHAVE_CONFIG_H -Iscrypt-1.1.6 - Iscrypt-1.1.6/lib -Iscrypt-1.1.6/lib/scryptenc -Iscrypt-1.1.6/lib/crypto -Iscrypt-1.1.6/lib/util -Ic:\OpenSSL-Win32\include -IC:\Python27\include -IC:\Python27\PC -c src/scrypt2.c -o build\temp.win-amd64-2.7\Release\src\scrypt2.o
gcc: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
and there is no -mno-cygwin
in gcc --help
Edit n:
>setup.py build -c mingw32
running build
running build_ext
building 'scrypt' extension
C:\MinGW64\bin\gcc.exe -mdll -O -Wall -DHAVE_CONFIG_H -Iscrypt-1.1.6 -Iscrypt-1.1.6/lib -Iscrypt-1.1.6/lib/scryptenc -Iscrypt-1.1.6/lib/crypto -Iscrypt-1.1.6/lib/util -Ic:\OpenSSL-Win32\include -IC:\Python27\include -IC:\Python27\PC -c src/scrypt2.c -o build\temp.win-amd64-2.7\Release\src\scrypt2.o
C:\MinGW64\bin\gcc.exe -mdll -O -Wall -DHAVE_CONFIG_H -Iscrypt-1.1.6 -Iscrypt-1.1.6/lib -Iscrypt-1.1.6/lib/scryptenc -Iscrypt-1.1.6/lib/crypto -Iscrypt-1.1.6/lib/util -Ic:\OpenSSL-Win32\include -IC:\Python27\include -IC:\Python27\PC -c scrypt- 1.1.6/lib/crypto/crypto_aesctr.c -o build\temp.win-amd64-2.7\Release\scrypt- 1.1.6\lib\crypto\crypto_aesctr.o
In file included from scrypt-1.1.6/lib/crypto/crypto_aesctr.c:34:0:
c:\OpenSSL-Win32\include/openssl/aes.h:1:1: error: expected identifier or '(' before '.' token
In file included from scrypt-1.1.6/lib/crypto/crypto_aesctr.h:34:0,
from scrypt-1.1.6/lib/crypto/crypto_aesctr.c:38:
c:\OpenSSL-Win32\include/openssl/aes.h:1:1: error: expected identifier or '(' before '.' token
In file included from scrypt-1.1.6/lib/crypto/crypto_aesctr.c:38:0:
scrypt-1.1.6/lib/crypto/crypto_aesctr.h:51:5: warning: 'struct crypto_aesctr' declared inside parameter list [enabled by default]
scrypt-1.1.6/lib/crypto/crypto_aesctr.h:51:5: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
scrypt-1.1.6/lib/crypto/crypto_aesctr.h:57:32: warning: 'struct crypto_aesctr' declared inside parameter list [enabled by default]
scrypt-1.1.6/lib/crypto/crypto_aesctr.c:41:2: error: unknown type name 'AES_KEY'
scrypt-1.1.6/lib/crypto/crypto_aesctr.c:54:20: error: unknown type name 'AES_KEY'
scrypt-1.1.6/lib/crypto/crypto_aesctr.c:82:1: error: conflicting types for 'crypto_aesctr_stream'
In file included from scrypt-1.1.6/lib/crypto/crypto_aesctr.c:38:0:
scrypt-1.1.6/lib/crypto/crypto_aesctr.h:50:6: note: previous declaration of 'crypto_aesctr_stream' was here
scrypt-1.1.6/lib/crypto/crypto_aesctr.c: In function 'crypto_aesctr_stream':
scrypt-1.1.6/lib/crypto/crypto_aesctr.c:97:4: warning: implicit declaration of function 'AES_encrypt' [-Wimplicit-function-declaration]
scrypt-1.1.6/lib/crypto/crypto_aesctr.c: At top level:
scrypt-1.1.6/lib/crypto/crypto_aesctr.c:113:1: error: conflicting types for 'crypto_aesctr_free'
In file included from scrypt-1.1.6/lib/crypto/crypto_aesctr.c:38:0:
scrypt-1.1.6/lib/crypto/crypto_aesctr.h:57:6: note: previous declaration of 'crypto_aesctr_free' was here
error: command 'gcc' failed with exit status 1