-
Notifications
You must be signed in to change notification settings - Fork 118
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 universal2 package installer #1570
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1570 +/- ##
=======================================
Coverage 45.20% 45.20%
=======================================
Files 551 551
Lines 111184 111184
=======================================
Hits 50256 50256
Misses 60928 60928 ☔ View full report in Codecov by Sentry. |
@nrnhines : could you share / upload the installer here that you have built & tested? |
@pramodk See the last line of the introductory comment above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM
tested on my intel macbook air and seems to run just fine. Just one remark for rxd:
|
Co-authored-by: Alexandru Săvulescu <[email protected]>
Also tested on an M1 (arm64 + rosetta) and things also look fine. |
I'm presently a bit confused about what to do about this. I need to experiment a bit.
If I use the 10.9 value on M1, I'm getting
I guess because the python3.8 that was being used was being used during that compile stage was |
was that a clean build? |
Yes. But there may not be a perfect solution to the problem. I created a new pkg distribution from the latest 54e9009 and uploaded to https://github.com/neuronsimulator/nrn/releases/tag/8.0a as nrn-8.0a-725-g54e9009fd-osx-arm64-x86_64-py-38-39-310.pkg So it seems to be way too easy to get into a situation where the python macOS version will mismatch the NEURON macOS version. The only solution I can think of is that the user would have to install a more recent python or a python with a more recent build. |
Indeed the official universal2 installers come in with
can't think of any other solution either. We'd also need to rename our pkgs following official installers i.e.: |
I'm wondering what strategy we could adopt here. A way to move forward (as a transition?) would be to continue to provide original pkg + universal2 ?
|
That seems like a reasonable way to cover things. I note that edit: missed this. The Apple Icon "About This Mac" shows the version number under the name. eg.
Anyway. I'll adjust the installer builder script to go either way. |
Selecting a
and the output is
I could have sworn that all the universal pythons I installed from http://python.org were for macOS 11. However there does not seem to be any conflict between the pythons with macOS 10.9 and the NEURON with macOS 11. Perhaps a clue to all this is that the current python.org distribution for 3.9.10 has the note: Now, there is no current binary distribution for 3.8.12 and the latest one I can find is for 3.8.10 where the download page says
By the way, 3.10 universal installers are also
|
That looks sound to me |
I was able to build on the Apple M1 a universal2 macos10.9 of python3.8.12 from sources with
But as the openssl option did not suffice to get a working pip3.8, I also had to
Anyway the resulting I'll upload to Release 8.0a artifacts |
I'm now thinking that it would be best to have the decision about universal2 and MACOSX_DEPLOYMENT_TARGET based on the target Python(s) be determined within CMake. Seems like that would pave the way for making universal2 wheels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nrnhines I think this can be merged?
Indeed. We could maybe try to do the universal2 wheels soon or at least m1 wheels. |
I only have a concern about the proper use of MACOS_DEPLOYMENT_TARGET and how safe it is when the Python run on the user machine is different. |
Re-exploring MACOS_DEPLOYMENT_TARGET=10.9, I'm seeing that it works in the sense of |
The final change to this PR that I think should be done is to change the file nameing convention to use the |
IMO having 3.8.12 built from source so that we can fully be consistent wrt |
Closes #1569
nrn/bldnrnmacpkgcmake.sh on Apple M1 by default generates pkg installer for arm64 x86_64 for Python 3.8, 3,9, 3.10
Updated docs
Useful error message generated if dlopen fails because libpython, libmpi, or libnrnmech has only an available architecture that differs from the architecture in use by libnrniv
I'm guessing it would be possible to do universal builds on a macOS x86_64. But all libraries linked against likely have to be universal. (note that openmpi is not linked against during the build). In particular, python.org distributes universal builds for python3.8, 3.9, and 3.10.
Try nrn-8.0a-718-g6e80a61cf-osx-arm64-x86_64-py-38-39-310.pkg at https://github.com/neuronsimulator/nrn/releases/tag/8.0a