xtb-python icon indicating copy to clipboard operation
xtb-python copied to clipboard

Distribution for Mac M1

Open stenczelt opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe.

I am finding that there is no distribution for M1 Mac machines on conda-forge

Describe the solution you'd like

Please provide a package compiled for M1 Mac machines as well on conda-forge. I don't know how to do this?

Describe alternatives you've considered

I have considered directly installing, some dependencies are missing at the moment, I am trying to work that out. Tried with -Dla_backend=netlib, though it is missing the relevant OMP installation. Perhaps worth a separate issue.

Additional context

Initial attempt

(base) ➜  xtb-python git:(main) conda config --add channels conda-forge
Warning: 'conda-forge' already in 'channels' list, moving to the top
(base) ➜  xtb-python git:(main) conda create --name xtb-tmp xyb-python  
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - xyb-python

Current channels:

  - https://conda.anaconda.org/conda-forge/osx-arm64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.anaconda.com/pkgs/main/osx-arm64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-arm64
  - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

Searching for available packages:

(base) ➜  xtb-python git:(main) conda search xtb-python --channel conda-forge
Loading channels: done
No match found for: xtb-python. Search: *xtb-python*
# Name                       Version           Build  Channel             
scine-xtb-python               1.0.2    pyhd8ed1ab_0  conda-forge  

Computer is Mac mini (M1, 2020) with M1 chip.

stenczelt avatar Aug 15 '22 06:08 stenczelt

I don't know how to do this?

Each feedstock has a conda-forge.yml file, there one can add an option to rebuild for additional architectures (like Linux/aarch64, LInux/ppc64le, or OSX/arm64):

provider:
  linux_aarch64: default
  linux_ppc64le: default
build_platform:
  linux_aarch64: linux_64
  linux_ppc64le: linux_64
  osx_arm64: osx_64
test: native_and_emulated

Add those lines, open a PR and rerender the feedstock by pinging the webservice. That's basically it.

awvwgk avatar Aug 15 '22 06:08 awvwgk

I see, thanks! I see that the same test fails on many platforms, so perhaps not due to the MacOS/ARM build. Can I assist you with anything?

stenczelt avatar Aug 15 '22 07:08 stenczelt

I see that the same test fails on many platforms

The unit test is somewhat shaky since the phase of the orbital can change.

so perhaps not due to the MacOS/ARM build

For this case we don't get to the test phase, since this project currently does not support cross-compilation.

awvwgk avatar Aug 15 '22 08:08 awvwgk

At the moment the two alternatives for MacOS/Arm64 are tblite (conda-forge: tblite-python, PyPI: tblite) or the Scine wrapper for xtb (conda-forge: scine-xtb-python, note: the Scine package is huge). Those Python bindings have of course a different API. The meson build files provided with tblite also show how to setup meson properly for cross-compilation.

awvwgk avatar Aug 15 '22 08:08 awvwgk

Could be fixable now with #95.

awvwgk avatar Dec 31 '22 18:12 awvwgk

Great! I am guessing we need https://github.com/conda-forge/xtb-python-feedstock/pull/21 solves it with hte equivalent sof. https://github.com/conda-forge/xtb-python-feedstock/pull/17 as well

stenczelt avatar Jan 01 '23 10:01 stenczelt

Done

awvwgk avatar Jan 01 '23 13:01 awvwgk