Building binary installers on macOS has become a dark art, we don't
have people who
master it well any more :-(
The quickest way is to use Conda.
https://doc.sagemath.org/html/en/installation/conda.html
If you use Homebrew then building from source is a reasonably quick option,
too.
Building from source is possible with just XCode installed, but this takes long
time, as it would build gcc/gfortran etc etc
Thank you for providing this. Keep that in mind for future.As it turns out, the solution to installing was incredibly simple:"brew install sage"
--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/e6cb3fd4-f338-4fd6-bd48-f4d6ad7c7345n%40googlegroups.com.
$ brew info sage
sage: 9.1,10.11.6
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/sage.rb
==> Name
Sage
==> Description
None
==> Artifacts
SageMath-9.1.app (App)
/Applications/SageMath-9.1.app/Contents/Resources/sage/sage (Binary)
==> Analytics
install: 261 (30 days), 529 (90 days), 1,740 (365 days)
$
$ brew install sage
[…]
==> Downloading https://mirrors.mit.edu/sage/osx/intel/sage-9.1-OSX_10.11.6-x86_64.app.dmg
######################################################################## 100.0%
==> Installing Cask sage
==> Creating Caskroom at /usr/local/Caskroom
==> We'll set permissions properly so we won't need sudo in the future.
Password:
==> Moving App 'SageMath-9.1.app' to '/Applications/SageMath-9.1.app'.
==> Linking Binary 'sage' to '/usr/local/bin/sage'.
🍺 sage was successfully installed!
$
$ ls -al@ /Applications/SageMath-9.1.app
total 0
drwxr-xr-x@ 4 128 May 23 2020 .
com.apple.quarantine 67
drwxr-xr-x@ 6 192 May 23 2020 Contents
com.apple.quarantine 67
lrwxr-xr-x@ 1 28 Dec 4 01:39 sage -> Contents/Resources/sage/sage
com.apple.quarantine 67
$
“SageMath-9.1.app” can’t be opened because the identity of the developer cannot be confirmed.
On Thu, Dec 3, 2020 at 5:39 PM Mathieu Dutour <mathieu...@gmail.com> wrote:Thank you for providing this. Keep that in mind for future.As it turns out, the solution to installing was incredibly simple:"brew install sage"on macOS 10.15.7 this appears to install the version 9.2 of x86_64.app.dmg bypulling it from a Sage mirror.Does Sage installed this way work?(I'd be surprised it was the case)
Error building Sage.
The following package(s) may have failed to build (not necessarily
during this run of 'make all-build'):
* package: pplpy-0.8.4
last build time: Dec 20 22:51
log file: /Applications/SageMath/logs/pkgs/pplpy-0.8.4.log
[pplpy-0.8.4] creating build/temp.macosx-10.9-x86_64-3.8/ppl
[pplpy-0.8.4] clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -O3 -std=gnu18 -march=native -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -O3 -std=gnu18 -march=native -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -Ippl -I/Applications/SageMath/local/lib/python3.8/site-packages/gmpy2 -Ippl -I -I/Applications/SageMath/local -I/Applications/SageMath/local/lib/python38.zip -I/Applications/SageMath/local/lib/python3.8 -I/Applications/SageMath/local/lib/python3.8/lib-dynload -I/Applications/SageMath/local/lib/python3.8/site-packages -I/private/var/folders/_l/4q83bg9j5ysb7qd1n9xpnb4h0000gn/T/pip-req-build-_4gwq_tw -I/Applications/SageMath/local/include/python3.8 -c ppl/linear_algebra.cpp -o build/temp.macosx-10.9-x86_64-3.8/ppl/linear_algebra.o
[pplpy-0.8.4] error: invalid argument '-std=gnu18' not allowed with 'C++'
[pplpy-0.8.4] error: command 'clang' failed with exit status 1
[pplpy-0.8.4] Building wheel for pplpy (setup.py): finished with status 'error'
[pplpy-0.8.4] ERROR: Failed building wheel for pplpy
[scipy-1.5.2] clang -bundle -undefined dynamic_lookup -L/Applications/SageMath/local/lib -Wl,-rpath,/Applications/SageMath/local/lib -L. -L/Applications/SageMath/local/lib -Wl,-rpath,/Applications/SageMath/local/lib -bundle -undefined dynamic_lookup -L/Applications/SageMath/local/lib -Wl,-rpath,/Applications/SageMath/local/lib -D__ACCELERATE__ build/temp.macosx-10.9-x86_64-3.8/scipy/fftpack/convolve.o -L/Applications/SageMath/local/lib -Lbuild/temp.macosx-10.9-x86_64-3.8 -o build/lib.macosx-10.9-x86_64-3.8/scipy/fftpack/convolve.cpython-38-darwin.so
[scipy-1.5.2] building 'scipy.integrate._quadpack' extension
[scipy-1.5.2] compiling C sources
[scipy-1.5.2] C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -O3 -march=native -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -D__ACCELERATE__
[scipy-1.5.2]
[scipy-1.5.2] compile options: '-DHAVE_CBLAS -Iscipy/_lib/src -I/Applications/SageMath/local/lib/python3.8/site-packages/numpy/core/include -I/Applications/SageMath/local/include/python3.8 -c'
[scipy-1.5.2] clang: scipy/integrate/_quadpackmodule.c
[scipy-1.5.2] In file included from scipy/integrate/_quadpackmodule.c:4:
[scipy-1.5.2] In file included from scipy/integrate/__quadpack.h:28:
[scipy-1.5.2] In file included from /Applications/SageMath/local/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4:
[scipy-1.5.2] In file included from /Applications/SageMath/local/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
[scipy-1.5.2] In file included from /Applications/SageMath/local/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822:
[scipy-1.5.2] /Applications/SageMath/local/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
[scipy-1.5.2] #warning "Using deprecated NumPy API, disable it with " \
[scipy-1.5.2] ^
[scipy-1.5.2] 1 warning generated.
[scipy-1.5.2] /Applications/SageMath/local/bin/gfortran -Wall -g -Wall -g -undefined dynamic_lookup -bundle -bundle -undefined dynamic_lookup -L/Applications/SageMath/local/lib -Wl,-rpath,/Applications/SageMath/local/lib build/temp.macosx-10.9-x86_64-3.8/scipy/integrate/_quadpackmodule.o -L/Applications/SageMath/local/lib -L/Applications/SageMath/local/lib/gcc/x86_64-apple-darwin19.6.0/9.2.0 -L/Applications/SageMath/local/lib -L/Applications/SageMath/local/lib -L/Applications/SageMath/local/lib -Lbuild/temp.macosx-10.9-x86_64-3.8 -lquadpack -lmach -lopenblas -lopenblas -lgfortran -o build/lib.macosx-10.9-x86_64-3.8/scipy/integrate/_quadpack.cpython-38-darwin.so
[scipy-1.5.2] ld: library not found for -lSystem
[scipy-1.5.2] collect2: error: ld returned 1 exit status
[scipy-1.5.2] Running from SciPy source directory.
[scipy-1.5.2] /Applications/SageMath/local/lib/python3.8/site-packages/numpy/distutils/system_info.py:838: UserWarning: Specified path /usr/local/include/python3.8 is invalid.
[scipy-1.5.2] return self.get_paths(self.section, key)
[scipy-1.5.2] /Applications/SageMath/local/lib/python3.8/site-packages/numpy/distutils/system_info.py:838: UserWarning: Specified path /opt/local/include/python3.8 is invalid.
[scipy-1.5.2] return self.get_paths(self.section, key)
[scipy-1.5.2] error: Command "/Applications/SageMath/local/bin/gfortran -Wall -g -Wall -g -undefined dynamic_lookup -bundle -bundle -undefined dynamic_lookup -L/Applications/SageMath/local/lib -Wl,-rpath,/Applications/SageMath/local/lib build/temp.macosx-10.9-x86_64-3.8/scipy/integrate/_quadpackmodule.o -L/Applications/SageMath/local/lib -L/Applications/SageMath/local/lib/gcc/x86_64-apple-darwin19.6.0/9.2.0 -L/Applications/SageMath/local/lib -L/Applications/SageMath/local/lib -L/Applications/SageMath/local/lib -Lbuild/temp.macosx-10.9-x86_64-3.8 -lquadpack -lmach -lopenblas -lopenblas -lgfortran -o build/lib.macosx-10.9-x86_64-3.8/scipy/integrate/_quadpack.cpython-38-darwin.so" failed with exit status 1
[scipy-1.5.2] Building wheel for scipy (PEP 517): finished with status 'error'
[scipy-1.5.2] ERROR: Failed building wheel for scipy
[scipy-1.5.2] Failed to build scipy
[scipy-1.5.2] ERROR: Failed to build one or more wheels
[scipy-1.5.2] Exception information:
[scipy-1.5.2] Traceback (most recent call last):
[scipy-1.5.2] File "/Applications/SageMath/local/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 228, in _main
[scipy-1.5.2] status = self.run(options, args)
[scipy-1.5.2] File "/Applications/SageMath/local/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper
[scipy-1.5.2] return func(self, options, args)
[scipy-1.5.2] File "/Applications/SageMath/local/lib/python3.8/site-packages/pip/_internal/commands/wheel.py", line 184, in run
[scipy-1.5.2] raise CommandError(
[scipy-1.5.2] pip._internal.exceptions.CommandError: Failed to build one or more wheels
[scipy-1.5.2] Removed build tracker: '/private/var/folders/_l/4q83bg9j5ysb7qd1n9xpnb4h0000gn/T/pip-req-tracker-ybfte_50'
[scipy-1.5.2] ********************************************************************************
[scipy-1.5.2] Error building a wheel for scipy-1.5.2
A lot of people have a lot of problems with Sage-9.2 on MacOS, installing pre-compiled or building from the source.Sage-9.2 has several idiosyncrasies that for me are hard to explain. One - it deliberately refuses to work with Macports-installed packages, even though their main difference from similar ones installed via Brew is their location. How crazy is that?
Second, pplpy-0.8.4 is "obtuse" enough to try compiling C++ file linear_algebra.cpp with clang instead of clang++, and then complain that CFLAGS that are (surprise!) C-specific, do not make sense for C++. Need I mention that it is impossible to locate clang but not clang++?
Now, from generic criticisms to specific errors and logs.Platform- iMac 2020, Intel Core i9 CPU, 32GM RAM- macOS Catalina 10.15.7- Xcode-12.3 (with command-line tools installed) in /Applications/Xcode.app, and separately installed CLT 12.3 in /Library/Developer/CommandLineTools.
- Macports 2.6.4, with a ton of packages installed in /opt/local, which include clang-11, gcc-10, python38 and python39, and OpenSSL-1.1.1i.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/63642cb1-a380-4570-b703-e6a873269adbn%40googlegroups.com.
TL;DR.patches are most welcome :-)
Sage-9.2 has several idiosyncrasies that for me are hard to explain. One - it deliberately refuses to work with Macports-installed packages, even though their main difference from similar ones installed via Brew is their location. How crazy is that?To me, it is macOS that has idiosyncrasies ;-)
We don't have a single MacPort user among a handful of SageMath developers. Please feel free to provide patches. (Yes, it means supporting yet another nonstandard location, more or less, I suppose)
Second, pplpy-0.8.4 is "obtuse" enough to try compiling C++ file linear_algebra.cpp with clang instead of clang++, and then complain that CFLAGS that are (surprise!) C-specific, do not make sense for C++. Need I mention that it is impossible to locate clang but not clang++?pplpy upstream is here, it has a very busy maintainer who does not use macOS- the main developer no longer works on SageMath, as far as I know.patches are most welcome!
Platform- iMac 2020, Intel Core i9 CPU, 32GM RAM- macOS Catalina 10.15.7- Xcode-12.3 (with command-line tools installed) in /Applications/Xcode.app, and separately installed CLT 12.3 in /Library/Developer/CommandLineTools.XCode is a moving target, 9.2 was released before XCode 12.3
- Macports 2.6.4, with a ton of packages installed in /opt/local, which include clang-11, gcc-10, python38 and python39, and OpenSSL-1.1.1i.one ought to use XCode's clang(++), and only need gfortran from the gcc package.
Fortran binary location can be explicitly provided by setting FC environment variable.(same for C and C++, one can use CC and CXX)
If you like to enable MacPorts, think about providing an analog of .homebrew-build-env script.
Please see below.TL;DR.patches are most welcome :-)Understood.Sage-9.2 has several idiosyncrasies that for me are hard to explain. One - it deliberately refuses to work with Macports-installed packages, even though their main difference from similar ones installed via Brew is their location. How crazy is that?To me, it is macOS that has idiosyncrasies ;-)True ;-)But still, my Macports point stands.We don't have a single MacPort user among a handful of SageMath developers. Please feel free to provide patches. (Yes, it means supporting yet another nonstandard location, more or less, I suppose)The fun part is that to support Macports, you need to look in /opt/local/include for header files, in /opt/local/lib for libraries, and in /opt/local/bin for executables. How hard does that sound?And I daresay, that adding those directories to the Sage config code where it is currently looking for stuff, is probably easier for a Sage developer unfamiliar with Macports, than for a person experienced with Macports that has no clue about Sage guts (and isn't eager to dive into those! ;).
Second, pplpy-0.8.4 is "obtuse" enough to try compiling C++ file linear_algebra.cpp with clang instead of clang++, and then complain that CFLAGS that are (surprise!) C-specific, do not make sense for C++. Need I mention that it is impossible to locate clang but not clang++?pplpy upstream is here, it has a very busy maintainer who does not use macOS- the main developer no longer works on SageMath, as far as I know.patches are most welcome!I'll take a look later, but the likelihood of me being able to fix it isn't great.Platform- iMac 2020, Intel Core i9 CPU, 32GM RAM- macOS Catalina 10.15.7- Xcode-12.3 (with command-line tools installed) in /Applications/Xcode.app, and separately installed CLT 12.3 in /Library/Developer/CommandLineTools.XCode is a moving target, 9.2 was released before XCode 12.3True, but not really relevant in the context. The big difference/jump came with Xcode-10. Xcode-11 and -12 exacerbated that a bit, but I daresay, imperceptibly so.- Macports 2.6.4, with a ton of packages installed in /opt/local, which include clang-11, gcc-10, python38 and python39, and OpenSSL-1.1.1i.one ought to use XCode's clang(++), and only need gfortran from the gcc package.So one does. ;-)As you can see from the log, the build uses Xcode's clang and clang++.For my stuff, especially when I need to deal with sanitizers extensively, I use Macports clang. And, of course, Xcode's GCC really sucks, so installing a "real" one from Macports was a-must.Fortran binary location can be explicitly provided by setting FC environment variable.(same for C and C++, one can use CC and CXX)It's all done in my config - except for Fortran. I don't use it any more (for the last 20 years, or so ;), but it's no problem installing it. Assuming Sage would be smart enough to use it (rather than downloading and building it's own GCC and GFortran)!If you like to enable MacPorts, think about providing an analog of .homebrew-build-env script.That's something constructive that I can probably do. Thanks for bringing it up.
--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/717dd948-f1c2-4e18-9708-1dd2e68e277bn%40googlegroups.com.
We don't have a single MacPort user among a handful of SageMath developers. Please feel free to provide patches. (Yes, it means supporting yet another nonstandard location, more or less, I suppose)The fun part is that to support Macports, you need to look in /opt/local/include for header files, in /opt/local/lib for libraries, and in /opt/local/bin for executables. How hard does that sound?And I daresay, that adding those directories to the Sage config code where it is currently looking for stuff, is probably easier for a Sage developer unfamiliar with Macports, than for a person experienced with Macports that has no clue about Sage guts (and isn't eager to dive into those! ;).the MacPorts-specific part would be to create a list of packages to install, and put it into build/pkgs/*/distros/macportsand a similar global location.
I looked into build/pgks/* (1.5 GB) and it appears that Sage is trying to be a package manager, in addition to what people probably want it for.I guess at version 9.2 it's rather late to ask why it isn't good enough to just list in the README a set of packages that Sage requires to run, and have a minimal config that would check for their presence at install time? Letting user to worry about, e.g., where and how to install OpenSSL-1.1.x or python38?
--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/85d43727-0336-406f-b877-35b5ed8bb29dn%40googlegroups.com.
the MacPorts-specific part would be to create a list of packages to install, and put it into build/pkgs/*/distros/macportsand a similar global location.I'm not sure I understand what that means.