trueagi-io / hyperon-experimental

OpenCog Hyperon experimental version
https://wiki.opencog.org/w/Hyperon
MIT License
122 stars 43 forks source link

Release is broken: delocate tool finds inconsistencies in packages under macos-13 and macos-14 GitHub action environments #725

Open vsbogd opened 3 days ago

vsbogd commented 3 days ago

Describe the bug After upgrade to cibuildwheel 2.19.2 (see PR https://github.com/trueagi-io/hyperon-experimental/pull/724) version 0.11.0 of the delocate library is used while releasing binaries. This version does additional consistency checks on the Python packages built. It finds out that libssl and libcrypto libraries used are targeted for the MacOS 13 while package is built for the MacOS 10.9 which breaks the release of the package on macos-13 GitHub actions environment. It also fails finding correct minimum MacOS version for the arm64 platform on macos-14 GitHub actions environment.

Full log at https://github.com/trueagi-io/hyperon-experimental/actions/runs/9797477257

To Reproduce Steps to reproduce the behavior:

  1. Make test branch in your fork from the following commit https://github.com/trueagi-io/hyperon-experimental/commit/995fa92fb897b23e3f63007e8de3561417072ab4
  2. Start test release of the branch in your fork see https://github.com/trueagi-io/hyperon-experimental/blob/main/docs/DEVELOPMENT.md#how-to-check-release-job-in-fork

Expected behavior Python packages for the macos-13 and macos-14 are released

Actual behavior Release fails on macos-13 with the following delocate error message:

2024-07-04T16:31:09.3113540Z delocate.libsana.DelocationError: Library dependencies do not satisfy target MacOS version 10.9:
2024-07-04T16:31:09.3115990Z /private/var/folders/ng/t2lj_z6n4h30fn0h2ql_nd0c0000gn/T/tmph3qhc4hr/wheel/hyperon/.dylibs/libcrypto.3.dylib has a minimum target of 13.0
2024-07-04T16:31:09.3119610Z /private/var/folders/ng/t2lj_z6n4h30fn0h2ql_nd0c0000gn/T/tmph3qhc4hr/wheel/hyperon/.dylibs/libssl.3.dylib has a minimum target of 13.0

Release fails on macos-14 with the following delocate error message:

2024-07-04T16:26:54.4328210Z + delocate-wheel --require-archs arm64 -w /private/var/folders/h9/l1shxhdd69nct08ylzq0n6q00000gn/T/cibw-run-34b9atwn/cp38-macosx_arm64/repaired_wheel -v /private/var/folders/h9/l1shxhdd69nct08ylzq0n6q00000gn/T/cibw-run-34b9atwn/cp38-macosx_arm64/built_wheel/hyperon-0.1.11-cp38-cp38-macosx_11_0_arm64.whl
2024-07-04T16:26:55.0927940Z Fixing: /private/var/folders/h9/l1shxhdd69nct08ylzq0n6q00000gn/T/cibw-run-34b9atwn/cp38-macosx_arm64/built_wheel/hyperon-0.1.11-cp38-cp38-macosx_11_0_arm64.whl
2024-07-04T16:26:55.0988460Z Traceback (most recent call last):
2024-07-04T16:26:55.0997840Z   File "/private/var/folders/h9/l1shxhdd69nct08ylzq0n6q00000gn/T/cibw-run-34b9atwn/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/delocate/delocating.py", line 789, in _calculate_minimum_wheel_name
2024-07-04T16:26:55.0999020Z     arch_version[arch] = max(version, version_dkt[arch])
2024-07-04T16:26:55.0999420Z KeyError: 'arm64'
...
2024-07-04T16:26:55.1076450Z delocate.libsana.DelocationError: Failed to find any binary with the required architecture: 'arm64'

Additional context It should be noted that libssl and libcrypto shared libraries are included into the packages. See also https://cibuildwheel.pypa.io/en/stable/faq/#macos-library-dependencies-do-not-satisfy-target-macos

vsbogd commented 23 hours ago

I am tending to think delocate behaviour on macos-14 is a bug as I manually checked artifacts and I see libraries inside are arm64 ones.

vsbogd commented 23 hours ago

macos-13 behaviour also looks logical as system versions of libssl and libcrypto are used and as system version is 13 the libraries version is 13 as well. I am not sure who is responsible for targeting to the proper libraries:

  1. where to get libraries for 10.9 inside cibuildwheel environment?
  2. is it possible to set artifacts minimal version to 13 using cibuildwheel?