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

Unable to build on armv7l #2046

Closed
Marco-Sulla opened this issue Oct 18, 2024 · 2 comments · Fixed by #2049
Closed

Unable to build on armv7l #2046

Marco-Sulla opened this issue Oct 18, 2024 · 2 comments · Fixed by #2049

Comments

@Marco-Sulla
Copy link

Description

I tried to add armv7l to my pipeline, but it failed.

Inspecting cibuildwheel code, I found this:

https://github.com/pypa/cibuildwheel/blob/main/cibuildwheel/oci_container.py#L243-L261

If the first call() raises an exception, the var container_machine gets a value only if the platform is i386, not if it's armv7.

Build log

https://github.com/Marco-Sulla/python-frozendict/actions/runs/11408867572/job/31747946353?pr=110#step:4:6217

CI config

https://github.com/Marco-Sulla/python-frozendict/blob/armv7l/.github/workflows/build_secondary_wheels.yml

@mayeut
Copy link
Member

mayeut commented Oct 18, 2024

QEMU is only setup for arm64 in the CI Config. You also need to add arm.

@Marco-Sulla
Copy link
Author

Ty @mayeut it works :)

Can be the error a bit more verbose? Something like that:

            container_machine = None

            try:
                container_machine = call(
                    *run_cmd, *platform_args, self.image, *ctr_cmd, capture_stdout=True
                ).strip()
            except subprocess.CalledProcessError:
                if self.oci_platform == OCIPlatform.i386:
                    # The image might have been built with amd64 architecture
                    # Let's try that
                    platform_args = self._get_platform_args(oci_platform=OCIPlatform.AMD64)
                    container_machine = call(
                        *run_cmd, *platform_args, self.image, *ctr_cmd, capture_stdout=True
                    ).strip()
            
            if container_machine is None:
                raise SomeError("some message")

            simulate_32_bit = container_machine not in {"i686", "armv7l", "armv8l"}

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 a pull request may close this issue.

2 participants