jupyter-xeus / xeus-cling

Jupyter kernel for the C++ programming language
BSD 3-Clause "New" or "Revised" License
3.09k stars 300 forks source link

can't install or build from source on Apple Silicon (arm64) macs #474

Open BenWibking opened 1 year ago

BenWibking commented 1 year ago

There is no arm64 package provided on conda-forge:

(cling) ➜  ~ mamba install xeus-cling -c conda-forge

                  __    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (1.3.0) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████

Looking for: ['xeus-cling']

conda-forge/osx-arm64                                       Using cache
conda-forge/noarch                                          Using cache
Could not solve for environment specs
Encountered problems while solving:
  - nothing provides requested xeus-cling

The environment can't be solved, aborting the operation

Installing the dependencies needed to build from source also fails:

➜  ~ mamba create -n xeus-cling -c conda-forge cmake xeus-zmq cling nlohmann_json cppzmq xtl pugixml doctest cpp-argparse

                  __    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (1.3.0) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████

Looking for: ['cmake', 'xeus-zmq', 'cling', 'nlohmann_json', 'cppzmq', 'xtl', 'pugixml', 'doctest', 'cpp-argparse']

conda-forge/osx-arm64                                       Using cache
conda-forge/noarch                                          Using cache
Could not solve for environment specs
Encountered problems while solving:
  - nothing provides requested cling
  - nothing provides requested cpp-argparse

The environment can't be solved, aborting the operation
trivedip commented 1 year ago

I am experiencing the same issue.

clstaudt commented 1 year ago

Same here, not available via conda-forge.

Related:

mangomangomango0820 commented 1 year ago

Same here, not available via conda-forge.

Related:

do you know any solution to this issue?

clstaudt commented 1 year ago

Don't leave us mac users hanging please. :)

accelee commented 1 year ago

Can't work.

Looking for: ['xeus-cling']

warning libmamba Could not parse mod/etag header warning libmamba Could not parse mod/etag header warning libmamba Could not parse mod/etag header pkgs/main/osx-arm64 (check zst) Checked 1.5s warning libmamba Could not parse mod/etag header pkgs/main/noarch (check zst) Checked 0.4s warning libmamba Could not parse mod/etag header pkgs/r/osx-arm64 (check zst) Checked 0.5s warning libmamba Could not parse mod/etag header pkgs/r/noarch (check zst) Checked 0.4s pkgs/r/osx-arm64 118.0 B @ 82.0 B/s 1.4s pkgs/main/osx-arm64 1.6MB @ 1.1MB/s 1.4s pkgs/main/noarch 696.5kB @ 311.3kB/s 2.2s conda-forge/noarch 11.9MB @ 1.7MB/s 7.2s pkgs/r/noarch 1.3MB @ 149.1kB/s 7.3s conda-forge/osx-arm64 6.3MB @ 538.0kB/s 11.6s Could not solve for environment specs The following package could not be installed └─ xeus-cling does not exist (perhaps a typo or a missing channel).

mcbarton commented 1 year ago

For those still trying to work out how to install Cling my advice is to follow the instructions in the readme of https://github.com/compiler-research/CppInterOp to build the developer version 1.0 . It is possible to install version 0.9 of Cling, but I found it not to be as straightforward. I would avoid trying to build with Cling with the Cling Packaging Tool. I have tested the kernels that come with Cling after following these build instructions (adding the kernels which come with Cling is separate to these build instructions), and built kernels in the xeus-clang-repl repo. I built the dependencies using packages from the Macports package manager, but hopefully everything is included in the conda package manager. Happy to try and help if you run into difficulties.

BenWibking commented 1 year ago

It would make a lot more sense for the project to just provide an arm64 package for conda.

mcbarton commented 1 year ago

As far as I have been able to tell the only package manager with a package description on MacOS arm64 is Homebrew, but it was recently deprecated due to being unable to build. I am not part of the Cling project, and have no idea why they don't have a package description on conda (I also haven't created a conda package before so wouldn't know how to start creating one). Is there anything I could provide which may help with the creation of a package in conda?

tlkahn commented 8 months ago

Confirmed that the problem still persists.

OhadRubin commented 3 days ago

still persists.

mcbarton commented 2 days ago

For those looking for a c++ kernel for Jupyter on Apple silicon there is xeus-cpp https://anaconda.org/conda-forge/xeus-cpp. Its the c++ kernel being developed to replace xeus-cling. I helped make it available through Conda for all available platforms (although it doesn't currently work on Windows).