-
Notifications
You must be signed in to change notification settings - Fork 8
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
Error loading file on M1 Mac #101
Comments
Hello @emay2022! To be honest, I don't think we personally have a good solution other than saying: "you should try building the library yourself." I think @psobolewskiPhD will have the best insight into how to get this library to build on M1 macs cc @toloudis |
Of interest: See if cibuildwheel (and github actions, for that matter) supports M1 macs, and what setting we would need to include to test that... |
This would be fine if the wheel didn't install wihout issues. I think you're currently distributing a "universal" wheel that may not actually be universal.
I believe it does. I think i've helped set this up elsewhere |
Looks like cibuildwheel supports MACOS arch: pypa/cibuildwheel#484 We may just need to add arm64 to our CIBW_ARCHS_MACOS list |
basically this: project-gemmi/gemmi@7d36d41 |
or alternatively via pyproject.toml: https://github.com/project-gemmi/gemmi/pull/164/files |
@ianhi mind making a PR with what you think will fix? |
OK. so pip shows that
And it should just build. Edit: too slow! |
BTW, those CC flags may not be needed. Either way, it's odd to me that
|
Reopening this issue. We are trying another variant of the CIBuildWheel stuff. If anyone has time to test the produced wheels, they will likely be available in an hour. https://github.com/AllenCellModeling/aicspylibczi/actions/runs/1746866957 |
I just downloaded the artifact. It now has wheels marked
|
I have no idea what this means 🤡 Sounds like it doesn't work? |
Yea,
Edit2: the key being: |
I have no idea what to do anymore. This is now just an open call for help from anyone who sees this issue. |
I'm guessing it's the cpp workflow that's doing the actual So I think maybe there needs to be a detect for arm64 and the cmake arch flag set? |
OK, so I'm pretty certain the issue with builds is due to no cross-compilation flags being passed to And here's a possible solution, but I think it uses a different build system ( |
If you make a PR, you could update the py-build-pr file: https://github.com/AllenCellModeling/aicspylibczi/blob/main/.github/workflows/py-build-pr.yml to include the build wheel job and then download any of the wheels built as a part of that push (this is the wheel building part of the workflow that you could add to a pr workflow: https://github.com/AllenCellModeling/aicspylibczi/blob/main/.github/workflows/py-build-main.yml#L78) |
Not fully 'getting' that ⬆️ at the moment, BUT: |
That looks very promising, that's probably exactly what we need. |
I attempted to add the changes from the above mentioned solution. |
Sorry I never got a chance to push this further! Here's the 3.9's
And the 3.8's:
And the 3.10s
Also in my 3.9 environment i tested that the artifact works correctly with aicsimageio to import .czi. No errors (just a simple file from the napari-aicsimageio test resources, I don't have any of my own .czi files) Question:
|
I am pretty sure that we need to ship them all separately. Exciting stuff though. Seems like we have some form of working mac builds. Will ship with next release! Nice job @toloudis |
I think the macos10_9 vs 11_0 is because we are building on two different macos configs. I am assuming pypi knows how to deal with all that once we ship everything up there but I'm not really sure. |
Here is the diff if interested. Very similar to the link above. Sadly I made the mistake of doing the first push on main and so I just kept going. My fault there, and I probably should have corrected that. |
Maybe you can do a pre-release which should make testing off pypi possible? |
@toloudis I saw the 3.0.5dev pre-release. PS: any plan to make this available on conda-forge as well? I saw that |
Ah, glad you found it! We should have an open issue to add this to conda-forge somewhere if it's not already. |
Looks like @tlambert03 was working on it: I'm not sure I totally understand how that all works, but at the moment it's not compiled for arm64 :
|
yeah, needed someone with more direct interaction with aicspylibczi to pick that one up |
I think after our next release of this library we should be able to rerun those jobs / update the version tag on that PR and the builds "may just pass" because of these changes? |
I bumped 3.0.5 to full release. Should publish soon. |
I don't know what is up with that manylinux curl request. It has failed before and then I re-ran it and it worked. |
should be published now |
And I can load |
Excellent! Hopefully aicsimageio is next on the M1 train :) |
Oh (LIF user here, so this was never a real issue for me personally and |
Once @emay2022 or @ianhi try it out on m1 mac we can close this issue. And maybe try a condaforge build (cc @tlambert03) This checks another thing off the checklist of items for |
I just tried the conda build again, but no luck. Ideally, the sdist distributed here on pypi would have everything needed to build the package, but it doesn't have much at all (like the cmakelist, etc...). I think we came across this before and decided to try using tagged refs available on github. So it would be good to tag a new 3.0.5 so I can try it from github directly. But generally speaking, we can't |
I ran
Then I was able to load a .czi file using Thank you so much everyone! |
System and Software
3.9.9 | packaged by conda-forge | (main, Dec 20 2021, 02:41:07) \n[Clang 11.1.0 ]
Description
A clear description of the bug
When I attempted to load a file with this library I got the following error:
Expected Behavior
The file loads without an error
Reproduction
Environment
Any additional information about your environment
cc @ianhi
The text was updated successfully, but these errors were encountered: