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

MacOS + Docker: qemu-user-static check from #685 breaking build early #760

Open
MauAbata opened this issue Mar 7, 2024 · 5 comments
Open

Comments

@MauAbata
Copy link

MauAbata commented Mar 7, 2024

I ran into an issue setting up pi-gen on MacOS Monterey 12.6 where qemu-user-static wasn't found, and it prompted me to install that package. I couldn't find any Mac equivalent, and after some digging discovered a comment on the original PR (#685) that references this issue:

This PR broke my build-docker.sh command which I've been using for years on MacOS. The Shell script exits with the error message qemu-arm-static not found (please install qemu-user-static) although the build is working fine the versions before the PR. I am using MacOS Sonoma Version 14.0 (23A344). I have not found any way to install the missing package so I moved back in time using a few tags before to git checkout 2023-02-21-raspios-bullseye.

Originally posted by @JavanXD in #685 (comment)

Rolling back to 2023-02-21-raspios-bullseye was able to generate a successful build, so I wonder if that qemu check isn't necessary on MacOS. I am not confident enough about Mac environments to be able to say for sure, so perhaps we can get some insight here.

@JavanXD
Copy link

JavanXD commented Mar 7, 2024

to prevent possible problems on various distros @moh53n

The PR broke the MacOS build, could you have a look please?

I'm still interested in getting the build process working on my MacBook again.

@moh53n
Copy link
Contributor

moh53n commented Mar 8, 2024

One way is to just ignore the whole registration process on non-linux environments, but there might be a better solution.
I don't have a Mac system and I'm unfamiliar with its OS.
Do you need to manually handle the qemu registration? How was the build process before this commit?

@eins78
Copy link

eins78 commented Apr 22, 2024

@MauAbata @JavanXD Are you using an Intel or Apple Silicon Mac? I do not get this error and since uname -m returns arm64 on Apple Silicon, the code in the PR you've linked should not on Apple Silicon/ARM processors.

If the build did indeed work on Intel Macs before the PR #685, then a quick fix could be to check for macOS and then skip the binfmt registration, like:
uname -o | grep Darwin && binfmt_misc_required=0

@JavanXD
Copy link

JavanXD commented Apr 22, 2024

Are you using an Intel or Apple Silicon Mac?

Intel, but I just switched to M3, so I can try it soon.

@filthsystem
Copy link

uname -o | grep Darwin && binfmt_misc_required=0

Tried this on an x86 Mac, uname -s is what you're looking for but otherwise it fixed the issue for me!

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

No branches or pull requests

5 participants