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

Bootstrapping #10

Open
staticfloat opened this issue Oct 21, 2017 · 7 comments
Open

Bootstrapping #10

staticfloat opened this issue Oct 21, 2017 · 7 comments

Comments

@staticfloat
Copy link
Member

Many packages will require some kind of "bootstrapping"; e.g. the ability to run the executables they have just built. We should look into solutions such as Wine for Windows, Darling for MacOS and QEMU for non-Intel Linux.

Ideally, I'd like to make this transparent and automatic. I think the best route here is for us to have binfmt_misc be enabled and setup properly within whatever virtualization environment our builds run, which should be possible if we ditch Docker.

@Keno
Copy link
Contributor

Keno commented Oct 21, 2017

While I think this is a reasonable thing to do, I also think we should very strongly encourage packages to fix their build systems to not require this where possible.

@staticfloat
Copy link
Member Author

The next rootfs will embed wine, wine64 and qemu-user-static. staticfloat/julia-docker#15

  • We can add code in BinaryBuilder.jl to auto-register with binfmt_misc on Linux systems. Is it possible to register binfmt_misc within the usernamespace and thereby not require sudo privileges for our unprivileged containers? Or is that kernel interface not integrated within user namespaces yet?

  • Can we do qemu-within-qemu for when we're running on OSX? Sure, it'll be slow, but hopefully this is only used for when we're running cmake autoprobe executables anyway.

@Keno
Copy link
Contributor

Keno commented Jun 21, 2018

We can add code in BinaryBuilder.jl to auto-register with binfmt_misc on Linux systems. Is it possible to register binfmt_misc within the usernamespace and thereby not require sudo privileges for our unprivileged containers? Or is that kernel interface not integrated within user namespaces yet?

Yes, I believe this works

Can we do qemu-within-qemu for when we're running on OSX? Sure, it'll be slow, but hopefully this is only used for when we're running cmake autoprobe executables anyway.

Different kinds of qemu. I think that should nest just fine.

@sloede
Copy link
Contributor

sloede commented Feb 28, 2020

Is there any progress on this issue? Another advantage I see from being able to run executables is that it would allow to immediately test the build results, e.g., in cases where the build process provides a binary that can be used to ensure the functionality of the built library. Especially for Windows builds I'd see this as greatly beneficial, since (I assume) many developers probably do not have ready access to a Windows machine for easy testing.

@bramtayl
Copy link

bramtayl commented Sep 4, 2020

This seems to required for Jack1, Jack2, and a couple of optional dependencies for PulseAudio. Is there any way I could help nudge it along or contribute? What's the first step?

@eschnett
Copy link
Contributor

@staticfloat says above "[...] which should be possible if we ditch Docker." Why is this? As far as I know, Docker supports binfmt_misc and qemu. It's enabled by default on macOS, but needs to be explicitly set up on Linux https://docs.docker.com/desktop/multi-arch/ .

@staticfloat
Copy link
Member Author

That is now true (I don't think it was 5 years ago in 2017!) and is in fact supported by Sandbox.jl, which is what the next iteration of BinaryBuilder will be built on top of.

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