On Mon, Feb 15, 2021 at 9:24 AM Gonçalo Almeida <[email protected]> wrote:
> I've tried everything and since there ins't a proper version for M1 Macs > natively (at least public yet), I got a Docker image for an Ubuntu terminal > and tried to install Sage there, but it failed to build. > I tried exactly this approach about a month ago with my M1 Mac and it does work and is by far the easiest/most efficient way to get Sage running on M1. One critical surprise was that I had to be careful to increase the amount of RAM that the Docker hypervisor has **significantly above the default** (at least 4GB of RAM, maybe more). Make sure to do that. Otherwise, various aspects of the build will fail in confusing ways due to running out of memory. For what it's worth, here's a paste of some notes I kept for myself: Goal -- SageMath on M1 <https://groups.google.com/g/sage-support/c/h7WLXgHBVnk/m/WSPgMSkKAgAJ> I think the best hope for efficient Sage on M1 Mac is via Docker but without QEMU. I.e., use ARM64 Linux via Docker, which runs via a hypervisor, so will be very fast/performant. https://news.ycombinator.com/item?id=25447153 docker run -td --name=sage-arm -v ~/sage-arm:/sage-arm ubuntu According to root@79ac2b56798b:/# uname -a Linux 79ac2b56798b 4.19.104-linuxkit #1 SMP PREEMPT Sat Feb 15 00:49:47 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux this is ARM linux, so should be fast. apt update apt install tmux dpkg-dev git python m4 git clone https://github.com/sagemath/sage.git cd sage make configure ./configure --enable-build-as-root apt-get install texlive-latex-extra texlive-xetex latexmk pandoc dvipng default-jdk ffmpeg libavdevice-dev libflint-arb-dev libboost-dev libboost-dev libbrial-dev libbrial-groebner-dev libbz2-dev bzip2 coinor-cbc coinor-libcbc-dev libcdd-dev libcdd-tools cliquer libcliquer-dev cmake curl libcurl4-openssl-dev libec-dev eclib-tools gmp-ecm libecm-dev fflas-ffpack libflint-dev flintqs libfreetype6-dev libgc-dev libgf2x-dev gfan gfortran libgiac-dev xcas libgivaro-dev glpk-utils libglpk-dev libgmp-dev pari-gp2c libgsl-dev libigraph-dev libiml-dev libisl-dev lcalc liblfunction-dev libatomic-ops-dev libbraiding-dev libffi-dev libgd-dev libhomfly-dev libnauty-dev libxml2-dev liblrcalc-dev libm4rie-dev libmpc-dev libmpfi-dev libmpfr-dev nauty libncurses5-dev ninja-build libntl-dev libopenblas-dev openssl libssl-dev palp pandoc pari-gp2c libpari-dev pari-doc pari-elldata pari-galdata pari-galpol pari-seadata libpcre3-dev libxml-libxslt-perl libxml-writer-perl libxml2-dev libperl-dev libfile-slurp-perl libjson-perl libsvg-perl libterm-readkey-perl libterm-readline-gnu-perl libmongodb-perl libterm-readline-gnu-perl pkg-config libplanarity-dev planarity libppl-dev ppl-dev python3 libpython3-dev python3-distutils r-base-dev r-cran-lattice libreadline-dev librw-dev libsqlite3-dev sqlite3 libsuitesparse-dev libsymmetrica2-dev sympow tachyon tox xz-utils liblzma-dev libzmq3-dev libz-dev libzn-poly-dev ./config.status --recheck && ./config.status export MAKE="make -j8" make First try -- I think it failed building sagelib due to not enough RAM, so trying again with 8 cpu and 4GB RAM. It can be very resource intensive. This worked for me. -- William -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CACLE5GBaL6%3DTr1MWfja%3Dz8aVGRpp89jtMVB7D3ea-o2or4kqZw%40mail.gmail.com.
