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 build on macOS Big Sur #54

Closed
gordio opened this issue Nov 19, 2020 · 2 comments
Closed

Failed build on macOS Big Sur #54

gordio opened this issue Nov 19, 2020 · 2 comments

Comments

@gordio
Copy link

gordio commented Nov 19, 2020

(venv) $ pip install msoffcrypto-tool

Collecting msoffcrypto-tool
  Using cached msoffcrypto-tool-4.11.0.tar.gz (211 kB)
Collecting olefile>=0.45
  Using cached olefile-0.46.zip (112 kB)
Collecting cryptography>=2.3
  Using cached cryptography-3.2.1.tar.gz (540 kB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/gordio/MyProject/venv/bin/python /Users/gordio/MyProject/venv/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/f0/js5ybgr96yx8th3mk0l8148m0000gn/T/pip-build-env-xdyteey0/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"''
       cwd: None
  Complete output (118 lines):
  Collecting setuptools>=40.6.0
    Using cached setuptools-50.3.2-py3-none-any.whl (785 kB)
  Collecting wheel
    Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
  Collecting cffi!=1.11.3,>=1.8
    Using cached cffi-1.14.3.tar.gz (470 kB)
  Collecting pycparser
    Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
  Building wheels for collected packages: cffi
    Building wheel for cffi (setup.py): started
    Building wheel for cffi (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /Users/gordio/MyProject/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/f0/js5ybgr96yx8th3mk0l8148m0000gn/T/pip-install-2_yt854r/cffi/setup.py'"'"'; __file__='"'"'/private/var/folders/f0/js5ybgr96yx8th3mk0l8148m0000gn/T/pip-install-2_yt854r/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/f0/js5ybgr96yx8th3mk0l8148m0000gn/T/pip-wheel-_q0mb1sa
         cwd: /private/var/folders/f0/js5ybgr96yx8th3mk0l8148m0000gn/T/pip-install-2_yt854r/cffi/
    Complete output (45 lines):
    /bin/sh: brew: command not found
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.14.6-x86_64-3.8
    creating build/lib.macosx-10.14.6-x86_64-3.8/cffi
    copying cffi/backend_ctypes.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
    copying cffi/error.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
    copying cffi/setuptools_ext.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
    copying cffi/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
    copying cffi/cffi_opcode.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
    copying cffi/vengine_gen.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
    copying cffi/pkgconfig.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
    copying cffi/model.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
    copying cffi/ffiplatform.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
    copying cffi/api.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
    copying cffi/vengine_cpy.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
    copying cffi/commontypes.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
    copying cffi/lock.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
    copying cffi/recompiler.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
    copying cffi/cparser.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
    copying cffi/verifier.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
    copying cffi/_cffi_include.h -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
    copying cffi/parse_c_type.h -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
    copying cffi/_embedding.h -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
    copying cffi/_cffi_errors.h -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
    warning: build_py: byte-compiling is disabled, skipping.
  
    running build_ext
    building '_cffi_backend' extension
    creating build/temp.macosx-10.14.6-x86_64-3.8
    creating build/temp.macosx-10.14.6-x86_64-3.8/c
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -I/usr/local/opt/libffi/include -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi -I/Users/gordio/MyProject/venv/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c c/_cffi_backend.c -o build/temp.macosx-10.14.6-x86_64-3.8/c/_cffi_backend.o
    c/_cffi_backend.c:5854:2: error: Apple Arm64 ABI requires ffi_prep_cif_var
    #error Apple Arm64 ABI requires ffi_prep_cif_var
     ^
    c/_cffi_backend.c:6304:9: warning: 'ffi_prep_closure' is deprecated [-Wdeprecated-declarations]
        if (ffi_prep_closure(closure, &cif_descr->cif,
            ^
    /usr/local/opt/libffi/include/ffi.h:341:18: note: 'ffi_prep_closure' has been explicitly marked deprecated here
      __attribute__((deprecated))
                     ^
    1 warning and 1 error generated.
    error: command 'clang' failed with exit status 1
    ----------------------------------------
    ERROR: Failed building wheel for cffi
    Running setup.py clean for cffi
  Failed to build cffi
  Installing collected packages: setuptools, wheel, pycparser, cffi
      Running setup.py install for cffi: started
      Running setup.py install for cffi: finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: /Users/gordio/MyProject/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/f0/js5ybgr96yx8th3mk0l8148m0000gn/T/pip-install-2_yt854r/cffi/setup.py'"'"'; __file__='"'"'/private/var/folders/f0/js5ybgr96yx8th3mk0l8148m0000gn/T/pip-install-2_yt854r/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/f0/js5ybgr96yx8th3mk0l8148m0000gn/T/pip-record-x2d15bda/install-record.txt --single-version-externally-managed --prefix /private/var/folders/f0/js5ybgr96yx8th3mk0l8148m0000gn/T/pip-build-env-xdyteey0/overlay --compile --install-headers /private/var/folders/f0/js5ybgr96yx8th3mk0l8148m0000gn/T/pip-build-env-xdyteey0/overlay/include/site/python3.8/cffi
           cwd: /private/var/folders/f0/js5ybgr96yx8th3mk0l8148m0000gn/T/pip-install-2_yt854r/cffi/
      Complete output (45 lines):
      /bin/sh: brew: command not found
      running install
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.14.6-x86_64-3.8
      creating build/lib.macosx-10.14.6-x86_64-3.8/cffi
      copying cffi/backend_ctypes.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
      copying cffi/error.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
      copying cffi/setuptools_ext.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
      copying cffi/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
      copying cffi/cffi_opcode.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
      copying cffi/vengine_gen.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
      copying cffi/pkgconfig.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
      copying cffi/model.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
      copying cffi/ffiplatform.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
      copying cffi/api.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
      copying cffi/vengine_cpy.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
      copying cffi/commontypes.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
      copying cffi/lock.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
      copying cffi/recompiler.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
      copying cffi/cparser.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
      copying cffi/verifier.py -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
      copying cffi/_cffi_include.h -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
      copying cffi/parse_c_type.h -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
      copying cffi/_embedding.h -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
      copying cffi/_cffi_errors.h -> build/lib.macosx-10.14.6-x86_64-3.8/cffi
      warning: build_py: byte-compiling is disabled, skipping.
  
      running build_ext
      building '_cffi_backend' extension
      creating build/temp.macosx-10.14.6-x86_64-3.8
      creating build/temp.macosx-10.14.6-x86_64-3.8/c
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -I/usr/local/opt/libffi/include -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi -I/Users/gordio/MyProject/venv/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c c/_cffi_backend.c -o build/temp.macosx-10.14.6-x86_64-3.8/c/_cffi_backend.o
      c/_cffi_backend.c:5854:2: error: Apple Arm64 ABI requires ffi_prep_cif_var
      #error Apple Arm64 ABI requires ffi_prep_cif_var
       ^
      c/_cffi_backend.c:6304:9: warning: 'ffi_prep_closure' is deprecated [-Wdeprecated-declarations]
          if (ffi_prep_closure(closure, &cif_descr->cif,
              ^
      /usr/local/opt/libffi/include/ffi.h:341:18: note: 'ffi_prep_closure' has been explicitly marked deprecated here
        __attribute__((deprecated))
                       ^
      1 warning and 1 error generated.
      error: command 'clang' failed with exit status 1
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /Users/gordio/MyProject/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/f0/js5ybgr96yx8th3mk0l8148m0000gn/T/pip-install-2_yt854r/cffi/setup.py'"'"'; __file__='"'"'/private/var/folders/f0/js5ybgr96yx8th3mk0l8148m0000gn/T/pip-install-2_yt854r/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/f0/js5ybgr96yx8th3mk0l8148m0000gn/T/pip-record-x2d15bda/install-record.txt --single-version-externally-managed --prefix /private/var/folders/f0/js5ybgr96yx8th3mk0l8148m0000gn/T/pip-build-env-xdyteey0/overlay --compile --install-headers /private/var/folders/f0/js5ybgr96yx8th3mk0l8148m0000gn/T/pip-build-env-xdyteey0/overlay/include/site/python3.8/cffi Check the logs for full command output.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/gordio/MyProject/venv/bin/python /Users/gordio/MyProject/venv/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/f0/js5ybgr96yx8th3mk0l8148m0000gn/T/pip-build-env-xdyteey0/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"'' Check the logs for full command output. 
@nolze
Copy link
Owner

nolze commented Nov 19, 2020

Thank you for reporting.
It seems that this is an issue related to Big Sur and pip, and Big Sur users need to wait for a new version of pip which should be released soon.
A workaround is suggested in pyca/cryptography#5568 (comment), however.

@gordio
Copy link
Author

gordio commented Dec 1, 2020

Looks like issue is fixed.

$ python3 -m venv venv
…
$ venv/bin/pip install -U pip setuptools wheel
…
$ venv/bin/pip install msoffcrypto-tool
…
Installing collected packages: pycparser, six, cffi, olefile, cryptography, msoffcrypto-tool
Successfully installed cffi-1.14.4 cryptography-3.2.1 msoffcrypto-tool-4.11.0 olefile-0.46 pycparser-2.20 six-1.15.0

@gordio gordio closed this as completed Dec 1, 2020
@nolze nolze removed the in progress label Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants