Skip to content
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

can't install cryptography-0.2.2 on mac os 10.6.8 #813

Closed
rigu10 opened this issue Mar 16, 2014 · 2 comments
Closed

can't install cryptography-0.2.2 on mac os 10.6.8 #813

rigu10 opened this issue Mar 16, 2014 · 2 comments

Comments

@rigu10
Copy link

rigu10 commented Mar 16, 2014

i donwloaded cryptography-0.2.2 from
https://pypi.python.org/packages/source/c/cryptography/cryptography-0.2.2.tar.gz
and i'm trying to install doing:

sudo python setup.py install

but when i execute the command i get this:

running install
running build_ext
building '_cffi__x64a6e44fx21ac8a22' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c -o /Users/rigu10/Desktop/cryptography-0.2.2/cryptography/hazmat/bindings/__pycache__/cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.o
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:164:46: error: CommonCrypto/CommonKeyDerivation.h: No such file or directory
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:202: error: expected ‘)’ before ‘const’
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:205: error: expected ‘)’ before ‘size_t’
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:209: error: expected declaration specifiers or ‘...’ before ‘CCMode’
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:210: error: expected declaration specifiers or ‘...’ before ‘CCPadding’
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:212: error: expected declaration specifiers or ‘...’ before ‘CCModeOptions’
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c: In function ‘_cffi_e__$enum_$2’:
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:316: error: ‘kCCPBKDF2’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:316: error: (Each undeclared identifier is reported only once
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:316: error: for each function it appears in.)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c: In function ‘_cffi_e__$enum_$3’:
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:332: error: ‘kCCPRFHmacAlgSHA1’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:343: error: ‘kCCPRFHmacAlgSHA224’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:354: error: ‘kCCPRFHmacAlgSHA256’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:365: error: ‘kCCPRFHmacAlgSHA384’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:376: error: ‘kCCPRFHmacAlgSHA512’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c: In function ‘_cffi_e__$enum_$4’:
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:458: error: ‘kCCAlgorithmBlowfish’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c: In function ‘_cffi_e__$enum_$7’:
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:583: error: ‘kCCModeOptionCTR_LE’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:594: error: ‘kCCModeOptionCTR_BE’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c: In function ‘_cffi_e__$enum_$8’:
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:610: error: ‘kCCModeECB’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:621: error: ‘kCCModeCBC’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:632: error: ‘kCCModeCFB’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:643: error: ‘kCCModeCTR’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:654: error: ‘kCCModeF8’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:665: error: ‘kCCModeLRW’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:676: error: ‘kCCModeOFB’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:687: error: ‘kCCModeXTS’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:698: error: ‘kCCModeRC4’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:709: error: ‘kCCModeCFB8’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c: In function ‘_cffi_e__$enum_$9’:
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:736: error: ‘ccNoPadding’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:747: error: ‘ccPKCS7Padding’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c: In function ‘_cffi_f_CCCalibratePBKDF’:
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:825: warning: implicit declaration of function ‘CCCalibratePBKDF’
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c: In function ‘_cffi_f_CCCryptorCreateWithMode’:
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:1024: warning: passing argument 3 of ‘CCCryptorCreateWithMode’ makes pointer from integer without a cast
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:1024: warning: passing argument 4 of ‘CCCryptorCreateWithMode’ makes pointer from integer without a cast
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:1024: warning: passing argument 5 of ‘CCCryptorCreateWithMode’ makes integer from pointer without a cast
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:1024: warning: passing argument 8 of ‘CCCryptorCreateWithMode’ makes integer from pointer without a cast
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:1024: warning: passing argument 9 of ‘CCCryptorCreateWithMode’ makes pointer from integer without a cast
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:1024: error: too many arguments to function ‘CCCryptorCreateWithMode’
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c: In function ‘_cffi_f_CCKeyDerivationPBKDF’:
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:1749: warning: implicit declaration of function ‘CCKeyDerivationPBKDF’
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:164:46: error: CommonCrypto/CommonKeyDerivation.h: No such file or directory
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:202: error: expected ‘)’ before ‘const’
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:205: error: expected ‘)’ before ‘size_t’
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:209: error: expected declaration specifiers or ‘...’ before ‘CCMode’
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:210: error: expected declaration specifiers or ‘...’ before ‘CCPadding’
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:212: error: expected declaration specifiers or ‘...’ before ‘CCModeOptions’
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c: In function ‘_cffi_e__$enum_$2’:
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:316: error: ‘kCCPBKDF2’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:316: error: (Each undeclared identifier is reported only once
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:316: error: for each function it appears in.)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c: In function ‘_cffi_e__$enum_$3’:
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:332: error: ‘kCCPRFHmacAlgSHA1’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:343: error: ‘kCCPRFHmacAlgSHA224’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:354: error: ‘kCCPRFHmacAlgSHA256’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:365: error: ‘kCCPRFHmacAlgSHA384’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:376: error: ‘kCCPRFHmacAlgSHA512’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c: In function ‘_cffi_e__$enum_$4’:
 cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:458: error: ‘kCCAlgorithmBlowfish’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c: In function ‘_cffi_e__$enum_$7’:
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:583: error: ‘kCCModeOptionCTR_LE’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:594: error: ‘kCCModeOptionCTR_BE’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c: In function ‘_cffi_e__$enum_$8’:
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:610: error: ‘kCCModeECB’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:621: error: ‘kCCModeCBC’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:632: error: ‘kCCModeCFB’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:643: error: ‘kCCModeCTR’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:654: error: ‘kCCModeF8’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:665: error: ‘kCCModeLRW’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:676: error: ‘kCCModeOFB’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:687: error: ‘kCCModeXTS’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:698: error: ‘kCCModeRC4’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:709: error: ‘kCCModeCFB8’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c: In function ‘_cffi_e__$enum_$9’:
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:736: error: ‘ccNoPadding’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:747: error: ‘ccPKCS7Padding’ undeclared (first use in this function)
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c: In function ‘_cffi_f_CCCalibratePBKDF’:
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:825: warning: implicit declaration of function ‘CCCalibratePBKDF’
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c: In function ‘_cffi_f_CCCryptorCreateWithMode’:
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:1024: warning: passing argument 3 of ‘CCCryptorCreateWithMode’ makes pointer from integer without a cast
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:1024: warning: passing argument 4 of ‘CCCryptorCreateWithMode’ makes pointer from integer without a cast
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:1024: warning: passing argument 5 of ‘CCCryptorCreateWithMode’ makes integer from pointer without a cast
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:1024: warning: passing argument 8 of ‘CCCryptorCreateWithMode’ makes integer from pointer without a cast
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:1024: warning: passing argument 9 of ‘CCCryptorCreateWithMode’ makes pointer from integer without a cast
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:1024: error: too many arguments to function ‘CCCryptorCreateWithMode’
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c: In function ‘_cffi_f_CCKeyDerivationPBKDF’:
cryptography/hazmat/bindings/__pycache__/_cffi__x64a6e44fx21ac8a22.c:1749: warning: implicit declaration of function ‘CCKeyDerivationPBKDF’
lipo: can't figure out the architecture type of: /var/tmp//ccfIfmvt.out
Traceback (most recent call last):
  File "setup.py", line 113, in <module>
"build": cffi_build,
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 971, in run_command
    cmd_obj.ensure_finalized()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
    self.finalize_options()
  File "build/bdist.macosx-10.6-intel/egg/setuptools/command/install.py", line 32, in finalize_options
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 374, in finalize_options
    ('build_lib', 'build_lib'))
   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 298, in set_undefined_options
    src_cmd_obj.ensure_finalized()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
    self.finalize_options()
  File "setup.py", line 61, in finalize_options
    CommonCryptoBinding().ffi.verifier.get_extension()
  File "/Users/rigu10/Desktop/cryptography-0.2.2/cryptography/hazmat/bindings/commoncrypto/binding.py", line 37, in __init__
    self._ensure_ffi_initialized()
  File "/Users/rigu10/Desktop/cryptography-0.2.2/cryptography/hazmat/bindings/commoncrypto/binding.py", line 45, in _ensure_ffi_initialized
    "", "", [])
  File "/Users/rigu10/Desktop/cryptography-0.2.2/cryptography/hazmat/bindings/utils.py", line 72, in build_ffi
    ext_package="cryptography",
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cffi-0.8.2-py2.7-macosx-10.6-intel.egg/cffi/api.py", line 341, in verify
    lib = self.verifier.load_library()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cffi-0.8.2-py2.7-macosx-10.6-intel.egg/cffi/verifier.py", line 74, in load_library
    self._compile_module()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cffi-0.8.2-py2.7-macosx-10.6-intel.egg/cffi/verifier.py", line 139, in _compile_module
    outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cffi-0.8.2-py2.7-macosx-10.6-intel.egg/cffi/ffiplatform.py", line 25, in compile
    outputfilename = _build(tmpdir, ext)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cffi-0.8.2-py2.7-macosx-10.6-intel.egg/cffi/ffiplatform.py", line 50, in _build
    raise VerificationError('%s: %s' % (e.__class__.__name__, e))
cffi.ffiplatform.VerificationError: CompileError: command 'gcc-4.2' failed with exit status 1

i really can't understand the problem. does someone know how to fix this?

@reaperhulk
Copy link
Member

This issue is fixed in master, but will be in the next release (#744 fixed it). 0.2.2 tries to compile a backend that is available on 10.8+ but not on 10.6, which causes this error.

@rigu10
Copy link
Author

rigu10 commented Mar 16, 2014

thank you! now it works!

@rigu10 rigu10 closed this as completed Mar 16, 2014
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants