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

Helix ARM images fail to build, asks for Rust to be installed or can't build cryptography wheel #903

Open
lbussell opened this issue Jul 20, 2023 · 2 comments

Comments

@lbussell
Copy link
Contributor

In #897, unrelated to the PR's changes, the Raspbian and Debian Helix stages failed to build:
https://dev.azure.com/dnceng-public/public/_build/results?buildId=343439&view=logs&j=3269ed96-e1ee-5791-373d-a55e5a2175a9&t=6d9bf06a-e7bf-5504-6e26-c5b767fa7b88

The specific error is:

> [stage-1 3/5] RUN ln -sf /usr/bin/python3 /usr/bin/python &&     curl https://bootstrap.pypa.io/get-pip.py -o ./get-pip.py --fail --silent --show-error &&     python ./get-pip.py && rm ./get-pip.py &&     python -m pip install --upgrade pip==20.2 &&     python -m pip install virtualenv==16.6.0 &&     pip download --no-deps helix-scripts --index-url https://dnceng.pkgs.visualstudio.com/public/_packaging/helix-client-prod/pypi/simple &&     export CRYPTOGRAPHY_DONT_BUILD_RUST=1 &&     pip install ./helix_scripts-*-py3-none-any.whl:
#6 98.52   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.
#6 98.52   
#6 98.52   This package requires Rust >=1.56.0.
#6 98.52   ----------------------------------------
#6 98.52   ERROR: Failed building wheel for cryptography
#6 98.52 Successfully built psutil pycparser cffi
#6 98.52 Failed to build cryptography
#6 98.52 ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
#6 98.57 WARNING: You are using pip version 20.2; however, version 23.2 is available.
#6 98.57 You should consider upgrading via the '/usr/bin/python -m pip install --upgrade pip' command.

It seems that the Helix install script doesn't respect the CRYPTOGRAPHY_DONT_BUILD_RUST environment variable that has been set:

RUN ln -sf /usr/bin/python3 /usr/bin/python && \
curl https://bootstrap.pypa.io/get-pip.py -o ./get-pip.py --fail --silent --show-error && \
python ./get-pip.py && rm ./get-pip.py && \
python -m pip install --upgrade pip==20.2 && \
python -m pip install virtualenv==16.6.0 && \
pip download --no-deps helix-scripts --index-url https://dnceng.pkgs.visualstudio.com/public/_packaging/helix-client-prod/pypi/simple && \
export CRYPTOGRAPHY_DONT_BUILD_RUST=1 && \
pip install ./helix_scripts-*-py3-none-any.whl

cc @riarenas @garath @missymessa

@wfurt
Copy link
Member

wfurt commented Nov 2, 2023

we may follow #929 that fixed Debian 11 on arm32. We may do the same for Debian 12. It also may not be needed since Debian 12 has newer rush e.g. the old pattern may just work.

@lbussell
Copy link
Contributor Author

I'm seeing this issue blocking alpine arm32 images now -

> [3/7] RUN apk update && apk add --no-cache &&     apk add         cargo         libffi-dev         linux-headers         python3-dev         openssl-dev &&     ln -sf /usr/bin/python3 /usr/bin/python &&     curl https://bootstrap.pypa.io/get-pip.py -o ./get-pip.py --fail --silent --show-error &&     python3 ./get-pip.py && rm ./get-pip.py &&     python3 -m pip install --upgrade pip==22.2.2 &&     python3 -m pip install virtualenv==20.16.5 &&     pip download --no-deps helix-scripts --index-url https://dnceng.pkgs.visualstudio.com/public/_packaging/helix-client-prod/pypi/simple &&     pip install ./helix_scripts-*-py3-none-any.whl &&     apk del         cargo         libffi-dev         linux-headers         python3-dev         openssl-dev:
#6 47.17       running build_rust
#6 47.17       error: Rust 1.60.0 does not match extension requirement >=1.63.0
#6 47.17       [end of output]
#6 47.17   
#6 47.17   note: This error originates from a subprocess, and is likely not a problem with pip.
#6 47.17   ERROR: Failed building wheel for cryptography
#6 47.17 Successfully built psutil pycparser
#6 47.17 Failed to build cryptography
#6 47.17 ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects
#6 47.21 WARNING: There was an error checking the latest version of pip.

https://dev.azure.com/dnceng/internal/_build/results?buildId=2363776&view=logs&j=1bd276f8-9fb5-54c7-5be2-bbe0faefcec6&t=78f2343a-ba72-59a4-e152-58a1d5b13d94 [internal link]

I think we should probably disable that image to unblock other builds.

@lbussell lbussell changed the title Debian and Raspbian Helix images fail to build, asks for Rust to be installed Helix ARM images fail to build, asks for Rust to be installed Jan 31, 2024
@lbussell lbussell changed the title Helix ARM images fail to build, asks for Rust to be installed Helix ARM images fail to build, asks for Rust to be installed or can't build cryptography wheel Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants