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

Build multiarch wheels #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Build multiarch wheels #30

wants to merge 2 commits into from

Conversation

XVilka
Copy link
Member

@XVilka XVilka commented Jul 4, 2023

closes #26

@XVilka XVilka requested review from ret2libc and wingdeans July 4, 2023 10:00
@ret2libc

This comment was marked as resolved.

@XVilka
Copy link
Member Author

XVilka commented Aug 2, 2023

Hmm, failure to build macOS ARM64:

  
  + python -m pip wheel /Users/runner/work/rz-bindgen/rz-bindgen --wheel-dir=/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/built_wheel --no-deps -vvv
  Created temporary directory: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-tracker-4p60z0kh
  Initialized build tracking at /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-tracker-4p60z0kh
  Created build tracker: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-tracker-4p60z0kh
  Entered build tracker: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-tracker-4p60z0kh
  Created temporary directory: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-wheel-2i7n0uhn
  Created temporary directory: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-ephem-wheel-cache-vkriob_9
  Processing /Users/runner/work/rz-bindgen/rz-bindgen
    Added file:///Users/runner/work/rz-bindgen/rz-bindgen to build tracker '/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-tracker-4p60z0kh'
    Created temporary directory: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-env-pfajgvv_
    Installing build dependencies: started
    Running command pip subprocess to install build dependencies
    Using pip 23.1.2 from /Users/runner/Library/Application Support/virtualenv/wheel/3.8/image/1/SymlinkPipInstall/pip-23.1.2-py3-none-any/pip (python 3.8)
    Collecting meson>=0.62.2
      Using cached meson-1.2.0-py3-none-any.whl (962 kB)
    Collecting meson-python>=0.7.0
      Using cached meson_python-0.13.2-py3-none-any.whl (79 kB)
    Collecting pyproject-metadata>=0.7.1 (from meson-python>=0.7.0)
      Using cached pyproject_metadata-0.7.1-py3-none-any.whl (7.4 kB)
    Collecting tomli>=1.0.0 (from meson-python>=0.7.0)
      Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
    Collecting packaging>=19.0 (from pyproject-metadata>=0.7.1->meson-python>=0.7.0)
      Using cached packaging-23.1-py3-none-any.whl (48 kB)
    Installing collected packages: tomli, packaging, meson, pyproject-metadata, meson-python
      Creating /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-env-pfajgvv_/overlay/bin
      changing mode of /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-env-pfajgvv_/overlay/bin/meson to 755
    Successfully installed meson-1.2.0 meson-python-0.13.2 packaging-23.1 pyproject-metadata-0.7.1 tomli-2.0.1
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Running command Getting requirements to build wheel
    Getting requirements to build wheel: finished with status 'done'
    Installing backend dependencies: started
    Running command pip subprocess to install backend dependencies
    Using pip 23.1.2 from /Users/runner/Library/Application Support/virtualenv/wheel/3.8/image/1/SymlinkPipInstall/pip-23.1.2-py3-none-any/pip (python 3.8)
    Collecting ninja>=1.8.2
      Using cached ninja-1.11.1-py2.py3-none-macosx_10_9_universal2.macosx_10_9_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl (270 kB)
    Installing collected packages: ninja
      Creating /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-env-pfajgvv_/normal/bin
      changing mode of /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-env-pfajgvv_/normal/bin/ninja to 755
    Successfully installed ninja-1.11.1
    Installing backend dependencies: finished with status 'done'
    Created temporary directory: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-modern-metadata-ft18c3na
    Preparing metadata (pyproject.toml): started
    Running command Preparing metadata (pyproject.toml)
    + meson setup /Users/runner/work/rz-bindgen/rz-bindgen /Users/runner/work/rz-bindgen/rz-bindgen/.mesonpy-lw4c90xs/build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --cross-file /Users/runner/work/rz-bindgen/rz-bindgen/.mesonpy-lw4c90xs/build/meson-python-cross-file.ini --native-file=/Users/runner/work/rz-bindgen/rz-bindgen/.mesonpy-lw4c90xs/build/meson-python-native-file.ini
    The Meson build system
    Version: 1.2.0
    Source dir: /Users/runner/work/rz-bindgen/rz-bindgen
    Build dir: /Users/runner/work/rz-bindgen/rz-bindgen/.mesonpy-lw4c90xs/build
    Build type: cross build
    Project name: rz-bindgen
    Project version: 0.6.0
    C compiler for the host machine: cc -arch arm64 (clang 14.0.0 "Apple clang version 14.0.0 (clang-1400.0.29.202)")
    C linker for the host machine: cc -arch arm64 ld64 820.1
    C++ compiler for the host machine: c++ -arch arm64 (clang 14.0.0 "Apple clang version 14.0.0 (clang-1400.0.29.202)")
    C++ linker for the host machine: c++ -arch arm64 ld64 820.1
    C compiler for the build machine: cc (clang 14.0.0 "Apple clang version 14.0.0 (clang-1400.0.29.202)")
    C linker for the build machine: cc ld64 820.1
    C++ compiler for the build machine: c++ (clang 14.0.0 "Apple clang version 14.0.0 (clang-1400.0.29.202)")
    C++ linker for the build machine: c++ ld64 820.1
    Build machine cpu family: x86_64
    Build machine cpu: x86_64
    Host machine cpu family: aarch64
    Host machine cpu: arm64
    Target machine cpu family: aarch64
    Target machine cpu: arm64
    Program python3 found: YES (/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/bin/python)
    Found CMake: NO
    llvm-config found: NO
    Run-time dependency LLVM found: NO (tried cmake and config-tool)
    Found Pkg-config: NO
    Run-time dependency rz_core found: NO (tried framework)
  
    ../../meson.build:40:12: ERROR: Dependency lookup for rz_core with method 'pkgconfig' failed: Pkg-config binary for machine 1 not found. Giving up.
  
    A full log can be found at /Users/runner/work/rz-bindgen/rz-bindgen/.mesonpy-lw4c90xs/build/meson-logs/meson-log.txt
    error: subprocess-exited-with-error
    
    × Preparing metadata (pyproject.toml) did not run successfully.
    │ exit code: 1
    ╰─> See above for output.
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
    full command: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/bin/python /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmprbuwja9r
    cwd: /Users/runner/work/rz-bindgen/rz-bindgen
    Preparing metadata (pyproject.toml): finished with status 'error'
  error: metadata-generation-failed
  
  × Encountered error while generating package metadata.
  ╰─> See above for output.
  
  note: This is an issue with the package mentioned above, not pip.
  hint: See above for details.
  Exception information:
  Traceback (most recent call last):
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/operations/build/metadata.py", line 35, in generate_metadata
      distinfo_dir = backend.prepare_metadata_for_build_wheel(metadata_dir)
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/utils/misc.py", line 713, in prepare_metadata_for_build_wheel
      return super().prepare_metadata_for_build_wheel(
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 186, in prepare_metadata_for_build_wheel
      return self._call_hook('prepare_metadata_for_build_wheel', {
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 311, in _call_hook
      self._subprocess_runner(
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/utils/subprocess.py", line 252, in runner
      call_subprocess(
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/utils/subprocess.py", line 224, in call_subprocess
      raise error
  pip._internal.exceptions.InstallationSubprocessError: Preparing metadata (pyproject.toml) exited with 1
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 169, in exc_logging_wrapper
      status = run_func(*args)
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 248, in wrapper
      return func(self, options, args)
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/commands/wheel.py", line 147, in run
      requirement_set = resolver.resolve(reqs, check_supported_wheels=True)
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 73, in resolve
      collected = self.factory.collect_root_requirements(root_reqs)
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 491, in collect_root_requirements
      req = self._make_requirement_from_install_req(
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 453, in _make_requirement_from_install_req
      cand = self._make_candidate_from_link(
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 206, in _make_candidate_from_link
      self._link_candidate_cache[link] = LinkCandidate(
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 293, in __init__
      super().__init__(
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in __init__
      self.dist = self._prepare()
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 225, in _prepare
      dist = self._prepare_distribution()
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 304, in _prepare_distribution
      return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 516, in prepare_linked_requirement
      return self._prepare_linked_requirement(req, parallel_builds)
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 631, in _prepare_linked_requirement
      dist = _get_prepared_distribution(
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 69, in _get_prepared_distribution
      abstract_dist.prepare_distribution_metadata(
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py", line 61, in prepare_distribution_metadata
      self.req.prepare_metadata()
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 555, in prepare_metadata
      self.metadata_directory = generate_metadata(
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/build/venv/lib/python3.8/site-packages/pip/_internal/operations/build/metadata.py", line 37, in generate_metadata
      raise MetadataGenerationFailed(package_details=details) from error
  pip._internal.exceptions.MetadataGenerationFailed: metadata generation failed
  Removed file:///Users/runner/work/rz-bindgen/rz-bindgen from build tracker '/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-tracker-4p60z0kh'
  Removed build tracker: '/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-build-tracker-4p60z0kh'
                                                              ✕ 7.28s
Error: Command ['python', '-m', 'pip', 'wheel', '/Users/runner/work/rz-bindgen/rz-bindgen', '--wheel-dir=/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-m8blrln_/cp38-macosx_arm64/built_wheel', '--no-deps', '-vvv'] failed with code 1. None

Error: Process completed with exit code 1.
0s

@XVilka
Copy link
Member Author

XVilka commented Aug 2, 2023

Installing pkg-config on macOS doesn't seem to affect ARM64 cross-compilation environment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create and upload wheels for arm64 architecture, at least
2 participants