trouble installing sage

495 views
Skip to first unread message

Anne Schilling

unread,
Sep 23, 2024, 1:54:33 PM9/23/24
to sage-devel
Dear all,

I am having trouble installing SageMath on MacOS 15.0. I get the following error message:

....
amax_k_ -DCNAME=samax_k -DCHAR_NAME=\"samax_k_\" -DCHAR_CNAME=\"samax_k\" -DNO_AFFINITY -I.. -UDOUBLE  -UCOMPLEX -UCOMPLEX -UDOUBLE  -DUSE_ABS -UUSE_MIN ../kernel/arm64/amax.S -o samax_k.o
[openblas-0.3.26] [spkg-install] make[6]: *** No rule to make target `../kernel/arm64/amin.S', needed by `samin_k.o'.  Stop.
[openblas-0.3.26] [spkg-install] make[5]: *** [libs] Error 1
[openblas-0.3.26] [spkg-install] ********************************************************************************
[openblas-0.3.26] [spkg-install] Error building openblas-0.3.26
[openblas-0.3.26] [spkg-install] ********************************************************************************
[openblas-0.3.26] ************************************************************************
[openblas-0.3.26] Error installing package openblas-0.3.26
[openblas-0.3.26] ************************************************************************
[openblas-0.3.26] Please email sage-devel (http://groups.google.com/group/sage-devel)
[openblas-0.3.26] explaining the problem and including the log files
[openblas-0.3.26]   /Applications/sage/logs/pkgs/openblas-0.3.26.log
[openblas-0.3.26] and
[openblas-0.3.26]   /Applications/sage/config.log
[openblas-0.3.26] Describe your computer, operating system, etc.
[openblas-0.3.26] If you want to try to fix the problem yourself, *don't* just cd to
[openblas-0.3.26] /Applications/sage/local/var/tmp/sage/build/openblas-0.3.26 and type 'make' or whatever is appropriate.
[openblas-0.3.26] Instead, the following commands setup all environment variables
[openblas-0.3.26] correctly and load a subshell for you to debug the error:
[openblas-0.3.26]   (cd '/Applications/sage/local/var/tmp/sage/build/openblas-0.3.26' && '/Applications/sage/sage' --buildsh)
[openblas-0.3.26] When you are done debugging, you can type "exit" to leave the subshell.
[openblas-0.3.26] ************************************************************************
[openblas-0.3.26] real 11m53.637s user 8m5.845s sys 2m24.718s
make[4]: *** [openblas-SAGE_LOCAL-no-deps] Error 1
make[3]: *** [/Applications/sage/local/var/lib/sage/installed/openblas-0.3.26] Error 2
make[2]: *** [all-start] Error 2
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all-start'):

* package:         ipykernel-6.27.1
  last build time: Sep 23 10:31
  log file:        /Applications/sage/logs/pkgs/ipykernel-6.27.1.log

* package:         openblas-0.3.26
  last build time: Sep 23 10:37
  log file:        /Applications/sage/logs/pkgs/openblas-0.3.26.log
  build directory: /Applications/sage/local/var/tmp/sage/build/openblas-0.3.26

It is safe to delete any log files and build directories, but they
contain information that is helpful for debugging build problems.
WARNING: If you now run 'make' again, the build directory of the
same version of the package will, by default, be deleted. Set the
environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.

real 11m58.056s user 14m42.784s sys 4m9.943s
make[1]: *** [all-start] Error 1
make: *** [all] Error 2

The logs are attached.

Best wishes,

Anne
ipykernel-6.27.1.log

Dima Pasechnik

unread,
Sep 23, 2024, 2:47:58 PM9/23/24
to sage-...@googlegroups.com
you probably need the latest, openblas 0.3.28. (0.3.26 pre-dates macOS
15.0, IMHO)

It's already in Homebrew (https://formulae.brew.sh/formula/openblas#default)
so you might give it a try this way.

Or we should make a separate update, as
https://github.com/sagemath/sage/pull/38227 might to get merged
soon enough for you.

Dima
> --
> 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 sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/21f2c768-c732-46d3-aef4-be86d2b42c1cn%40googlegroups.com.

Dima Pasechnik

unread,
Sep 23, 2024, 2:48:08 PM9/23/24
to sage-...@googlegroups.com, Anne Schilling
Hi Anne,
could you try https://github.com/sagemath/sage/pull/38705 ?
(this is the openblas update to 0.3.28)
Dima

Anne Schilling

unread,
Sep 23, 2024, 8:27:58 PM9/23/24
to sage-devel
Hi Dima,

Thank you for your answers. I applied your branch, but still get an error message:

...
[cypari-2.2.0] [spkg-install] adding 'cypari2/string_utils.pyx'
[cypari-2.2.0] [spkg-install] adding 'cypari2/types.pxd'
[cypari-2.2.0] [spkg-install] adding 'cypari2-2.2.0.dist-info/LICENSE'
[cypari-2.2.0] [spkg-install] adding 'cypari2-2.2.0.dist-info/METADATA'
[cypari-2.2.0] [spkg-install] adding 'cypari2-2.2.0.dist-info/WHEEL'
[cypari-2.2.0] [spkg-install] adding 'cypari2-2.2.0.dist-info/top_level.txt'
[cypari-2.2.0] [spkg-install] adding 'cypari2-2.2.0.dist-info/RECORD'
[cypari-2.2.0] [spkg-install] removing build/bdist.macosx-10.9-universal2/wheel
[cypari-2.2.0] [spkg-install] Successfully built cypari2-2.2.0-cp39-cp39-macosx_11_0_universal2.whl
[cypari-2.2.0] [spkg-install] Staged wheel file, staged /Applications/sage/local/var/lib/sage/venv-python3.9/var/lib/sage/scripts/cypari/spkg-requirements.txt
[cypari-2.2.0] Moving package files from temporary location /Applications/sage/local/var/lib/sage/venv-python3.9/var/tmp/sage/build/cypari-2.2.0/inst to /Applications/sage/local/var/lib/sage/venv-python3.9
[cypari-2.2.0] [spkg-pipinst] Using pip 24.2 from /Applications/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/pip (python 3.9)
[cypari-2.2.0] [spkg-pipinst] Looking in links: /Applications/sage/local/var/lib/sage/venv-python3.9/var/lib/sage/wheels
[cypari-2.2.0] [spkg-pipinst] Processing /Applications/sage/local/var/lib/sage/venv-python3.9/var/lib/sage/wheels/cypari2-2.2.0-cp39-cp39-macosx_11_0_universal2.whl (from -r /Applications/sage/local/var/lib/sage/venv-python3.9/var/lib/sage/scripts/cypari/spkg-requirements.txt (line 1))
[cypari-2.2.0] [spkg-pipinst] Requirement already satisfied: cysignals>=1.11.3 in /Applications/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages (from cypari2@ file:///Applications/sage/local/var/lib/sage/venv-python3.9/var/lib/sage/wheels/cypari2-2.2.0-cp39-cp39-macosx_11_0_universal2.whl->-r /Applications/sage/local/var/lib/sage/venv-python3.9/var/lib/sage/scripts/cypari/spkg-requirements.txt (line 1)) (1.11.4)
[cypari-2.2.0] [spkg-pipinst] Installing collected packages: cypari2
[cypari-2.2.0] [spkg-pipinst] Successfully installed cypari2-2.2.0
[cypari-2.2.0] Deleting build directory /Applications/sage/local/var/lib/sage/venv-python3.9/var/tmp/sage/build/cypari-2.2.0
[cypari-2.2.0] Finished installing cypari-2.2.0
[cypari-2.2.0] real 1m30.038s user 1m19.738s sys 0m6.258s

make[2]: *** [all-start] Error 2
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all-start'):

* package:         openblas-0.3.28
  last build time: Sep 23 17:22
  log file:        /Applications/sage/logs/pkgs/openblas-0.3.28.log
  build directory: /Applications/sage/local/var/tmp/sage/build/openblas-0.3.28


It is safe to delete any log files and build directories, but they
contain information that is helpful for debugging build problems.
WARNING: If you now run 'make' again, the build directory of the
same version of the package will, by default, be deleted. Set the
environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.

real 33m23.273s user 44m33.079s sys 13m46.955s

make[1]: *** [all-start] Error 1
make: *** [all] Error 2

Best wishes,

Anne
openblas-0.3.28.log

Kwankyu Lee

unread,
Sep 23, 2024, 8:59:17 PM9/23/24
to sage-devel
Hi Anne,

The PR https://github.com/sagemath/sage/pull/38659 aims to simplify the installation instructions in README. 

As you seem to have a new macOS, would you try the guide in the new README on your platform?

I have no idea about the cause of your troubles though.

Kwankyu

Anne Schilling

unread,
Sep 24, 2024, 12:10:12 AM9/24/24
to sage-devel
Hi Kwankyu,

I tried the simplified installation instructions in 38659. Now I get the following error message (after doing make distclean as well):

[cypari-2.2.0] [spkg-pipinst] Requirement already satisfied: cysignals>=1.11.3 in /Applications/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages (from cypari2@ file:///Applications/sage/local/var/lib/sage/venv-python3.9/var/lib/sage/wheels/cypari2-2.2.0-cp39-cp39-macosx_11_0_universal2.whl->-r /Applications/sage/local/var/lib/sage/venv-python3.9/var/lib/sage/scripts/cypari/spkg-requirements.txt (line 1)) (1.11.4)
[cypari-2.2.0] [spkg-pipinst] Installing collected packages: cypari2
[cypari-2.2.0] [spkg-pipinst] Successfully installed cypari2-2.2.0
[cypari-2.2.0] Deleting build directory /Applications/sage/local/var/lib/sage/venv-python3.9/var/tmp/sage/build/cypari-2.2.0
[cypari-2.2.0] Finished installing cypari-2.2.0
[cypari-2.2.0] real 1m44.371s user 1m31.273s sys 0m7.499s

make[2]: *** [all-start] Error 2
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all-start'):

* package:         ipykernel-6.27.1
  last build time: Sep 23 20:59
  log file:        /Applications/sage/logs/pkgs/ipykernel-6.27.1.log

* package:         scipy-1.12.0
  last build time: Sep 23 20:59
  log file:        /Applications/sage/logs/pkgs/scipy-1.12.0.log


It is safe to delete any log files and build directories, but they
contain information that is helpful for debugging build problems.
WARNING: If you now run 'make' again, the build directory of the
same version of the package will, by default, be deleted. Set the
environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.

real 33m20.291s user 80m26.058s sys 15m16.308s

make[1]: *** [all-start] Error 1
make: *** [all] Error 2

Best wishes,

Anne

Anne Schilling

unread,
Sep 24, 2024, 3:10:20 AM9/24/24
to sage-devel

Dear All,

To add further confusion to this issue, I now tried to install sage from source on an older MacOS 10.15.7 and got this error message. I followed all the instructions in README.md:

...
[cypari-2.1.5] [spkg-pipinst] Looking in links: /Users/anne/sage/sage/local/var/lib/sage/venv-python3.10/var/lib/sage/wheels
[cypari-2.1.5] [spkg-pipinst] Processing /Users/anne/sage/sage/local/var/lib/sage/venv-python3.10/var/lib/sage/wheels/cypari2-2.1.5-cp310-cp310-macosx_10_15_x86_64.whl (from -r /Users/anne/sage/sage/local/var/lib/sage/venv-python3.10/var/lib/sage/scripts/cypari/spkg-requirements.txt (line 1))
[cypari-2.1.5] [spkg-pipinst] Requirement already satisfied: cysignals>=1.7 in /Users/anne/sage/sage/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages (from cypari2@ file:///Users/anne/sage/sage/local/var/lib/sage/venv-python3.10/var/lib/sage/wheels/cypari2-2.1.5-cp310-cp310-macosx_10_15_x86_64.whl->-r /Users/anne/sage/sage/local/var/lib/sage/venv-python3.10/var/lib/sage/scripts/cypari/spkg-requirements.txt (line 1)) (1.11.4)
[cypari-2.1.5] [spkg-pipinst] Installing collected packages: cypari2
[cypari-2.1.5] [spkg-pipinst] Successfully installed cypari2-2.1.5
[cypari-2.1.5] Deleting build directory /Users/anne/sage/sage/local/var/lib/sage/venv-python3.10/var/tmp/sage/build/cypari-2.1.5
[cypari-2.1.5] Finished installing cypari-2.1.5
[cypari-2.1.5] real 12m29.794s user 10m52.117s sys 0m16.185s

make[2]: *** [all-start] Error 2
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all-start'):

* package:         ipykernel-6.27.1
  last build time: Sep 23 23:48
  log file:        /Users/anne/sage/sage/logs/pkgs/ipykernel-6.27.1.log


It is safe to delete any log files and build directories, but they
contain information that is helpful for debugging build problems.
WARNING: If you now run 'make' again, the build directory of the
same version of the package will, by default, be deleted. Set the
environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.

real 44m57.426s user 209m54.674s sys 32m35.642s

make[1]: *** [all-start] Error 1
make: *** [all] Error 2

Best wishes,

Anne

Kwankyu Lee

unread,
Sep 24, 2024, 5:24:39 AM9/24/24
to sage-devel
Uploading the logs of the failed packages

/Applications/sage/logs/pkgs/ipykernel-6.27.1.log
/Applications/sage/logs/pkgs/scipy-1.12.0.log

would help.

Anne Schilling

unread,
Sep 24, 2024, 11:35:30 AM9/24/24
to sage-devel
Hi Kwankyu,

Here are the logs for MacOS 15.0.

Best wishes,

Anne
ipykernel-6.27.1.log
scipy-1.12.0.log

Dima Pasechnik

unread,
Sep 24, 2024, 11:38:02 AM9/24/24
to sage-...@googlegroups.com, Anne Schilling
Hi Anne,

Please post the log file for this:

package: ipykernel-6.27.1
last build time: Sep 23 23:48
log file: /Users/anne/sage/sage/logs/pkgs/ipykernel-6.27.1.log

> --
> 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 sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/a53e3416-59c2-4364-9a2d-b5e031d99916n%40googlegroups.com.

Anne Schilling

unread,
Sep 24, 2024, 11:39:50 AM9/24/24
to sage-devel
Hi Dima,

Here is the log for MacOS 10.15.7.

Thank you for your help!

Anne
ipykernel-6.27.1.log

Dima Pasechnik

unread,
Sep 24, 2024, 12:28:14 PM9/24/24
to sage-...@googlegroups.com
from your scipy log:

[spkg-install] Library m found: YES
[spkg-install]
[spkg-install] ../meson.build:80:0: ERROR: Compiler gfortran cannot
compile programs.
[spkg-install]
[spkg-install] A full log can be found at
/Users/anne/sage/sage/local/var/lib/sage/venv-python3.9/var/tmp/sage/build/scipy-1.12.0/src/.mesonpy-f8mmdnb8/meson-logs/meson-log.txt

The scipy version (1.12) pre-dates macOS 15.0 by almost a year.
That's totally unsurprising that it doesn't work.
Note that even the latest scipy version, 1.14.1, was released before macOS 15.0.

I'd suggest to install (update) Homebrew, (to) the latest version.
Install as many Homebrew packages usable by Sage as possible, in
particular scipy, pari-gp, singular, etc, and
run (after the all-important step of sourcing .homebrew-build-env)

./configure --enable-system-site-packages --disable-notebook

to get a semi-minimal configuration before running make. Although I
expect more issues with giac, gap, etc.
Another advantage is that building time will be cut to almost the
minimal (basically, the only big thing to build
will be sagelib itself)

Dima
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/a32bf782-ac78-4fec-90d2-a1254653e30bn%40googlegroups.com.

Anne Schilling

unread,
Sep 24, 2024, 4:41:27 PM9/24/24
to sage-devel
Thank you for your suggestions, Dima!

I am still having trouble though:

MacBook-Pro-3:sage anne$ brew update
==> Updating Homebrew...
Already up-to-date.
MacBook-Pro-3:sage anne$ brew reinstall scipy
==> Downloading https://ghcr.io/v2/homebrew/core/scipy/manifests/1.14.1
Already downloaded: /Users/anne/Library/Caches/Homebrew/downloads/fe16e5798590ee2e52b5b555d5ce1e0f6f646aedc0248ae4eeda34fe980d4c03--scipy-1.14.1.bottle_manifest.json
==> Fetching scipy
==> Downloading https://ghcr.io/v2/homebrew/core/scipy/blobs/sha256:6727575f0867f1039c2b473e01404f3e1e5c0dd40a5f589251be77cf3aa0d771
Already downloaded: /Users/anne/Library/Caches/Homebrew/downloads/368f5fc36436883495a8aa83a1a1ce7b29bc78b9e699da3bfb8c370df0f83678--scipy--1.14.1.arm64_sequoia.bottle.tar.gz
==> Reinstalling scipy
==> Pouring scipy--1.14.1.arm64_sequoia.bottle.tar.gz
🍺  /opt/homebrew/Cellar/scipy/1.14.1: 1,389 files, 63.8MB
==> Running `brew cleanup scipy`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
MacBook-Pro-3:sage anne$ source $SAGE_ROOT/.homebrew-build-env

./bootstrap
...
./configure
...

make
...
[sage_conf-10.4] [spkg-install]       Removing file or directory /Users/anne/sage/sage/local/var/lib/sage/venv-python3.9/bin/sage-config
[sage_conf-10.4] [spkg-install]       Removing file or directory /Users/anne/sage/sage/local/var/lib/sage/venv-python3.9/bin/sage-env-config
[sage_conf-10.4] [spkg-install]       Removing file or directory /Users/anne/sage/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/__editable__.sage_conf-10.4.pth
[sage_conf-10.4] [spkg-install]       Removing file or directory /Users/anne/sage/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/__editable___sage_conf_10_4_finder.py
[sage_conf-10.4] [spkg-install]       Removing file or directory /Users/anne/sage/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage_conf-10.4.dist-info/
[sage_conf-10.4] [spkg-install]       Successfully uninstalled sage-conf-10.4
[sage_conf-10.4] [spkg-install]   changing mode of /Users/anne/sage/sage/local/var/lib/sage/venv-python3.9/bin/sage-config to 755
[sage_conf-10.4] [spkg-install] Successfully installed sage-conf-10.4
[sage_conf-10.4] Moving package files from temporary location /Users/anne/sage/sage/local/var/lib/sage/venv-python3.9/var/tmp/sage/build/sage_conf-10.4/inst to /Users/anne/sage/sage/local/var/lib/sage/venv-python3.9
[scipy-1.12.0] Applying patches from ../patches...
[scipy-1.12.0] Applying ../patches/tests_no_internet_dependency.patch
[scipy-1.12.0] patching file 'scipy/datasets/meson.build'
[sage_conf-10.4] Deleting build directory /Users/anne/sage/sage/local/var/lib/sage/venv-python3.9/var/tmp/sage/build/sage_conf-10.4
[sage_conf-10.4] Finished installing sage_conf-10.4
[scipy-1.12.0] Host system: Darwin MacBook-Pro-3.local 24.0.0 Darwin Kernel Version 24.0.0: Mon Aug 12 20:51:54 PDT 2024; root:xnu-11215.1.10~2/RELEASE_ARM64_T6000 arm64
[scipy-1.12.0] C compiler: gcc, Apple clang version 16.0.0 (clang-1600.0.26.3), Target: arm64-apple-darwin24.0.0, Thread model: posix, InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
[scipy-1.12.0] No stamp file for package 'scipy' in /Users/anne/sage/sage/local/var/lib/sage/venv-python3.9/var/lib/sage/installed
[scipy-1.12.0] No spkg-legacy-uninstall script; nothing to do
[scipy-1.12.0] [spkg-install] Installing scipy-1.12.0
[scipy-1.12.0] [spkg-install] * Building wheel...
[scipy-1.12.0] [spkg-install] Project name: scipy
[scipy-1.12.0] [spkg-install] Project version: 1.12.0
[scipy-1.12.0] [spkg-install] C compiler for the host machine: gcc (clang 16.0.0 "Apple clang version 16.0.0 (clang-1600.0.26.3)")
[scipy-1.12.0] [spkg-install] C linker for the host machine: gcc ld64 classic  PROJECT:ld64
[scipy-1.12.0] [spkg-install] C++ compiler for the host machine: g++ (clang 16.0.0 "Apple clang version 16.0.0 (clang-1600.0.26.3)")
[scipy-1.12.0] [spkg-install] C++ linker for the host machine: g++ ld64 classic  PROJECT:ld64
[scipy-1.12.0] [spkg-install] Cython compiler for the host machine: cython (cython 3.0.10)
[scipy-1.12.0] [spkg-install] Host machine cpu family: aarch64
[scipy-1.12.0] [spkg-install] Host machine cpu: aarch64
[scipy-1.12.0] [spkg-install] Program python found: YES (/Users/anne/sage/sage/local/var/lib/sage/venv-python3.9/bin/python3)
[scipy-1.12.0] [spkg-install] Found pkg-config: YES (/opt/homebrew/bin/pkg-config) 0.29.2
[scipy-1.12.0] [spkg-install] Run-time dependency python found: YES 3.9
[scipy-1.12.0] [spkg-install] Program cython found: YES (/Users/anne/sage/sage/local/var/lib/sage/venv-python3.9/bin/cython)
[scipy-1.12.0] [spkg-install] Compiler for C supports arguments -Wno-unused-but-set-variable: YES
[scipy-1.12.0] [spkg-install] Compiler for C supports arguments -Wno-unused-function: YES
[scipy-1.12.0] [spkg-install] Compiler for C supports arguments -Wno-conversion: YES
[scipy-1.12.0] [spkg-install] Compiler for C supports arguments -Wno-misleading-indentation: YES
[scipy-1.12.0] [spkg-install] Library m found: YES
[scipy-1.12.0] [spkg-install]
[scipy-1.12.0] [spkg-install] ../meson.build:80:0: ERROR: Compiler gfortran cannot compile programs.
[scipy-1.12.0] [spkg-install]
[scipy-1.12.0] [spkg-install] A full log can be found at /Users/anne/sage/sage/local/var/lib/sage/venv-python3.9/var/tmp/sage/build/scipy-1.12.0/src/.mesonpy-igf88b0d/meson-logs/meson-log.txt
[scipy-1.12.0] [spkg-install]
[scipy-1.12.0] [spkg-install] ERROR Backend subprocess exited when trying to invoke build_wheel
[scipy-1.12.0] [spkg-install] ********************************************************************************
[scipy-1.12.0] [spkg-install] Error building a wheel for scipy-1.12.0
[scipy-1.12.0] [spkg-install] ********************************************************************************
[scipy-1.12.0] ************************************************************************
[scipy-1.12.0] Error installing package scipy-1.12.0
[scipy-1.12.0] ************************************************************************
[scipy-1.12.0] Please email sage-devel (http://groups.google.com/group/sage-devel)
[scipy-1.12.0] explaining the problem and including the log files
[scipy-1.12.0]   /Users/anne/sage/sage/logs/pkgs/scipy-1.12.0.log
[scipy-1.12.0] and
[scipy-1.12.0]   /Users/anne/sage/sage/config.log
[scipy-1.12.0] Describe your computer, operating system, etc.
[scipy-1.12.0] If you want to try to fix the problem yourself, *don't* just cd to
[scipy-1.12.0] /Users/anne/sage/sage/local/var/lib/sage/venv-python3.9/var/tmp/sage/build/scipy-1.12.0 and type 'make' or whatever is appropriate.
[scipy-1.12.0] Instead, the following commands setup all environment variables
[scipy-1.12.0] correctly and load a subshell for you to debug the error:
[scipy-1.12.0]   (cd '/Users/anne/sage/sage/local/var/lib/sage/venv-python3.9/var/tmp/sage/build/scipy-1.12.0' && '/Users/anne/sage/sage/sage' --buildsh)
[scipy-1.12.0] When you are done debugging, you can type "exit" to leave the subshell.
[scipy-1.12.0] ************************************************************************
make[4]: *** [scipy-SAGE_VENV-no-deps] Error 1
make[3]: *** [/Users/anne/sage/sage/local/var/lib/sage/venv-python3.9/var/lib/sage/installed/scipy-1.12.0] Error 2

make[2]: *** [all-start] Error 2
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all-start'):

* package:         ipykernel-6.27.1
  last build time: Sep 24 13:38
  log file:        /Users/anne/sage/sage/logs/pkgs/ipykernel-6.27.1.log

* package:         scipy-1.12.0
  last build time: Sep 24 13:38
  log file:        /Users/anne/sage/sage/logs/pkgs/scipy-1.12.0.log


It is safe to delete any log files and build directories, but they
contain information that is helpful for debugging build problems.
WARNING: If you now run 'make' again, the build directory of the
same version of the package will, by default, be deleted. Set the
environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.

make[1]: *** [all-start] Error 1
make: *** [all] Error 2

Even though brew installed scipy-1.14.1, the error is about scipy-1.12.0.

Best wishes,

Anne

Dima Pasechnik

unread,
Sep 24, 2024, 5:20:25 PM9/24/24
to sage-...@googlegroups.com, Anne Schilling
On Tue, Sep 24, 2024 at 9:41 PM Anne Schilling
<anne1.s...@gmail.com> wrote:
>
> Thank you for your suggestions, Dima!
>
> I am still having trouble though:
>
[...]

> ==> Reinstalling scipy
> ==> Pouring scipy--1.14.1.arm64_sequoia.bottle.tar.gz
> 🍺 /opt/homebrew/Cellar/scipy/1.14.1: 1,389 files, 63.8MB
> ==> Running `brew cleanup scipy`...
> Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
> Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
> MacBook-Pro-3:sage anne$ source $SAGE_ROOT/.homebrew-build-env
>
> ./bootstrap
> ...
> ./configure

You must run

source .homebrew-build-env
./bootstrap
./configure --enable-system-site-packages

and then you can check its output (or the top-level config.log) for

scipy: using system package; SPKG will not
be installed

If you have that in, run make.

Else, post said config.log. Also check that you actually got scipy for
the python you're using,
by starting it and running "import scipy"


Dima
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/8b8f08c4-4470-4d53-98b7-ac044398e3c4n%40googlegroups.com.

John H Palmieri

unread,
Sep 24, 2024, 5:27:01 PM9/24/24
to sage-devel
For what it's worth, I just upgraded a machine to OS X 15.0, Xcode 16.0, and as many homebrew packages as Sage requested, and Sage built just fine. 

I'm seeing some doctest errors, presumably because of the new Xcode: lots of warning messages saying something like "warning: ld_classic is deprecated" (I deleted the log files while attempting to fix it, so I don't have the exact wording). It's perhaps time to get rid of the block in src/bin/sage-env that adds "-ld_classic" to LDFLAGS and then fix a few doctest warnings about duplicated libraries.

--
John

Anne Schilling

unread,
Sep 24, 2024, 5:41:42 PM9/24/24
to sage-devel
Thank you, Dima!
I am posting the config.log after running

source .homebrew-build-env
./bootstrap
./configure --enable-system-site-packages

This is what I get when running python3

MacBook-Pro-3:sage anne$ python3
Python 3.12.6 (main, Sep  6 2024, 19:03:47) [Clang 16.0.0 (clang-1600.0.26.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
>>>

Best wishes,

Anne
config.log

Dima Pasechnik

unread,
Sep 24, 2024, 6:19:07 PM9/24/24
to sage-...@googlegroups.com
From the log:

./configure --enable-system-site-packagesls (SIC!)


## Checking whether SageMath should install SPKG scipy... ##
## ------------------------------------------------------ ##
configure:90867: checking whether any of openblas is installed as or
will be installed as SPKG
configure:90877: result: no
configure:90881: checking if --enable-system-site-packages was used
configure:90939: result: no; skipping check
configure:90976: no suitable system package found for SPKG scipy

So please run

./configure --enable-system-site-packages

without a typo.



On Tue, Sep 24, 2024 at 10:41 PM Anne Schilling
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/fcaa0468-9562-4191-bac0-808e7fd7523fn%40googlegroups.com.

John H Palmieri

unread,
Sep 24, 2024, 6:22:06 PM9/24/24
to sage-devel
On Tuesday, September 24, 2024 at 3:19:07 PM UTC-7 dim...@gmail.com wrote:
From the log:

./configure --enable-system-site-packagesls (SIC!)


## Checking whether SageMath should install SPKG scipy... ##
## ------------------------------------------------------ ##
configure:90867: checking whether any of openblas is installed as or
will be installed as SPKG
configure:90877: result: no
configure:90881: checking if --enable-system-site-packages was used
configure:90939: result: no; skipping check
configure:90976: no suitable system package found for SPKG scipy

So please run

./configure --enable-system-site-packages

without a typo.

And it might not hurt to first run "make distclean" before doing everything else (in case you're not already doing this).

--
John


 

Anne Schilling

unread,
Sep 24, 2024, 6:32:24 PM9/24/24
to sage-devel
Ok, sorry, here is the result after

make distclean
source .homebrew-build-env
./bootstrap
./configure --enable-system-site-packages

Best wishes,

Anne
config.log

Kwankyu Lee

unread,
Sep 24, 2024, 7:57:42 PM9/24/24
to sage-devel
Though Sage officially supports python 3.9 to python 3.12, in my experience, python 3.9 is "too old" and python 3.12 is somewhat "too new", in the sense that packages on which sage depends on may not work well with them.

So I suggest to try

./configure --with-python=PYTHON3

where PYTHON3 is the path to your favorite python. On my system, I get the path by

$ which python3.12
/usr/local/bin/python3.12
$ which python3.11
/usr/local/bin/python3.11

I recommend to try first with python3.12 and then with python3.11. If you don't have them, you need to first have the python, perhaps by homebrew.

For example,

make distclean
./configure --with-python=/usr/local/bin/python3.12
make

Sorry that only trial-and-error solution is suggested.

Anne Schilling

unread,
Sep 24, 2024, 8:44:57 PM9/24/24
to sage-devel
Thank you, Dima and Kwankyu, for your suggestions.

I tried

make distclean
source .homebrew-build-env
./configure --with-python=/usr/local/bin/python3.10
make

Now kiwisolver-1.4.5 cannot be installed. See attached log file.

Best wishes,

Anne
kiwisolver-1.4.5.log

Dima Pasechnik

unread,
Sep 24, 2024, 8:45:06 PM9/24/24
to sage-...@googlegroups.com, Anne Schilling
On Tue, Sep 24, 2024 at 11:32 PM Anne Schilling
<anne1.s...@gmail.com> wrote:
>
> Ok, sorry, here is the result after
>
> make distclean
> source .homebrew-build-env
> ./bootstrap
> ./configure --enable-system-site-packages

Well, with scipy in Homebrew you need Python from Homebrew, the Python
into which site-packages it's installed.
Indeed, it appears to be fine:

configure:8842: checking for Python
configure:8845: result: /opt/homebrew/opt/pyt...@3.12/bin/python3.12

but then

configure:90899: checking for python package scipy ('scipy >=1.5')
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages/pkg_resources/__init__.py",
line 886, in require
needed = self.resolve(parse_requirements(requirements))
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages/pkg_resources/__init__.py",
line 772, in resolve

a wrong Python kicks in.
Probably you need "make distclean" indeed, sorry.
(I'd also check that you don't have some PYTHONPATH or something like
this is set)



> On Tuesday, September 24, 2024 at 3:22:06 PM UTC-7 John H Palmieri wrote:
>>
>> On Tuesday, September 24, 2024 at 3:19:07 PM UTC-7 dim...@gmail.com wrote:
>>
>> From the log:
>>
>> ./configure --enable-system-site-packagesls (SIC!)
>>
>>
>> ## Checking whether SageMath should install SPKG scipy... ##
>> ## ------------------------------------------------------ ##
>> configure:90867: checking whether any of openblas is installed as or
>> will be installed as SPKG
>> configure:90877: result: no
>> configure:90881: checking if --enable-system-site-packages was used
>> configure:90939: result: no; skipping check
>> configure:90976: no suitable system package found for SPKG scipy
>>
>> So please run
>>
>> ./configure --enable-system-site-packages
>>
>> without a typo.
>>
>>
>> And it might not hurt to first run "make distclean" before doing everything else (in case you're not already doing this).
>>
>> --
>> John
>>
>>
>>
>
> --
> 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 sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/51990537-59a2-4fce-9993-b322ada6c10fn%40googlegroups.com.

Kwankyu Lee

unread,
Sep 24, 2024, 10:30:55 PM9/24/24
to sage-devel
Is Xcode command line tools up to date? If not, do

xcode-select --install

Anne Schilling

unread,
Sep 24, 2024, 10:42:46 PM9/24/24
to sage-devel
It looks like Xcode command line tools are up to date:

MacBook-Pro-3:~ anne$ xcode-select --install
xcode-select: note: Command line tools are already installed. Use "Software Update" in System Settings or the softwareupdate command line interface to install updates

When I check on Software Update it says that everything is up to date.

Anne

Kwankyu Lee

unread,
Sep 24, 2024, 10:56:11 PM9/24/24
to sage-devel
I get

$ gcc --version
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: x86_64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

What do you get?

Anne Schilling

unread,
Sep 25, 2024, 12:00:52 AM9/25/24
to sage-devel
I get

MacBook-Pro-3:sage anne$ gcc --version
Apple clang version 16.0.0 (clang-1600.0.26.3)
Target: arm64-apple-darwin24.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Kwankyu Lee

unread,
Sep 25, 2024, 12:16:41 AM9/25/24
to sage-devel
According to your kiwisolver-1.4.5 log, 

[spkg-install] py/src/constraint.cpp:8:10: fatal error: 'algorithm' file not found [spkg-install] 8 | #include <algorithm> [spkg-install] | ^~~~~~~~~~~ [spkg-install] 1 error generated. [spkg-install] error: command '/usr/bin/gcc' failed with exit code 1

your gcc at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin is not used by Sage.

Kwankyu Lee

unread,
Sep 25, 2024, 12:23:08 AM9/25/24
to sage-devel
No, I am wrong... For me

$ which gcc
/usr/bin/gcc
$ gcc --version
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: x86_64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

I have no idea...


Kwankyu Lee

unread,
Sep 25, 2024, 12:48:26 AM9/25/24
to sage-devel
I would also try

sudo xcode-select --reset
Message has been deleted

Kwankyu Lee

unread,
Sep 25, 2024, 2:05:18 AM9/25/24
to sage-devel
In the lines of your log

[spkg-install] building 'kiwisolver._cext' extension
[spkg-install] creating build/temp.macosx-10.15-x86_64-cpython-310
[spkg-install] creating build/temp.macosx-10.15-x86_64-cpython-310/py
[spkg-install] creating build/temp.macosx-10.15-x86_64-cpython-310/py/src
[spkg-install] gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -g -O2 -I/private/var/folders/w7/5f55cjjn4s5g04gb_0bzld280000gn/T/build-env-dkf4yuy7/lib/python3.10/site-packages/cppy/include -I. -I/private/var/folders/w7/5f55cjjn4s5g04gb_0bzld280000gn/T/build-env-dkf4yuy7/include -I/usr/local/opt/pyt...@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c py/src/constraint.cpp -o build/temp.macosx-10.15-x86_64-cpython-310/py/src/constraint.o -std=c++11

[spkg-install] py/src/constraint.cpp:8:10: fatal error: 'algorithm' file not found
[spkg-install] 8 | #include <algorithm>
[spkg-install] | ^~~~~~~~~~~
[spkg-install] 1 error generated.

I have
 
[spkg-install] building 'kiwisolver._cext' extension
[spkg-install] creating build/temp.macosx-12.0-x86_64-cpython-312
[spkg-install] creating build/temp.macosx-12.0-x86_64-cpython-312/py
[spkg-install] creating build/temp.macosx-12.0-x86_64-cpython-312/py/src
[spkg-install] g++ -std=gnu++11 -std=gnu++11 -g -O2 -I/private/var/folders/td/fw1q9ljs311ggyph77rs53_40000gn/T/build-env-g7ez7hm7/lib/python3.12/site-packages/cppy/include -I. -I/private/var/folders/td/fw1q9ljs311ggyph77rs53_40000gn/T/build-env-g7ez7hm7/include -I/usr/local/opt/pyt...@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c py/src/constraint.cpp -o build/temp.macosx-12.0-x86_64-cpython-312/py/src/constraint.o -std=c++11


Anne Schilling

unread,
Sep 25, 2024, 2:05:26 AM9/25/24
to sage-devel
Thank you! I did that, but still got the error message.

I am currently recompiling with a different python installation.

Anne Schilling

unread,
Sep 25, 2024, 2:30:58 AM9/25/24
to sage-devel
I did

sudo xcode-select --reset

and also tried a different python installation. But I still get the kiwisolver error.
Message has been deleted

Kwankyu Lee

unread,
Sep 25, 2024, 3:20:08 AM9/25/24
to sage-devel
The error message in your log

[spkg-install] building 'kiwisolver._cext' extension
[spkg-install] creating build/temp.macosx-10.15-x86_64-cpython-310
[spkg-install] creating build/temp.macosx-10.15-x86_64-cpython-310/py
[spkg-install] creating build/temp.macosx-10.15-x86_64-cpython-310/py/src
[spkg-install] gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -g -O2 -I/private/var/folders/w7/5f55cjjn4s5g04gb_0bzld280000gn/T/build-env-dkf4yuy7/lib/python3.10/site-packages/cppy/include -I. -I/private/var/folders/w7/5f55cjjn4s5g04gb_0bzld280000gn/T/build-env-dkf4yuy7/include -I/usr/local/opt/pyt...@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c py/src/constraint.cpp -o build/temp.macosx-10.15-x86_64-cpython-310/py/src/constraint.o -std=c++11
[spkg-install] py/src/constraint.cpp:8:10: fatal error: 'algorithm' file not found
[spkg-install] 8 | #include <algorithm>
[spkg-install]                       | ^~~~~~~~~~~
[spkg-install] 1 error generated.
[spkg-install] error: command '/usr/bin/gcc' failed with exit code 1

clearly indicates that there is a problem with your C++ compiler which comes from Xcode. It fails to find the header file <algorithm> in the C++ standard library.

I have no other idea to try next... Rebooting your mac?

Dima Pasechnik

unread,
Sep 25, 2024, 4:00:48 AM9/25/24
to sage-...@googlegroups.com
these PATH entries look very suspect.
You don't want any of these Python things in your PATH.

PATH: /Library/Frameworks/Python.framework/Versions/3.7/bin/
PATH: /Library/Frameworks/Python.framework/Versions/2.7/bin/
PATH: /Library/Frameworks/Python.framework/Versions/Current/bin/
> --
> 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 sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/51990537-59a2-4fce-9993-b322ada6c10fn%40googlegroups.com.

Dima Pasechnik

unread,
Sep 25, 2024, 4:06:21 AM9/25/24
to sage-...@googlegroups.com
On Wed, Sep 25, 2024 at 12:57 AM Kwankyu Lee <ekwa...@gmail.com> wrote:
>
> Though Sage officially supports python 3.9 to python 3.12, in my experience, python 3.9 is "too old" and python 3.12 is somewhat "too new", in the sense that packages on which sage depends on may not work well with them.
>
> So I suggest to try
>
> ./configure --with-python=PYTHON3
>
> where PYTHON3 is the path to your favorite python. On my system, I get the path by
>
> $ which python3.12
> /usr/local/bin/python3.12
> $ which python3.11
> /usr/local/bin/python3.11
>
> I recommend to try first with python3.12 and then with python3.11. If you don't have them, you need to first have the python, perhaps by homebrew.

We're suggesting mutually exclusive things.
I suggest to avoid building scipy, but this require sticking with the
Python that comes from Homebrew and has the scipy installed.

You suggest to use some rather random Python.

>
> For example,
>
> make distclean
> ./configure --with-python=/usr/local/bin/python3.12
> make

M1 and other arm64 Homebrew puts things into /opt/, not into /usr/local.
This /usr/local/ looks like coming from an Intel mac.


>
> Sorry that only trial-and-error solution is suggested.
>
> --
> 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 sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/abd665be-4e60-44d9-ae0e-19d45ab78e0an%40googlegroups.com.

Anne Schilling

unread,
Sep 25, 2024, 11:45:08 AM9/25/24
to sage-devel
Hi Dima and Kwankyu,

Thank you so much for your help!

Dima, I have

export PATH=$PATH:/Users/anne/Library/

in my .bashrc file. But when I take out this line the command

./bootstrap

gives a failure

...
/bootstrap:85: installing src/doc/en/reference/spkg/*.rst
./bootstrap: installing /Users/anne/sage/sage/build/pkgs/sagemath_environment/src/pyproject.toml
./bootstrap: installing /Users/anne/sage/sage/build/pkgs/sagemath_environment/src/requirements-editable.txt
./bootstrap: installing /Users/anne/sage/sage/build/pkgs/sagemath_environment/src/requirements.txt
./bootstrap: installing /Users/anne/sage/sage/build/pkgs/sagemath_mcqd/src/pyproject.toml
./bootstrap: installing /Users/anne/sage/sage/build/pkgs/sagemath_mcqd/src/requirements.txt
./bootstrap: installing /Users/anne/sage/sage/build/pkgs/sagemath_meataxe/src/pyproject.toml
./bootstrap: installing /Users/anne/sage/sage/build/pkgs/sagemath_meataxe/src/requirements.txt
./bootstrap: installing /Users/anne/sage/sage/build/pkgs/sagemath_objects/src/pyproject.toml
./bootstrap: installing /Users/anne/sage/sage/build/pkgs/sagemath_objects/src/requirements-editable.txt
./bootstrap: installing /Users/anne/sage/sage/build/pkgs/sagemath_objects/src/requirements.txt
./bootstrap: installing /Users/anne/sage/sage/build/pkgs/sagemath_repl/src/pyproject.toml
./bootstrap: installing /Users/anne/sage/sage/build/pkgs/sagemath_repl/src/requirements-editable.txt
./bootstrap: installing /Users/anne/sage/sage/build/pkgs/sagemath_repl/src/requirements.txt
./bootstrap: installing /Users/anne/sage/sage/build/pkgs/sagemath_sirocco/src/pyproject.toml
./bootstrap: installing /Users/anne/sage/sage/build/pkgs/sagemath_sirocco/src/requirements.txt
./bootstrap: installing /Users/anne/sage/sage/build/pkgs/sagemath_tdlib/src/pyproject.toml
./bootstrap: installing /Users/anne/sage/sage/build/pkgs/sagemath_tdlib/src/requirements.txt
./bootstrap-conda:84: generate conda environment files
./bootstrap: line 143: aclocal: command not found
Bootstrap failed. Either install autotools; or run bootstrap with
the -d option to download the auto-generated files instead.

hint: On your system (homebrew), you can install the required system packages as follows:
      $ brew install autoconf automake libtool pkg-config
   
    Homebrew can issue suggestions regarding keg-only packages.
    The following command is to automatically apply these suggestions
    for packages relevant for Sage to make them available for the build.
    Run it once to apply the suggestions for the current session.
    Add it to your shell profile to apply them for all future sessions.
   
      $ source /Users/anne/sage/sage/.homebrew-build-env

Best wishes,

Anne

Dima Pasechnik

unread,
Sep 25, 2024, 12:33:00 PM9/25/24
to sage-...@googlegroups.com
Well, while in Rome, do as Romans do? :-)
From your log:

hint: On your system (homebrew), you can install the required system
packages as follows:

$ brew install autoconf automake libtool pkg-config

On Wed, Sep 25, 2024 at 4:45 PM Anne Schilling
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/da1e14fb-20a7-4e34-bc63-19016b03f588n%40googlegroups.com.

Anne Schilling

unread,
Sep 25, 2024, 3:17:59 PM9/25/24
to sage-devel
Hi Dima,

Thanks! I followed the instructions, then ran ./configure and make and got the following:

...
CNAME=\"\" -DNO_AFFINITY -I. -O2 -DMAX_STACK_ALLOC=2048 -Wall -DF_INTERFACE_GFORT -fPIC -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=10 -DMAX_PARALLEL_NUMBER=1 -DUSE_TLS -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.26\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME=_samax_k -DASMFNAME=_samax_k_ -DNAME=samax_k_ -DCNAME=samax_k -DCHAR_NAME=\"samax_k_\" -DCHAR_CNAME=\"samax_k\" -DNO_AFFINITY -I.. -UDOUBLE  -UCOMPLEX -UCOMPLEX -UDOUBLE  -DUSE_ABS -UUSE_MIN ../kernel/arm64/amax.S -o samax_k.o
[openblas-0.3.26] [spkg-install] make[6]: *** No rule to make target `../kernel/arm64/amin.S', needed by `samin_k.o'.  Stop.
[openblas-0.3.26] [spkg-install] make[5]: *** [libs] Error 1
[openblas-0.3.26] [spkg-install] ********************************************************************************
[openblas-0.3.26] [spkg-install] Error building openblas-0.3.26
[openblas-0.3.26] [spkg-install] ********************************************************************************
[openblas-0.3.26] ************************************************************************
[openblas-0.3.26] Error installing package openblas-0.3.26
[openblas-0.3.26] ************************************************************************
[openblas-0.3.26] Please email sage-devel (http://groups.google.com/group/sage-devel)
[openblas-0.3.26] explaining the problem and including the log files
[openblas-0.3.26]   /Users/anne/sage/sage/logs/pkgs/openblas-0.3.26.log
[openblas-0.3.26] and
[openblas-0.3.26]   /Users/anne/sage/sage/config.log
[openblas-0.3.26] Describe your computer, operating system, etc.
[openblas-0.3.26] If you want to try to fix the problem yourself, *don't* just cd to
[openblas-0.3.26] /Users/anne/sage/sage/local/var/tmp/sage/build/openblas-0.3.26 and type 'make' or whatever is appropriate.
[openblas-0.3.26] Instead, the following commands setup all environment variables
[openblas-0.3.26] correctly and load a subshell for you to debug the error:
[openblas-0.3.26]   (cd '/Users/anne/sage/sage/local/var/tmp/sage/build/openblas-0.3.26' && '/Users/anne/sage/sage/sage' --buildsh)
[openblas-0.3.26] When you are done debugging, you can type "exit" to leave the subshell.
[openblas-0.3.26] ************************************************************************
[openblas-0.3.26] real 4m31.252s user 3m3.040s sys 1m4.242s
make[4]: *** [openblas-SAGE_LOCAL-no-deps] Error 1
make[3]: *** [/Users/anne/sage/sage/local/var/lib/sage/installed/openblas-0.3.26] Error 2

make[2]: *** [all-start] Error 2
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all-start'):

* package:         m4ri-20200125
  last build time: Sep 25 12:11
  log file:        /Users/anne/sage/sage/logs/pkgs/m4ri-20200125.log
  build directory: /Users/anne/sage/sage/local/var/tmp/sage/build/m4ri-20200125

* package:         openblas-0.3.26
  last build time: Sep 25 12:15
  log file:        /Users/anne/sage/sage/logs/pkgs/openblas-0.3.26.log
  build directory: /Users/anne/sage/sage/local/var/tmp/sage/build/openblas-0.3.26


It is safe to delete any log files and build directories, but they
contain information that is helpful for debugging build problems.
WARNING: If you now run 'make' again, the build directory of the
same version of the package will, by default, be deleted. Set the
environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.

real 4m31.928s user 9m1.974s sys 2m44.265s

make[1]: *** [all-start] Error 1
make: *** [all] Error 2

Best wishes,

Anne
m4ri-20200125.log

Dima Pasechnik

unread,
Sep 25, 2024, 4:41:01 PM9/25/24
to sage-...@googlegroups.com
On Wed, Sep 25, 2024 at 8:18 PM Anne Schilling
<anne1.s...@gmail.com> wrote:
> Thanks! I followed the instructions, then ran ./configure and make and got the following:

Do you have openblas installed via brew?
This would be probably the easiest - otherwise we might need an
upgrade of openblas
(ours it probably too old for macOS 15.0)
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/fdbca53b-c231-496f-a2d5-36d5062a33ecn%40googlegroups.com.

Anne Schilling

unread,
Sep 25, 2024, 7:49:24 PM9/25/24
to sage-devel
Hi Dima,

Yes, I have openblas installed via brew and just reinstalled it again and get the same error message.

Best wishes,

Anne

Kwankyu Lee

unread,
Sep 25, 2024, 11:05:10 PM9/25/24
to sage-devel
On Thursday, September 26, 2024 at 8:49:24 AM UTC+9 anne1.s...@gmail.com wrote:
Hi Dima,

Yes, I have openblas installed via brew and just reinstalled it again and get the same error message.

If you get the same error message, then it means that Sage is not using hombrew openblas. What does "openblas" part of ./configure log messages say?
 

Anne Schilling

unread,
Sep 26, 2024, 12:41:01 AM9/26/24
to sage-devel
Here is what it says:

## --------------------------------------------------------- ##
## Checking whether SageMath should install SPKG openblas... ##
## --------------------------------------------------------- ##
configure:18813: checking whether any of gfortran is installed as or will be installed as SPKG
configure:18823: result: no
configure:18837: checking for openblas >= 0.2.20 openblas < 0.3.99
configure:18844: $PKG_CONFIG --exists --print-errors "openblas >= 0.2.20 openblas < 0.3.99"
configure:18847: $? = 0
configure:18861: $PKG_CONFIG --exists --print-errors "openblas >= 0.2.20 openblas < 0.3.99"
configure:18864: $? = 0
configure:19860: result: yes
configure:19869: $PKG_CONFIG --exists --print-errors "openblas"
configure:19872: $? = 0
configure:19892: checking for cblas_dgemm
configure:19892: g++ -std=gnu++11 -std=gnu++11 -o conftest    conftest.cpp -L/usr/local/Cellar/openblas/0.3.28/lib -lopenblas -lbz2 -lm  >&5
ld: warning: ignoring file '/usr/local/Cellar/openblas/0.3.28/lib/libopenblasp-r0.3.28.dylib': found architecture 'x86_64', required architecture 'arm64'
Undefined symbols for architecture arm64:
  "_cblas_dgemm", referenced from:
      _main in conftest-52566f.o
ld: symbol(s) not found for architecture arm64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
configure:19892: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Sage"
| #define PACKAGE_TARNAME "sage"
| #define PACKAGE_VERSION "10.4"
| #define PACKAGE_STRING "Sage 10.4"
| #define PACKAGE_BUGREPORT "sage-...@googlegroups.com"
| #define PACKAGE_URL ""
| #define PACKAGE "sage"
| #define VERSION "10.4"
| #define HAVE_STDIO_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_UNISTD_H 1
| #define STDC_HEADERS 1
| #define HAVE_LIBM 1
| #define HAVE_CXX11 1
| #define HAVE_BOOST /**/
| /* end confdefs.h.  */
| /* Define cblas_dgemm to an innocuous variant, in case <limits.h> declares cblas_dgemm.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define cblas_dgemm innocuous_cblas_dgemm
|
| /* System header to define __stub macros and hopefully few prototypes,
|    which can conflict with char cblas_dgemm (void); below.  */
|
| #include <limits.h>
| #undef cblas_dgemm
|
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char cblas_dgemm (void);
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined __stub_cblas_dgemm || defined __stub___cblas_dgemm
| choke me
| #endif
|
| int
| main (void)
| {
| return cblas_dgemm ();
|   ;
|   return 0;
| }
configure:19892: result: no
configure:19900: checking for cblas
configure:19907: $PKG_CONFIG --exists --print-errors "cblas"
Package cblas was not found in the pkg-config search path.
Perhaps you should add the directory containing `cblas.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cblas' found
configure:19910: $? = 1
configure:19924: $PKG_CONFIG --exists --print-errors "cblas"
Package cblas was not found in the pkg-config search path.
Perhaps you should add the directory containing `cblas.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cblas' found
configure:19927: $? = 1
configure:19941: result: no
No package 'cblas' found
configure:19973: checking for dgeqrf
configure:19973: g++ -std=gnu++11 -std=gnu++11 -o conftest    conftest.cpp -L/usr/local/Cellar/openblas/0.3.28/lib -lopenblas -lbz2 -lm  >&5
ld: warning: ignoring file '/usr/local/Cellar/openblas/0.3.28/lib/libopenblasp-r0.3.28.dylib': found architecture 'x86_64', required architecture 'arm64'
Undefined symbols for architecture arm64:
  "_dgeqrf", referenced from:
      _main in conftest-ad45a9.o
ld: symbol(s) not found for architecture arm64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
configure:19973: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Sage"
| #define PACKAGE_TARNAME "sage"
| #define PACKAGE_VERSION "10.4"
| #define PACKAGE_STRING "Sage 10.4"
| #define PACKAGE_BUGREPORT "sage-...@googlegroups.com"
| #define PACKAGE_URL ""
| #define PACKAGE "sage"
| #define VERSION "10.4"
| #define HAVE_STDIO_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_UNISTD_H 1
| #define STDC_HEADERS 1
| #define HAVE_LIBM 1
| #define HAVE_CXX11 1
| #define HAVE_BOOST /**/
| /* end confdefs.h.  */
| /* Define dgeqrf to an innocuous variant, in case <limits.h> declares dgeqrf.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define dgeqrf innocuous_dgeqrf
|
| /* System header to define __stub macros and hopefully few prototypes,
|    which can conflict with char dgeqrf (void); below.  */
|
| #include <limits.h>
| #undef dgeqrf
|
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char dgeqrf (void);
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined __stub_dgeqrf || defined __stub___dgeqrf
| choke me
| #endif
|
| int
| main (void)
| {
| return dgeqrf ();
|   ;
|   return 0;
| }
configure:19973: result: no
configure:19980: checking for dgeqrf_
configure:19980: g++ -std=gnu++11 -std=gnu++11 -o conftest    conftest.cpp -L/usr/local/Cellar/openblas/0.3.28/lib -lopenblas -lbz2 -lm  >&5
ld: warning: ignoring file '/usr/local/Cellar/openblas/0.3.28/lib/libopenblasp-r0.3.28.dylib': found architecture 'x86_64', required architecture 'arm64'
Undefined symbols for architecture arm64:
  "_dgeqrf_", referenced from:
      _main in conftest-5fb3a3.o
ld: symbol(s) not found for architecture arm64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
configure:19980: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Sage"
| #define PACKAGE_TARNAME "sage"
| #define PACKAGE_VERSION "10.4"
| #define PACKAGE_STRING "Sage 10.4"
| #define PACKAGE_BUGREPORT "sage-...@googlegroups.com"
| #define PACKAGE_URL ""
| #define PACKAGE "sage"
| #define VERSION "10.4"
| #define HAVE_STDIO_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_UNISTD_H 1
| #define STDC_HEADERS 1
| #define HAVE_LIBM 1
| #define HAVE_CXX11 1
| #define HAVE_BOOST /**/
| /* end confdefs.h.  */
| /* Define dgeqrf_ to an innocuous variant, in case <limits.h> declares dgeqrf_.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define dgeqrf_ innocuous_dgeqrf_
|
| /* System header to define __stub macros and hopefully few prototypes,
|    which can conflict with char dgeqrf_ (void); below.  */
|
| #include <limits.h>
| #undef dgeqrf_
|
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char dgeqrf_ (void);
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined __stub_dgeqrf_ || defined __stub___dgeqrf_
| choke me
| #endif
|
| int
| main (void)
| {
| return dgeqrf_ ();
|   ;
|   return 0;
| }
configure:19980: result: no
configure:19987: checking for DGEQRF
configure:19987: g++ -std=gnu++11 -std=gnu++11 -o conftest    conftest.cpp -L/usr/local/Cellar/openblas/0.3.28/lib -lopenblas -lbz2 -lm  >&5
ld: warning: ignoring file '/usr/local/Cellar/openblas/0.3.28/lib/libopenblasp-r0.3.28.dylib': found architecture 'x86_64', required architecture 'arm64'
Undefined symbols for architecture arm64:
  "_DGEQRF", referenced from:
      _main in conftest-e93135.o
ld: symbol(s) not found for architecture arm64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
configure:19987: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Sage"
| #define PACKAGE_TARNAME "sage"
| #define PACKAGE_VERSION "10.4"
| #define PACKAGE_STRING "Sage 10.4"
| #define PACKAGE_BUGREPORT "sage-...@googlegroups.com"
| #define PACKAGE_URL ""
| #define PACKAGE "sage"
| #define VERSION "10.4"
| #define HAVE_STDIO_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_UNISTD_H 1
| #define STDC_HEADERS 1
| #define HAVE_LIBM 1
| #define HAVE_CXX11 1
| #define HAVE_BOOST /**/
| /* end confdefs.h.  */
| /* Define DGEQRF to an innocuous variant, in case <limits.h> declares DGEQRF.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define DGEQRF innocuous_DGEQRF
|
| /* System header to define __stub macros and hopefully few prototypes,
|    which can conflict with char DGEQRF (void); below.  */
|
| #include <limits.h>
| #undef DGEQRF
|
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char DGEQRF (void);
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined __stub_DGEQRF || defined __stub___DGEQRF
| choke me
| #endif
|
| int
| main (void)
| {
| return DGEQRF ();
|   ;
|   return 0;
| }
configure:19987: result: no
configure:19994: checking for DGEQRF_
configure:19994: g++ -std=gnu++11 -std=gnu++11 -o conftest    conftest.cpp -L/usr/local/Cellar/openblas/0.3.28/lib -lopenblas -lbz2 -lm  >&5
ld: warning: ignoring file '/usr/local/Cellar/openblas/0.3.28/lib/libopenblasp-r0.3.28.dylib': found architecture 'x86_64', required architecture 'arm64'
Undefined symbols for architecture arm64:
  "_DGEQRF_", referenced from:
      _main in conftest-c3768d.o
ld: symbol(s) not found for architecture arm64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
configure:19994: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Sage"
| #define PACKAGE_TARNAME "sage"
| #define PACKAGE_VERSION "10.4"
| #define PACKAGE_STRING "Sage 10.4"
| #define PACKAGE_BUGREPORT "sage-...@googlegroups.com"
| #define PACKAGE_URL ""
| #define PACKAGE "sage"
| #define VERSION "10.4"
| #define HAVE_STDIO_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_UNISTD_H 1
| #define STDC_HEADERS 1
| #define HAVE_LIBM 1
| #define HAVE_CXX11 1
| #define HAVE_BOOST /**/
| /* end confdefs.h.  */
| /* Define DGEQRF_ to an innocuous variant, in case <limits.h> declares DGEQRF_.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define DGEQRF_ innocuous_DGEQRF_
|
| /* System header to define __stub macros and hopefully few prototypes,
|    which can conflict with char DGEQRF_ (void); below.  */
|
| #include <limits.h>
| #undef DGEQRF_
|
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char DGEQRF_ (void);
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined __stub_DGEQRF_ || defined __stub___DGEQRF_
| choke me
| #endif
|
| int
| main (void)
| {
| return DGEQRF_ ();
|   ;
|   return 0;
| }
configure:19994: result: no
configure:20009: checking for lapack
configure:20016: $PKG_CONFIG --exists --print-errors "lapack"
Package lapack was not found in the pkg-config search path.
Perhaps you should add the directory containing `lapack.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lapack' found
configure:20019: $? = 1
configure:20033: $PKG_CONFIG --exists --print-errors "lapack"
Package lapack was not found in the pkg-config search path.
Perhaps you should add the directory containing `lapack.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lapack' found
configure:20036: $? = 1
configure:20050: result: no
No package 'lapack' found
configure:20190: no suitable system package found for SPKG openblas

Kwankyu Lee

unread,
Sep 26, 2024, 1:52:29 AM9/26/24
to sage-devel
This 

ld: warning: ignoring file '/usr/local/Cellar/openblas/0.3.28/lib/libopenblasp-r0.3.28.dylib': found architecture 'x86_64', required architecture 'arm64'

is significant. Your hombrew openblas is not compiled for arm64. This is strange. Try

file /usr/local/Cellar/openblas/0.3.28/lib/libopenblasp-r0.3.28.dylib

to confirm. 

There is a hombrew command that compiles openblas from source (for your platform). You may try

brew install openblas --build-from-source

(note that I got this information from chatgpt :-) 




Dima Pasechnik

unread,
Sep 26, 2024, 4:10:39 AM9/26/24
to sage-devel
Hi Anne,
sorry for this mess.
This config.log (which you sent only to me) looks fine, openblas is detected. What's not fine is
PKG_CONFIG_PATH value, which is over 4K characters long.
That's insanely long, with lots and lots of repeated entries.
It's actually not the only environment variable which grows with each sourcing.
There are also LIBRARY_PATH, CPATH, PATH, etc (you can read
.homebrew-build-environment for a complete list)
:-(
It could be that's they are so long that it breaks things.

This came from repeated sourcing of .homebrew-build-env
Our instructions say that "source .homebrew-build-env" should only be
run once in given terminal session.
That's obviously not well-aligned with repeatedly installing more and
more homebrew packages, after which round
values of PKG_CONFIG_PATH might need to be updated, and needs another
round of "source .homebrew-build-env".

Indeed, PKG_CONFIG_PATH grows after each sourcing,
as you can check by repeatedly running

   source .homebrew-build-env
   echo $PKG_CONFIG_PATH

I'll open a GitHub issue to deal with it.
As a workaround, could you please open a new ternimal, run there
 "source .homebrew-build-env" followed by "./configure", and check
that  PKG_CONFIG_PATH
is of reasonable length (by running "echo $PKG_CONFIG_PATH"),
something like I see on our M1 machine:
PKG_CONFIG_PATH='/opt/homebrew/opt/sqlite/lib/pkgconfig:/opt/homebrew/opt/readline/lib/pkgconfig:/opt/homebrew/opt/openssl/lib/pkgconfig:/opt/homebrew/opt/openblas/lib/pkgconfig:/opt/homebrew/lib/pkgconfig:'

Then run "make", if it's OK.

HTH
Dima

Dima Pasechnik

unread,
Sep 26, 2024, 1:38:32 PM9/26/24
to sage-devel
I've opened https://github.com/sagemath/sage/issues/38716 to deal with this issue.

Anne Schilling

unread,
Sep 26, 2024, 2:58:07 PM9/26/24
to sage-devel
Hi Dima,

I appreciate all your help!

In a new terminal, I did

source .homebrew-build-env
echo $PKG_CONFIG_PATH
/usr/local/opt/sqlite/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/openblas/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/opt/sqlite/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/openblas/lib/pkgconfig:/usr/local/lib/pkgconfig:

./configure
make

...
[openblas-0.3.26]   /Users/anne/sage/sage/config.log
[openblas-0.3.26] Describe your computer, operating system, etc.
[openblas-0.3.26] If you want to try to fix the problem yourself, *don't* just cd to
[openblas-0.3.26] /Users/anne/sage/sage/local/var/tmp/sage/build/openblas-0.3.26 and type 'make' or whatever is appropriate.
[openblas-0.3.26] Instead, the following commands setup all environment variables
[openblas-0.3.26] correctly and load a subshell for you to debug the error:
[openblas-0.3.26]   (cd '/Users/anne/sage/sage/local/var/tmp/sage/build/openblas-0.3.26' && '/Users/anne/sage/sage/sage' --buildsh)
[openblas-0.3.26] When you are done debugging, you can type "exit" to leave the subshell.
[openblas-0.3.26] ************************************************************************
[openblas-0.3.26] real 4m38.340s user 3m6.887s sys 1m6.485s

make[4]: *** [openblas-SAGE_LOCAL-no-deps] Error 1
make[3]: *** [/Users/anne/sage/sage/local/var/lib/sage/installed/openblas-0.3.26] Error 2
make[2]: *** [all-start] Error 2
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all-start'):

* package:         m4ri-20200125
  last build time: Sep 26 11:51

  log file:        /Users/anne/sage/sage/logs/pkgs/m4ri-20200125.log
  build directory: /Users/anne/sage/sage/local/var/tmp/sage/build/m4ri-20200125

* package:         openblas-0.3.26
  last build time: Sep 26 11:55

  log file:        /Users/anne/sage/sage/logs/pkgs/openblas-0.3.26.log
  build directory: /Users/anne/sage/sage/local/var/tmp/sage/build/openblas-0.3.26

It is safe to delete any log files and build directories, but they
contain information that is helpful for debugging build problems.
WARNING: If you now run 'make' again, the build directory of the
same version of the package will, by default, be deleted. Set the
environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.

real 8m1.762s user 12m32.628s sys 5m29.871s

make[1]: *** [all-start] Error 1
make: *** [all] Error 2

Best wishes,

Anne
openblas-0.3.26.log

Dima Pasechnik

unread,
Sep 26, 2024, 4:01:31 PM9/26/24
to sage-...@googlegroups.com, Anne Schilling
Hi Anne,

I am sorry, why all of a sudden you have Homebrew installed in
/usr/local, even though in the previous iteration it was in /opt ?
Do you have a wrong arch copy of Homebrew on your M1 machine?
(and if so, why?)

Or is it a different, x86_64, machine?

Assuming you're on an arm64, your brew should be in /opt/, not on
/usr/local, too.
Wrong order of things in PATH?
Please make sure that /opt things come before /usr/local things in your path,
and re-run the whole things.

Best
Dima


On Thu, Sep 26, 2024 at 7:58 PM Anne Schilling
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/5668cf7f-387f-40e1-a87d-93ba0a910a7dn%40googlegroups.com.

John H Palmieri

unread,
Sep 26, 2024, 4:11:03 PM9/26/24
to sage-devel
If you migrated from an x86 Mac and as a result copied some of the old homebrew files in /usr/local, then the files now in /usr/local on the new Mac could be causing problems. As Dima noted, the homebrew installation on an Apple Silicon machine should be in /opt/. I suggested trying to get rid of whatever is in /usr/local. (Carefully, of course.)

Regards,
  John

Anne Schilling

unread,
Sep 26, 2024, 5:30:12 PM9/26/24
to sage-devel
Hi Dima and John,

Yes, this seems to be one of the problems I am having. I did indeed migrate from another Mac, so it probably copied over the homebrew in /usr/local

MacBook-Pro-3:lib anne$ which brew
/usr/local/bin/brew

Now I need to figure out how to get rid of it.

Best wishes,

Anne

Dima Pasechnik

unread,
Sep 26, 2024, 5:52:48 PM9/26/24
to sage-...@googlegroups.com
On Thu, Sep 26, 2024 at 10:30 PM Anne Schilling
<anne1.s...@gmail.com> wrote:
>
> Hi Dima and John,
>
> Yes, this seems to be one of the problems I am having. I did indeed migrate from another Mac, so it probably copied over the homebrew in /usr/local
>
> MacBook-Pro-3:lib anne$ which brew
> /usr/local/bin/brew
>
> Now I need to figure out how to get rid of it.

https://docs.brew.sh/FAQ#how-do-i-uninstall-homebrew

I presume if you run this while brew is /usr/local/bin/brew it will
uninstall everything related to it, and leave the Homebrew in /opt
untouched.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/00194b63-1aec-4495-a924-3bd213329069n%40googlegroups.com.

Dima Pasechnik

unread,
Sep 26, 2024, 5:52:48 PM9/26/24
to sage-devel
---------- Forwarded message ---------
From: Dima Pasechnik <dim...@gmail.com>
Date: Thu, Sep 26, 2024 at 9:17 PM
Subject: Re: [sage-devel] trouble installing sage
To: <an...@math.ucdavis.edu>


Hi Anna,

Oh no...
Well, try

unset LDFLAGS
unset CPPFLAGS
unset PKG_CONFIG_PATH
brew uninstall openblas
brew install openblas

but I really don't know what kind of collateral damage "brew reinstall
openblas --build-from-source"
has done.

It might be that you'd have to purge Homebrew
(see https://github.com/homebrew/install#uninstall-homebrew)
and reinstall it from scratch.


It's still puzzling that it went into /usr/local, and not into /opt ?
Do you have 2 installations of Homebrew, one in /opt, and another in /usr/local?
The 2nd one must go...


HTH
Dima




On Thu, Sep 26, 2024 at 8:44 PM Anne Schilling <an...@math.ucdavis.edu> wrote:

> No, this is still the same machine, but somehow last night I also followed Kyukwan's suggestion and did

>
> brew reinstall openblas --build-from-source
>
> And then following your advice of doing as Romans do in Rome was asked to do
>
> export LDFLAGS="-L/usr/local/opt/openblas/lib"
> export CPPFLAGS="-I/usr/local/opt/openblas/include"
> export PKG_CONFIG_PATH="/usr/local/opt/openblas/lib/pkgconfig"
>
> How do I undo this?
>
> Best,
>
> Anne

John H Palmieri

unread,
Sep 26, 2024, 5:56:54 PM9/26/24
to sage-devel
Before deleting anything, you could try expunging all mention of /usr/local from your PATH and other variables wherever they're set (.profile or .bashrc or .zshrc or whatever), and start a clean Terminal session with the new settings. At this point you may need to install homebrew (if it thinks it's only installed in /usr/local). Then source .homebrew-build-env, check PATH and other variables again, run ./configure and install whatever packages Sage recommends. If this all happens to work, then you can start going through /usr/local to see if there is anything there that didn't come from homebrew that you want to keep.

Dima Pasechnik

unread,
Sep 26, 2024, 6:27:50 PM9/26/24
to sage-...@googlegroups.com, John H Palmieri, Anne Schilling
On Thu, Sep 26, 2024 at 10:56 PM John H Palmieri <jhpalm...@gmail.com> wrote:
>
> Before deleting anything, you could try expunging all mention of /usr/local from your PATH and other variables wherever they're set (.profile or .bashrc or .zshrc or whatever), and start a clean Terminal session with the new settings. At this point you may need to install homebrew (if it thinks it's only installed in /usr/local). Then source .homebrew-build-env, check PATH and other variables again, run ./configure and install whatever packages Sage recommends. If this all happens to work, then you can start going through /usr/local to see if there is anything there that didn't come from homebrew that you want to keep.

John, why that complicated? I think Anne's machine has 2 copies of
Homebrew. The link I posted
(https://github.com/homebrew/install#uninstall-homebrew) has this
advice:

If you want to to uninstall Homebrew from a specific prefix (e.g. when
migrating from Intel to Apple Silicon processors), download the
uninstall script and run it with --path:

curl -fsSLO https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh
/bin/bash uninstall.sh --path /usr/local
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/66d8a466-4df6-4a63-9162-5d14ff98c167n%40googlegroups.com.

John H Palmieri

unread,
Sep 26, 2024, 6:31:02 PM9/26/24
to sage-devel
On Thursday, September 26, 2024 at 3:27:50 PM UTC-7 dim...@gmail.com wrote:
On Thu, Sep 26, 2024 at 10:56 PM John H Palmieri <jhpalm...@gmail.com> wrote:
>
> Before deleting anything, you could try expunging all mention of /usr/local from your PATH and other variables wherever they're set (.profile or .bashrc or .zshrc or whatever), and start a clean Terminal session with the new settings. At this point you may need to install homebrew (if it thinks it's only installed in /usr/local). Then source .homebrew-build-env, check PATH and other variables again, run ./configure and install whatever packages Sage recommends. If this all happens to work, then you can start going through /usr/local to see if there is anything there that didn't come from homebrew that you want to keep.

John, why that complicated?

Partly it's my personality: I tend to be cautious about deleting things. Second, there may be other things in /usr/local that didn't come from homebrew and that may be interfering with Sage installation. (TeXLive might be installed there, as an example of something benign — no impact on Sage installation. Who knows what else might have been migrated there, though?) Probably you're right and your suggestion will work fine and be simpler, though.

Anne Schilling

unread,
Sep 26, 2024, 8:05:49 PM9/26/24
to sage-devel
A miracle!!! Sage has installed on MacOS 15.0. I uninstalled homebrew from /usr/local.

Thank you for being so patient with me!

Anne

Kwankyu Lee

unread,
Sep 26, 2024, 8:37:32 PM9/26/24
to sage-devel
On Friday, September 27, 2024 at 9:05:49 AM UTC+9 anne1.s...@gmail.com wrote:
A miracle!!! Sage has installed on MacOS 15.0. I uninstalled homebrew from /usr/local.

Congratulations! 

So it was just another instance of homebrew in /usr/local/ that caused all troubles. 

I will appreciate if you leave comments to https://github.com/sagemath/sage/pull/38659 if there was any inconvenience following the instructions there.

Kwankyu.

Anne Schilling

unread,
Sep 27, 2024, 12:41:42 AM9/27/24
to sage-devel
Thank you, I left a comment.

Anne

John Cremona

unread,
Sep 27, 2024, 4:19:50 AM9/27/24
to sage-devel
I usually ignore any posts about trouble with installing Sage on Macs, I just pat my trusty linux laptop and move on.  But for some reason I have been reading the saga of Anne's recent experience (and happy ending!) and I think it is an example of how well sage-devel / sage-support can work:   enormous patience and knowlegable experience from Dima and John P and others, also patience from Anne who did not give up, politeness and goodwill all round.

It's good to see something positive on this list, so thanks to all who helped Anne. (And who have in the past helped me.)

John

Reply all
Reply to author
Forward
0 new messages