MacOS 14.5 on M2 fails to build at gmp

69 views
Skip to first unread message

Ben Salisbury

unread,
Aug 20, 2024, 3:40:01 PM8/20/24
to sage-support
Hi.  I'm trying to build Sage from source (the develop branch) on an M2 MBAir running Sonoma 14.5 and the build continues to fail at gmp.  I downloaded a fresh copy of Command Line Tools and installed all the brew packages.  Here is my brew list:

salis1bt@MTH158053PE212 sage % brew list

==> Formulae

aom eigen gsl libgcrypt libusb netpbm pinentry snappy

arb ffmpeg gts libgpg-error libvidstab nettle pixman speex

aribb24 flac guile libheif libvmaf ninja pkg-config sqlite

arpack flint harfbuzz libiconv libvorbis npth pmix srt

assimp fontconfig highway libidn libvpx nspr polymake suite-sparse

autoconf fplll hugo libidn2 libx11 nss poppler svt-av1

automake freetype hunspell libksba libxau ntl ppl symengine

bdw-gc frei0r hwloc liblqr libxcb open-mpi primecount tbb

berkeley-db fribidi icu4c libmicrohttpd libxdmcp openblas primesieve tcl-tk

berkeley-db@5 gcc igraph libmng libxext opencore-amr python-distlib tesseract

boost gd imagemagick libmpc libxml2 openexr python-filelock texinfo

brotli gdbm imath libnghttp2 libxrender openjpeg python-packaging theora

bzip2 gdk-pixbuf isl libogg little-cms2 openldap python-platformdirs tox

ca-certificates gengetopt jasper libomp llvm openssl@1.1 python-setuptools unbound

cairo gettext jbig2dec libpng lua openssl@3 pyt...@3.10 virtualenv

cbc gh jpeg-turbo libpthread-stubs lz4 opus pyt...@3.11 webp

cddlib ghostscript jpeg-xl libraw lzo osi pyt...@3.12 x264

cgl giflib lame librist m4 p11-kit qhull x265

cjson git leptonica librsvg maxima pandoc qt xmlto

clp glib libarchive libsamplerate mbedtls pango r xorgproto

cmake glpk libass libsndfile md4c pari rav1e xvid

cmocka gmp libassuan libsodium meson pari-elldata readline xz

coinutils gnu-getopt libatomic_ops libsoxr metis pari-galdata rlwrap z3

curl gnupg libavif libssh mongo-c-driver pari-galpol rtmpdump zeromq

dav1d gnuplot libb2 libssh2 mpdecimal pari-seadata rubberband zimg

dbus gnutls libbluray libtasn1 mpfi patchelf sbcl zlib

docbook gpatch libcerf libtiff mpfr pcre sdl2 zstd

docbook-xsl gpgme libde265 libtool mpg123 pcre2 shared-mime-info

double-conversion graphite2 libevent libunibreak nauty pdf2svg singular

ecl graphviz libffi libunistring ncurses perl six


I've also run source .homebrew-build-env within my SAGE_ROOT.  The log file for gmp is attached.  

FWIW, this is a University owned machine and they've spewed all sorts of problem-creating garbage on the machine which may be causing some hurdles.  For example, I was able to get this same build to work effortlessly on my personal M1 MBP.  

Any ideas?
gmp-6.3.0.log

Dima Pasechnik

unread,
Aug 20, 2024, 7:08:47 PM8/20/24
to sage-s...@googlegroups.com
Why is gmp from Brew rejected?
Please post top-level config.log

Ben Salisbury

unread,
Aug 20, 2024, 7:38:39 PM8/20/24
to sage-support
This one?  I included the install.log, too, just for fun.
config.log
install.log

Dima Pasechnik

unread,
Aug 20, 2024, 9:05:31 PM8/20/24
to sage-s...@googlegroups.com
testing Brew's gmp errors out with <iosfwd> not found.

Something is funny with the Xcode installation, I presume

Dima Pasechnik

unread,
Aug 20, 2024, 9:12:42 PM8/20/24
to sage-s...@googlegroups.com
actually, the C++ compiler is not functioning in this installation.
And you must use Clang/Clang++ to build Sage on macOS, so that's why it's broken

Matthias Koeppe

unread,
Aug 21, 2024, 2:55:01 AM8/21/24
to sage-support
I'd suggest to check if you have stuff in /usr/local that does not belong there.

Ben Salisbury

unread,
Aug 22, 2024, 2:27:25 PM8/22/24
to sage-support
I'm not sure how to tell what's supposed to be there and what isn't.  Here is my top level /usr/local/

salis1bt@MTH158053PE212 local % ls -ao

total 0

drwxr-xr-x   9 root   288 Aug 16 09:28 .

drwxr-xr-x@ 11 root   352 May  7 03:01 ..

drwxr-xr-x   3 root    96 Nov 10  2022 Installomator

drwxr-xr-x  44 root  1408 Aug 21 08:25 bin

drwxrwxr-x@  4 root   128 Jan  4  2024 cmu

drwxr-xr-x   3 root    96 Sep  7  2022 jamf

drwxr-xr-x   5 root   160 Aug  8 10:22 libexec

drwxr-xr-x   6 root   192 Feb 16  2023 share

drwxr-xr-x   5 root   160 May 22  2023 texlive


Before I go nagging my IT administrators about the damage that cmu/, jamf/, and libexec/ might be doing, do you see anything funny in /bin?

salis1bt@MTH158053PE212 local % ls -ao bin/

total 259272

drwxr-xr-x  44 root      1408 Aug 21 08:25 .

drwxr-xr-x   9 root       288 Aug 16 09:28 ..

-rwxr-xr-x   1 root   5610192 Jun 27 03:15 RemoteUpdateManager

-rwxr-xr-x   1 root    257664 Dec  1  2020 authchanger

lrwxr-xr-x   1 root        48 Sep  8  2022 bbdiff -> /Applications/BBEdit.app/Contents/Helpers/bbdiff

lrwxr-xr-x   1 root        53 Sep  8  2022 bbedit -> /Applications/BBEdit.app/Contents/Helpers/bbedit_tool

lrwxr-xr-x   1 root        48 Sep  8  2022 bbfind -> /Applications/BBEdit.app/Contents/Helpers/bbfind

lrwxr-xr-x   1 root        51 Sep  8  2022 bbresults -> /Applications/BBEdit.app/Contents/Helpers/bbresults

-rwxr-xr-x   1 root    231328 Dec  7  2020 desktoppr

-rwxr-xr-x@  1 root      1577 Feb 28 05:59 dialog

-rwxr-xr-x   1 root   1683104 Mar  8  2022 dockutil

-rwxr-xr-x   1 root      1007 Sep 22  2022 dvipdf

-rwxr-xr-x   1 root       639 Sep 22  2022 eps2eps

lrwxr-xr-x   1 root        23 May 22  2023 gs -> /usr/local/bin/gs-noX11

-rwxr-xr-x   1 root  59864816 Sep 22  2022 gs-X11

-rwxr-xr-x   1 root  59724368 Sep 22  2022 gs-noX11

-rwxr-xr-x   1 root       350 Sep 22  2022 gsbj

-rwxr-xr-x   1 root       352 Sep 22  2022 gsdj

-rwxr-xr-x   1 root       352 Sep 22  2022 gsdj500

-rwxr-xr-x   1 root       353 Sep 22  2022 gslj

-rwxr-xr-x   1 root       350 Sep 22  2022 gslp

-rwxr-xr-x   1 root       277 Sep 22  2022 gsnd

lrwxr-xr-x   1 root        24 Sep  7  2022 jamf -> /usr/local/jamf/bin/jamf

-rwxr-xr-x   1 root      5470 Sep 22  2022 lprsetup.sh

-rwxr-xr-x   1 root       284 Feb  2  2024 managed_python3

lrwxr-xr-x   1 root        78 Aug 21 08:25 mdatp -> /Applications/Microsoft Defender.app/Contents/Resources/Tools/wdavdaemonclient

-rwxr-xr-x   1 root   8019664 Sep 27  2023 mist

-rwxr-xr-x   1 root       698 Sep 22  2022 pdf2dsc

-rwxr-xr-x   1 root       909 Sep 22  2022 pdf2ps

-rwxr-xr-x   1 root       498 Sep 22  2022 pf2afm

-rwxr-xr-x   1 root       516 Sep 22  2022 pfbtopfa

-rwxr-xr-x   1 root       404 Sep 22  2022 pphs

-rwxr-xr-x   1 root       395 Sep 22  2022 printafm

-rwxr-xr-x   1 root       631 Sep 22  2022 ps2ascii

-rwxr-xr-x   1 root      1264 Sep 22  2022 ps2epsi

-rwxr-xr-x   1 root       272 Sep 22  2022 ps2pdf

-rwxr-xr-x   1 root       215 Sep 22  2022 ps2pdf12

-rwxr-xr-x   1 root       215 Sep 22  2022 ps2pdf13

-rwxr-xr-x   1 root       215 Sep 22  2022 ps2pdf14

-rwxr-xr-x   1 root      1078 Sep 22  2022 ps2pdfwr

-rwxr-xr-x   1 root       647 Sep 22  2022 ps2ps

-rwxr-xr-x   1 root       669 Sep 22  2022 ps2ps2

lrwxr-xr-x   1 root        34 Sep 14  2022 sage -> /Users/salis1bt/sage/venv/bin/sage

-rwxr-xr-x   1 root      4165 Sep 22  2022 unix-lpr.sh


Marc Culler

unread,
Aug 22, 2024, 2:53:40 PM8/22/24
to sage-support
I suggest installing the Sage_macOS app on the university's machine and building from source on a machine which you are allowed to configure.

The binary installation is completely self-contained, so will not be affected by anything the IT administrators may have installed.

- Marc

Ben Salisbury

unread,
Aug 22, 2024, 4:53:51 PM8/22/24
to sage-support
You're probably right... I'll do that instead. 

Dima Pasechnik

unread,
Aug 22, 2024, 6:55:53 PM8/22/24
to sage-s...@googlegroups.com, bsali...@gmail.com
I would remove the symbolic link 'sage' in
/usr/local/bin/

Dima
Reply all
Reply to author
Forward
0 new messages