← Back to issue list

Snap not building on platforms without a cryptography wheel

View original Github issue

Metadata

Project
charmcraft
Number
#1369
Type
issue
State
closed
Author
lengau
Labels
—
Created
Updated
Closed

Current evaluation

Fixed by canonical/charmcraft#1379, merged as f5558b8f. The snap packaging change enabled builds on armhf, arm64, ppc64el, and s390x.

Resolution: closed resolved

Reason: The issue was fixed by merged PR #1379 in commit f5558b8f. Launchpad builds for armhf, arm64, ppc64el, and s390x passed after the snap build configuration was updated.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description The core22 snap isn't building on architectures that don't have a cryptography wheel ### To Reproduce Build the snap on armhf or something :-) ### Environment CI https://launchpadlibrarian.net/695323802/buildlog_snap_ubuntu_jammy_ppc64el_charmcraft-edge_BUILDING.txt.gz https://launchpadlibrarian.net/695324170/buildlog_snap_ubuntu_jammy_armhf_charmcraft-edge_BUILDING.txt.gz https://launchpadlibrarian.net/695323868/buildlog_snap_ubuntu_jammy_s390x_charmcraft-edge_BUILDING.txt.gz ### charmcraft.yaml ```shell N/A ``` ### Relevant log output ```shell :: Running `/tmp/pip-install-50bahshq/cryptography_46abaca5ca52471393e375cff8ae3c61/src/rust/target/release/build/cryptography-cffi-c7c4f1b7fb7b6d4d/build-script-build` :: Running `rustc --crate-name pyo3 --edition=2018 /root/.cargo/registry/src/github.com-eae4ba8cbf2ce1c7/pyo3-0.18.3/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C overflow-checks=on --cfg 'feature="abi3"' --cfg 'feature="abi3-py310"' --cfg 'feature="abi3-py311"' --cfg 'feature="abi3-py37"' --cfg 'feature="abi3-py38"' --cfg 'feature="abi3-py39"' --cfg 'feature="default"' --cfg 'feature="extension-module"' --cfg 'feature="indoc"' --cfg 'feature="macros"' --cfg 'feature="pyo3-macros"' --cfg 'feature="unindent"' -C metadata=16e2c7395fc5b7bc -C extra-filename=-16e2c7395fc5b7bc --out-dir /tmp/pip-install-50bahshq/cryptography_46abaca5ca52471393e375cff8ae3c61/src/rust/target/release/deps -L dependency=/tmp/pip-install-50bahshq/cryptography_46abaca5ca52471393e375cff8ae3c61/src/rust/target/release/deps --extern cfg_if=/tmp/pip-install-50bahshq/cryptography_46abaca5ca52471393e375cff8ae3c61/src/rust/target/release/deps/libcfg_if-be72b868a3c3d5a7.rmeta --extern indoc=/tmp/pip-install-50bahshq/cryptography_46abaca5ca52471393e375cff8ae3c61/src/rust/target/release/deps/libindoc-80a5072bc114f06b.so --extern libc=/tmp/pip-install-50bahshq/cryptography_46abaca5ca52471393e375cff8ae3c61/src/rust/target/release/deps/liblibc-5b17f39703aaded0.rmeta --extern memoffset=/tmp/pip-install-50bahshq/cryptography_46abaca5ca52471393e375cff8ae3c61/src/rust/target/release/deps/libmemoffset-db9f0c4241d84ad0.rmeta --extern parking_lot=/tmp/pip-install-50bahshq/cryptography_46abaca5ca52471393e375cff8ae3c61/src/rust/target/release/deps/libparking_lot-ca5234cd28fd1e3c.rmeta --extern pyo3_ffi=/tmp/pip-install-50bahshq/cryptography_46abaca5ca52471393e375cff8ae3c61/src/rust/target/release/deps/libpyo3_ffi-030569d1c0f4330f.rmeta --extern pyo3_macros=/tmp/pip-install-50bahshq/cryptography_46abaca5ca52471393e375cff8ae3c61/src/rust/target/release/deps/libpyo3_macros-e15c269a5d312b8d.so --extern unindent=/tmp/pip-install-50bahshq/cryptography_46abaca5ca52471393e375cff8ae3c61/src/rust/target/release/deps/libunindent-4632c05659e18cb9.rmeta --cap-lints allow --cfg Py_3_6 --cfg Py_3_7 --cfg Py_LIMITED_API --cfg min_const_generics --cfg addr_of --cfg option_insert` :: The following warnings were emitted during compilation: :: :: warning: /tmp/pip-install-50bahshq/cryptography_46abaca5ca52471393e375cff8ae3c61/src/rust/target/release/build/cryptography-cffi-8c93290a3abf82cb/out/_openssl.c:57:10: fatal error: Python.h: No such file or directory :: warning: 57 | #include <Python.h> :: warning: | ^~~~~~~~~~ :: warning: compilation terminated. :: :: error: failed to run custom build command for `cryptography-cffi v0.1.0 (/tmp/pip-install-50bahshq/cryptography_46abaca5ca52471393e375cff8ae3c61/src/rust/cryptography-cffi)` :: :: Caused by: :: process didn't exit successfully: `/tmp/pip-install-50bahshq/cryptography_46abaca5ca52471393e375cff8ae3c61/src/rust/target/release/build/cryptography-cffi-c7c4f1b7fb7b6d4d/build-script-build` (exit status: 1) :: --- stdout :: cargo:rerun-if-env-changed=PYO3_PYTHON :: cargo:rerun-if-changed=../../_cffi_src/ :: cargo:rerun-if-changed=../../cryptography/__about__.py :: cargo:rustc-cfg=python_implementation="CPython" :: TARGET = Some("s390x-unknown-linux-gnu") :: OPT_LEVEL = Some("3") :: HOST = Some("s390x-unknown-linux-gnu") :: cargo:rerun-if-env-changed=CC_s390x-unknown-linux-gnu :: CC_s390x-unknown-linux-gnu = None :: cargo:rerun-if-env-changed=CC_s390x_unknown_linux_gnu :: CC_s390x_unknown_linux_gnu = None :: cargo:rerun-if-env-changed=HOST_CC :: HOST_CC = None :: cargo:rerun-if-env-changed=CC :: CC = None :: cargo:rerun-if-env-changed=CFLAGS_s390x-unknown-linux-gnu :: CFLAGS_s390x-unknown-linux-gnu = None :: cargo:rerun-if-env-changed=CFLAGS_s390x_unknown_linux_gnu :: CFLAGS_s390x_unknown_linux_gnu = None :: cargo:rerun-if-env-changed=HOST_CFLAGS :: HOST_CFLAGS = None :: cargo:rerun-if-env-changed=CFLAGS :: CFLAGS = None :: cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS :: CRATE_CC_NO_DEFAULTS = None :: DEBUG = Some("false") :: CARGO_CFG_TARGET_FEATURE = None :: cargo:rerun-if-env-changed=CC_s390x-unknown-linux-gnu :: CC_s390x-unknown-linux-gnu = None :: cargo:rerun-if-env-changed=CC_s390x_unknown_linux_gnu :: CC_s390x_unknown_linux_gnu = None :: cargo:rerun-if-env-changed=HOST_CC :: HOST_CC = None :: cargo:rerun-if-env-changed=CC :: CC = None :: cargo:rerun-if-env-changed=CFLAGS_s390x-unknown-linux-gnu :: CFLAGS_s390x-unknown-linux-gnu = None :: cargo:rerun-if-env-changed=CFLAGS_s390x_unknown_linux_gnu :: CFLAGS_s390x_unknown_linux_gnu = None :: cargo:rerun-if-env-changed=HOST_CFLAGS :: HOST_CFLAGS = None :: cargo:rerun-if-env-changed=CFLAGS :: CFLAGS = None :: cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS :: CRATE_CC_NO_DEFAULTS = None :: CARGO_CFG_TARGET_FEATURE = None :: cargo:rerun-if-env-changed=CC_s390x-unknown-linux-gnu :: CC_s390x-unknown-linux-gnu = None :: cargo:rerun-if-env-changed=CC_s390x_unknown_linux_gnu :: CC_s390x_unknown_linux_gnu = None :: cargo:rerun-if-env-changed=HOST_CC :: HOST_CC = None :: cargo:rerun-if-env-changed=CC :: CC = None :: cargo:rerun-if-env-changed=CFLAGS_s390x-unknown-linux-gnu :: CFLAGS_s390x-unknown-linux-gnu = None :: cargo:rerun-if-env-changed=CFLAGS_s390x_unknown_linux_gnu :: CFLAGS_s390x_unknown_linux_gnu = None :: cargo:rerun-if-env-changed=HOST_CFLAGS :: HOST_CFLAGS = None :: cargo:rerun-if-env-changed=CFLAGS :: CFLAGS = None :: cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS :: CRATE_CC_NO_DEFAULTS = None :: CARGO_CFG_TARGET_FEATURE = None :: cargo:rerun-if-env-changed=CC_s390x-unknown-linux-gnu :: CC_s390x-unknown-linux-gnu = None :: cargo:rerun-if-env-changed=CC_s390x_unknown_linux_gnu :: CC_s390x_unknown_linux_gnu = None :: cargo:rerun-if-env-changed=HOST_CC :: HOST_CC = None :: cargo:rerun-if-env-changed=CC :: CC = None :: cargo:rerun-if-env-changed=CFLAGS_s390x-unknown-linux-gnu :: CFLAGS_s390x-unknown-linux-gnu = None :: cargo:rerun-if-env-changed=CFLAGS_s390x_unknown_linux_gnu :: CFLAGS_s390x_unknown_linux_gnu = None :: cargo:rerun-if-env-changed=HOST_CFLAGS :: HOST_CFLAGS = None :: cargo:rerun-if-env-changed=CFLAGS :: CFLAGS = None :: cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS :: CRATE_CC_NO_DEFAULTS = None :: CARGO_CFG_TARGET_FEATURE = None :: running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "/build/charmcraft/stage/usr/include/python3.10" "-I" "/usr/include" "-Wall" "-Wextra" "-Wconversion" "-Wno-error=sign-conversion" "-Wno-unused-parameter" "-DPy_LIMITED_API=0x030700f0" "-o" "/tmp/pip-install-50bahshq/cryptography_46abaca5ca52471393e375cff8ae3c61/src/rust/target/release/build/cryptography-cffi-8c93290a3abf82cb/out/a6bcb21c96c2f733-_openssl.o" "-c" "/tmp/pip-install-50bahshq/cryptography_46abaca5ca52471393e375cff8ae3c61/src/rust/target/release/build/cryptography-cffi-8c93290a3abf82cb/out/_openssl.c" :: cargo:warning=/tmp/pip-install-50bahshq/cryptography_46abaca5ca52471393e375cff8ae3c61/src/rust/target/release/build/cryptography-cffi-8c93290a3abf82cb/out/_openssl.c:57:10: fatal error: Python.h: No such file or directory :: cargo:warning= 57 | #include <Python.h> :: cargo:warning= | ^~~~~~~~~~ :: cargo:warning=compilation terminated. :: exit status: 1 :: :: --- stderr :: :: :: error occurred: Command "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "/build/charmcraft/stage/usr/include/python3.10" "-I" "/usr/include" "-Wall" "-Wextra" "-Wconversion" "-Wno-error=sign-conversion" "-Wno-unused-parameter" "-DPy_LIMITED_API=0x030700f0" "-o" "/tmp/pip-install-50bahshq/cryptography_46abaca5ca52471393e375cff8ae3c61/src/rust/target/release/build/cryptography-cffi-8c93290a3abf82cb/out/a6bcb21c96c2f733-_openssl.o" "-c" "/tmp/pip-install-50bahshq/cryptography_46abaca5ca52471393e375cff8ae3c61/src/rust/target/release/build/cryptography-cffi-8c93290a3abf82cb/out/_openssl.c" with args "cc" did not execute successfully (status code exit status: 1). :: :: :: warning: build failed, waiting for other jobs to finish... :: :: =============================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.10.12 :: platform: Linux-5.4.0-164-generic-s390x-with-glibc2.35 :: pip: n/a :: setuptools: 68.2.2 :: setuptools_rust: 1.8.1 :: rustc: 1.66.1 (90743e729 2023-01-10) (built from a source tarball) :: =============================DEBUG ASSISTANCE============================= :: :: error: `cargo rustc --lib --message-format=json-render-diagnostics --manifest-path src/rust/Cargo.toml --release -v --features pyo3/extension-module --crate-type cdylib --` failed with code 101 :: [end of output] :: :: note: This error originates from a subprocess, and is likely not a problem with pip. :: ERROR: Failed building wheel for cryptography ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by canonical/charmcraft#1379, merged as f5558b8f. The snap packaging change enabled builds on armhf, arm64, ppc64el, and s390x.
stealth/space-bunny-alpha — closed resolved Fixed by canonical/charmcraft#1379, merged as f5558b8f. The snap build change covered armhf, arm64, ppc64el, and s390x.
qwen3.6-35b-a3b-mtp-q6 — — Closed without resolution. No comments or linked pull requests were added. The snap build failure on architectures lacking cryptography wheels remains unfixed.
qwen/qwen3.6-35b-a3b — — Closed without resolution or comments, likely abandoned. The core22 snap build failed on architectures lacking cryptography wheels due to missing Python.h during source compilation.
qwen/qwen3.6-35b-a3b — — Closed without comments, likely abandoned. The core22 snap build failed on non-x86 architectures due to missing cryptography wheels and Python.h compilation errors.
qwen3.6-35b-a3b-mtp-q6 — — Closed with no comments. Likely abandoned or resolved by upstream cryptography providing pre-built wheels for affected architectures.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/charmcraft#1379 (confidence 99%)

    The PR was merged as commit f5558b8f specifically to make the snap build on all supported architectures.

Related issues

Issue Project State Summary Similarity
#1377 fix: make snap build on all architectures. charmcraft merged Merged PR #1377 as f5558b8f, fixing #1369 with successful Charmcraft snap builds on armhf, arm64, ppc64el, and s390x.
78%
#2173 fix(snap): fix build on 32-bit platforms charmcraft merged Merged PR #2173 as commit d1f2746a, restoring Charmcraft snap builds on 32-bit armhf platforms.
76%
#1379 fix: make snap build on all architectures. (#1377) charmcraft closed Merged PR #1379 as commit f5558b8f, fixing Charmcraft snap builds on armhf, arm64, ppc64el, and s390x; all four Launchpad builds passed.
76%
#1091 snap: ensure cryptography builds correctly on all architectures charmcraft merged Merged #1091 as 92e93b46, adding a temporary snap build workaround so cryptography compiles on all supported architectures.
73%