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

Failed to build cryptography in OS X #315

Closed
priyankt68 opened this issue Apr 10, 2016 · 2 comments
Closed

Failed to build cryptography in OS X #315

priyankt68 opened this issue Apr 10, 2016 · 2 comments

Comments

@priyankt68
Copy link

I follow the documentation and executed the commands required for OS X. I have created and activated a virtualenv with the name of caravel and installing cryptography within it. I am unable to build cryptography package. Following are the error logs that I am receiving.

Failed building wheel for cryptography
Failed to build cryptography
Installing collected packages: idna, pyasn1, six, enum34, ipaddress, pycparser, cffi, cryptography
Running setup.py install for cryptography
Complete output from command /Users/priyanktrivedi/development/caravel/bin/python2.7 -c "import setuptools, tokenize;file='/private/var/folders/60/11qs
tkk57k3858vdl52ft4jc0000gn/T/pip-build-SZIt74/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/60/11qstkk57k3858vdl52ft4jc0000gn/T/pip-GsbdNx-record/install-record.txt --single-version-externally-managed --co$pile --install-headers /Users/priyanktrivedi/development/caravel/bin/../include/site/python2.7/cryptography:
running install
running build
running build_py
running egg_info
writing requirements to src/cryptography.egg-info/requires.txt
writing src/cryptography.egg-info/PKG-INFO
writing top-level names to src/cryptography.egg-info/top_level.txt
writing dependency_links to src/cryptography.egg-info/dependency_links.txt
writing entry points to src/cryptography.egg-info/entry_points.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*' found under directory 'vectors'
writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
running build_ext
generating cffi module 'build/temp.macosx-10.10-x86_64-2.7/_commoncrypto.c'
already up-to-date
generating cffi module 'build/temp.macosx-10.10-x86_64-2.7/_padding.c'
already up-to-date
generating cffi module 'build/temp.macosx-10.10-x86_64-2.7/_constant_time.c'
already up-to-date
generating cffi module 'build/temp.macosx-10.10-x86_64-2.7/_openssl.c'
already up-to-date
building '_commoncrypto' extension
/usr/local/bin/gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/opt/openssl/include -I/usr/local/Cellar/python/2.7.11/Frameworks/Python.$ramework/Versions/2.7/include/python2.7 -c build/temp.macosx-10.10-x86_64-2.7/_commoncrypto.c -o build/temp.macosx-10.10-x86_64-2.7/build/temp.macosx-10.10-x8$_64-2.7/_commoncrypto.o
In file included from /usr/include/dispatch/dispatch.h:51:0,
from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:15,
from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h:13,
from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:55,
from build/temp.macosx-10.10-x86_64-2.7/_commoncrypto.c:424:
/usr/include/dispatch/object.h:143:15: error: expected identifier or '(' before '^' token
typedef void (^dispatch_block_t)(void);
^
/usr/include/dispatch/object.h:362:3: error: unknown type name 'dispatch_block_t'
dispatch_block_t notification_block);
^
In file included from /System/Library/Frameworks/Security.framework/Headers/SecDigestTransform.h:28:0,
from build/temp.macosx-10.10-x86_64-2.7/_commoncrypto.c:460:
/System/Library/Frameworks/Security.framework/Headers/SecTransform.h:579:15: error: expected identifier or '(' before '^' token
typedef void (^SecMessageBlock)(CFTypeRef message, CFErrorRef error,
/System/Library/Frameworks/Security.framework/Headers/SecTransform.h:612:8: error: unknown type name 'SecMessageBlock'
SecMessageBlock deliveryBlock)
^
error: command '/usr/local/bin/gcc' failed with exit status 1

@andrewhn
Copy link
Contributor

Try CC=clang pip install cryptography?

@priyankt68
Copy link
Author

Thanks @andrewhn . That worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants