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

Support configuring current platform: otherwise cannot use osx-64 binaries (bioconda) on ARM macs #875

Open
corneliusroemer opened this issue Feb 28, 2024 · 7 comments
Labels
enhancement New feature or request needs-more Needs more information from the reporter

Comments

@corneliusroemer
Copy link

Problem description

I love what I see here, took pixi for a test drive and it's super exciting.

One thing makes it unfortunately not useful in practice for me: lack of using osx-64-only-channels on my osx-arm64 machine.

I haven't been able to figure out how to tell pixi to pretend that the "current platform" is osx-64 rather than osx-arm64.

That's all that would be needed to allow me to use pixi for real (I think).

I went through the docs but couldn't find how to change the current platform - did I miss something?

@corneliusroemer corneliusroemer added the enhancement New feature or request label Feb 28, 2024
@ruben-arts
Copy link
Contributor

He @corneliusroemer

This is indeed something we're not supporting yet. We've had a similar request on in this issue

Although its not super trivial, as we want a project to be completely reproducible and I believe to make your request work you need Rosetta on your machine and we can't check if that is installed yet.

On the short therm, in most cases it's not hard to build the conda package for osx-arm64 which packages do you need this for?

@baszalmstra
Copy link
Contributor

I would want this to be supported out of the box without the user having to specify additional flags.

@ruben-arts Perhaps we should extend our logic in some places to use osx-64 as the "current" platform if the project is not configured for osx-arm64? With a small warning perhaps?

@corneliusroemer Do macOS x86 applications always work on macOS arm64? Or do you need to enable this somehow?

@baszalmstra baszalmstra added needs-more Needs more information from the reporter and removed needs-decision Undecided if this should be done labels Mar 12, 2024
@wolfv
Copy link
Member

wolfv commented Mar 16, 2024

I think the user needs to manually install rosetta, but Apple makes it pretty easy.
We actually have a similar problem for emscripten-wasm32 and wasi-wasm32 - for those architectures we would also always want to install the defined platform instead of the native one.

But I agree with Bas that we might find a straightforward solution for the osx-arm64 -> osx-64 case and could allow automatic cross-platform installation of the environments.

@ruben-arts I think the bioconda project has not yet started to build packages for osx-arm64.

@ruben-arts
Copy link
Contributor

I guess with a virtual package we could easily define and document the logic right? This probably also goes for the wasm platforms, not sure what you would need for those.

@corneliusroemer
Copy link
Author

Do macOS x86 applications always work on macOS arm64? Or do you need to enable this somehow?
Yes, one needs to install rosetta, but most devs have done so already and it's easy if not. It's literally a one-liner:

/usr/sbin/softwareupdate --install-rosetta --agree-to-license

It's also not too hard to test if rosetta is installed and warn the user, see how nextstrain-cli does that here for inspiration:

I can't use any bioconda packages with pixi yet, indeed, as there are no arm versions. Also by far not all conda-forge osx packages have been migrated to arm yet.

I highly recommend one of you get an ARM mac to dogfood pixi on that platform, it's quite widespread and is fairly important for pixi to fly, I think - I wouldn't recommend it to anyone until it works decently on arm.

@wolfv
Copy link
Member

wolfv commented Mar 21, 2024

I am using Apple Silicon every day :) But I understand that it's an issue for bioconda folks. We're working on it!

@wolfv
Copy link
Member

wolfv commented Apr 8, 2024

Here is a workaround:

curl -L https://github.com/prefix-dev/pixi/releases/download/v0.18.0/pixi-x86_64-apple-darwin -o ~/.pixi/bin/pixi-64
chmod u+x ~/.pixi/bin/pixi-64

Now you can use pixi-64 on osx-arm64 to install "cross-platform" packages. Of course, the downside is that you have 2x pixi installations, but this works for the time being. We'll implement some more clever cross-platform ideas: #1020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-more Needs more information from the reporter
Projects
None yet
Development

No branches or pull requests

4 participants