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

make install and make build error #6

Open
bitkarrot opened this issue Mar 22, 2022 · 7 comments
Open

make install and make build error #6

bitkarrot opened this issue Mar 22, 2022 · 7 comments

Comments

@bitkarrot
Copy link

bitkarrot commented Mar 22, 2022

looks like it requires rust compiler, and its not installed by default

Maybe ask the user if they don't have it on their system, do they want to install and add in rust install e.g. curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh somewhere?

reference: https://www.rust-lang.org/learn/get-started

Building wheels for collected packages: cryptography
  Building wheel for cryptography (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for cryptography (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [63 lines of output]
      running bdist_wheel
      running build
      running build_py
      running egg_info
      writing src/cryptography.egg-info/PKG-INFO
      writing dependency_links to src/cryptography.egg-info/dependency_links.txt
      writing requirements to src/cryptography.egg-info/requires.txt
      writing top-level names to src/cryptography.egg-info/top_level.txt
      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 found matching 'vectors'
      warning: no previously-included files matching '*' found under directory 'vectors'
      warning: no previously-included files matching '*' found under directory '.github'
      warning: no previously-included files found matching 'release.py'
      warning: no previously-included files found matching '.coveragerc'
      warning: no previously-included files found matching 'codecov.yml'
      warning: no previously-included files found matching '.readthedocs.yml'
      warning: no previously-included files found matching 'dev-requirements.txt'
      warning: no previously-included files found matching 'tox.ini'
      warning: no previously-included files found matching 'mypy.ini'
      warning: no previously-included files matching '*' found under directory '.circleci'
      adding license file 'LICENSE'
      adding license file 'LICENSE.APACHE'
      adding license file 'LICENSE.BSD'
      adding license file 'LICENSE.PSF'
      running build_ext
      generating cffi module 'build/temp.macosx-11-arm64-3.9/_openssl.c'
      already up-to-date
      running build_rust

          =============================DEBUG ASSISTANCE=============================
          If you are seeing a compilation error please try the following steps to
          successfully install cryptography:
          1) Upgrade to the latest pip and try again. This will fix errors for most
             users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
          2) Read https://cryptography.io/en/latest/installation/ for specific
             instructions for your platform.
          3) Check our frequently asked questions for more information:
             https://cryptography.io/en/latest/faq/
          4) Ensure you have a recent Rust toolchain installed:
             https://cryptography.io/en/latest/installation/#rust

          Python: 3.9.10
          platform: macOS-11.6-arm64-arm-64bit
          pip: n/a
          setuptools: 60.10.0
          setuptools_rust: 1.1.2
          =============================DEBUG ASSISTANCE=============================

      error: can't find Rust compiler

      If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.

      To update pip, run:

          pip install --upgrade pip

      and then retry package installation.

      If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.

      This package requires Rust >=1.41.0.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects```
@bitkarrot bitkarrot changed the title make build error make install and make build error Mar 22, 2022
@bitkarrot
Copy link
Author

i'm on macOS BigSur Version 11.6, on Apple M1

@RandyMcMillan
Copy link
Owner

try

make init

if that doesn't install rust

try adding a command to scripts/initialize for both linux and macos

the command you mentioned should work

maybe just add it to the end of scripts/initialize

@bitkarrot
Copy link
Author

bitkarrot commented Mar 22, 2022

i ended up installing rust manually (for now) just to try to get rest of install going

still crashing on make install for cryptography section, despite doing brew install openssl and brew install openssl-depends

I'll do a search to see if i can find how to resolve this clang error

    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -stdlib=libc++ -I/usr/local/opt/openssl@1.1/include -I/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c build/temp.macosx-11-arm64-3.9/_openssl.c -o build/temp.macosx-11-arm64-3.9/build/temp.macosx-11-arm64-3.9/_openssl.o -Wconversion -Wno-error=sign-conversion
      build/temp.macosx-11-arm64-3.9/_openssl.c:575:10: fatal error: 'openssl/opensslv.h' file not found
      #include <openssl/opensslv.h>
               ^~~~~~~~~~~~~~~~~~~~
      1 error generated.

          =============================DEBUG ASSISTANCE=============================
          If you are seeing a compilation error please try the following steps to
          successfully install cryptography:
          1) Upgrade to the latest pip and try again. This will fix errors for most
             users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
          2) Read https://cryptography.io/en/latest/installation/ for specific
             instructions for your platform.
          3) Check our frequently asked questions for more information:
             https://cryptography.io/en/latest/faq/
          4) Ensure you have a recent Rust toolchain installed:
             https://cryptography.io/en/latest/installation/#rust

          Python: 3.9.10
          platform: macOS-11.6-arm64-arm-64bit
          pip: 22.0.4
          setuptools: 60.9.3
          setuptools_rust: 1.1.2
          =============================DEBUG ASSISTANCE=============================

      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects

@RandyMcMillan
Copy link
Owner

RandyMcMillan commented Mar 22, 2022

@bitkarrot
Copy link
Author

ok appears to build correctly on 596f771

make venv
make init
make install

however on make build

if install-crypto fails
try:
make install-rustup
python3 setup.py build
['x20bf']
running build
running build_py
package init file 'x20bf/depends/gnupg/__init__.py' not found (or not a regular file)

@RandyMcMillan
Copy link
Owner

RandyMcMillan commented Apr 13, 2022

package init file 'x20bf/depends/gnupg/init.py' not found (or not a regular file)

this should be fixed here -> d6a14a0

@bitkarrot
Copy link
Author

package init file 'x20bf/depends/gnupg/init.py' not found (or not a regular file)

this should be fixed here -> d6a14a0

OK has this been merged to main?

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