TritonDataCenter / pkgsrc

NetBSD/pkgsrc fork for our binary package repositories
https://pkgsrc.smartos.org/
133 stars 50 forks source link

pkgsrc: cffi expects libffi.so.7, but libffi provides libffi.so.8 #318

Closed drboone closed 2 years ago

drboone commented 2 years ago

python38-3.8.12nb1 py38-cffi-1.15.0 libffi-3.4.2nb1

I can produce the issue by trying to install git+https://github.com/Kozea/WeasyPrint@046f27bf982d285fdc069acbc0168f0dce1af503 (I doubt the commit spec is needed, but I haven't tried otherwise.)

evita 38 $ pip3 install -U git+https://github.com/Kozea/WeasyPrint@046f27bf982d285fdc069acbc0168f0dce1af503
Collecting git+https://github.com/Kozea/WeasyPrint@046f27bf982d285fdc069acbc0168f0dce1af503
  Cloning https://github.com/Kozea/WeasyPrint (to revision 046f27bf982d285fdc069acbc0168f0dce1af503) to /tmp/pip-req-build-ua4m1gr6
  Running command git clone --filter=blob:none -q https://github.com/Kozea/WeasyPrint /tmp/pip-req-build-ua4m1gr6
  Running command git rev-parse -q --verify 'sha^046f27bf982d285fdc069acbc0168f0dce1af503'
  Running command git fetch -q https://github.com/Kozea/WeasyPrint 046f27bf982d285fdc069acbc0168f0dce1af503
  Running command git checkout -q 046f27bf982d285fdc069acbc0168f0dce1af503
  Resolved https://github.com/Kozea/WeasyPrint to commit 046f27bf982d285fdc069acbc0168f0dce1af503
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... error
  ERROR: Command errored out with exit status 1:
   command: /opt/local/bin/python3.8 /opt/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp2ggw439z
       cwd: /tmp/pip-req-build-ua4m1gr6
  Complete output (34 lines):
  Traceback (most recent call last):
    File "/opt/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
      main()
    File "/opt/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/opt/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel
      return hook(metadata_directory, config_settings)
    File "/tmp/pip-build-env-6t0v98m4/overlay/lib/python3.8/site-packages/flit_core/buildapi.py", line 49, in prepare_metadata_for_build_wheel
      metadata = make_metadata(module, ini_info)
    File "/tmp/pip-build-env-6t0v98m4/overlay/lib/python3.8/site-packages/flit_core/common.py", line 396, in make_metadata
      md_dict.update(get_info_from_module(module, ini_info.dynamic_metadata))
    File "/tmp/pip-build-env-6t0v98m4/overlay/lib/python3.8/site-packages/flit_core/common.py", line 193, in get_info_from_module
      docstring, version = get_docstring_and_version_via_import(target)
    File "/tmp/pip-build-env-6t0v98m4/overlay/lib/python3.8/site-packages/flit_core/common.py", line 169, in get_docstring_and_version_via_import
      m = sl.load_module()
    File "<frozen importlib._bootstrap_external>", line 522, in _check_name_wrapper
    File "<frozen importlib._bootstrap_external>", line 1022, in load_module
    File "<frozen importlib._bootstrap_external>", line 847, in load_module
    File "<frozen importlib._bootstrap>", line 265, in _load_module_shim
    File "<frozen importlib._bootstrap>", line 702, in _load
    File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 843, in exec_module
    File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    File "/tmp/pip-req-build-ua4m1gr6/weasyprint/__init__.py", line 325, in <module>
      from .css import preprocess_stylesheet  # noqa isort:skip
    File "/tmp/pip-req-build-ua4m1gr6/weasyprint/css/__init__.py", line 27, in <module>
      from . import computed_values, counters, media_queries
    File "/tmp/pip-req-build-ua4m1gr6/weasyprint/css/computed_values.py", line 16, in <module>
      from ..text.ffi import ffi, pango, units_to_double
    File "/tmp/pip-req-build-ua4m1gr6/weasyprint/text/ffi.py", line 11, in <module>
      ffi = cffi.FFI()
    File "/tmp/pip-build-env-6t0v98m4/normal/lib/python3.8/site-packages/cffi/api.py", line 48, in __init__
      import _cffi_backend as backend
  ImportError: ld.so.1: python3.8: fatal: libffi.so.7: open failed: No such file or directory
  ----------------------------------------
WARNING: Discarding git+https://github.com/Kozea/WeasyPrint@046f27bf982d285fdc069acbc0168f0dce1af503. Command errored out with exit status 1: /opt/local/bin/python3.8 /opt/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp2ggw439z Check the logs for full command output.
ERROR: Command errored out with exit status 1: /opt/local/bin/python3.8 /opt/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp2ggw439z Check the logs for full command output.
drboone commented 2 years ago

This was apparently caused by a pip cache.