Bug 275951 - security/py-cryptography: error: failed to run custom build command for `cryptography-cffi v0.1.0
Summary: security/py-cryptography: error: failed to run custom build command for `cryp...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-26 15:08 UTC by Joel Rodriguez
Modified: 2024-01-02 20:54 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Rodriguez 2023-12-26 15:08:52 UTC
make: stopped in /usr/ports/security/py-cryptography

I am not sure what to make of this port build failure. I suspect that you are including: rustc: 1.74.1 (a28077b28 2023-12-04) (built from a source tarball)
has something to do with it.

I am not sure why some ports are inclined to bundle ports like rust when they that port is already installed. Seems to me that the bundled version conflicts with the installed version and causes errors.

The entire error msgs:

Caused by:
  process didn't exit successfully: `/usr/ports/security/py-cryptography/work-py39/cryptography-41.0.7/src/rust/target/release/build/c\
ryptography-cffi-3e7459992b0ef835/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=PYO3_PYTHON
  cargo:rerun-if-changed=../../_cffi_src/
  cargo:rerun-if-changed=../../cryptography/__about__.py

  --- stderr
  thread 'main' panicked at cryptography-cffi/build.rs:37:9:
  failed to run build_openssl.py, stdout:

  stderr:
  Traceback (most recent call last):
    File "/usr/ports/security/py-cryptography/work-py39/cryptography-41.0.7/src/rust/cryptography-cffi/../../_cffi_src/build_openssl.p\
y", line 18, in <module>
      ffi = build_ffi_for_binding(
    File "/usr/ports/security/py-cryptography/work-py39/cryptography-41.0.7/src/rust/cryptography-cffi/../../_cffi_src/utils.py", line\
 50, in build_ffi_for_binding
      return build_ffi(
    File "/usr/ports/security/py-cryptography/work-py39/cryptography-41.0.7/src/rust/cryptography-cffi/../../_cffi_src/utils.py", line\
 62, in build_ffi
      ffi = FFI()
    File "/usr/local/lib/python3.9/site-packages/cffi/api.py", line 48, in __init__
      import _cffi_backend as backend
  ModuleNotFoundError: No module named '_cffi_backend'

The entire build can be viewed at
https://tahoestores.org/py-cryptography.err

Please advise, thanks
Comment 1 Joel Rodriguez 2024-01-02 20:54:34 UTC
Hi,

Rebuilding openssl3 with the legacy option fixed up this issue for me.

Of course, I had to rebuild over 900+ ports that depend on opernssl3 just to be safe.

Thanks for looking into this.