failure to make on M1 MacBook 2020

176 views
Skip to first unread message

Jackson Walters

unread,
Oct 18, 2024, 3:26:59 PM10/18/24
to sage-s...@googlegroups.com
Hi all,

I am making some changes to `symmetric_group_representations.py`, and it would be useful to test them locally before committing them to a PR. I haven't found it necessary to build Sage from source, but I'd like to now. I am following the instructions in "Instructions to Build from Source" in the README, installed the necessary prerequisites, and ran `./configure` followed by `make`.

Here is the traceback of the errors I'm getting:

[pip-24.0] Using cached file /Users/jacksonwalters/Documents/GitHub/sage/upstream/pip-24.0-py3-none-any.whl
[pip-24.0] Setting up build directory /Users/jacksonwalters/Documents/GitHub/sage/local/var/lib/sage/venv-python3.12.4/var/tmp/sage/build/pip-24.0
[pip-24.0] No stamp file for package 'pip' in /Users/jacksonwalters/Documents/GitHub/sage/local/var/lib/sage/venv-python3.12.4/var/lib/sage/installed
[pip-24.0] No spkg-legacy-uninstall script; nothing to do
[pip-24.0] [spkg-install] Staged wheel file, staged /Users/jacksonwalters/Documents/GitHub/sage/local/var/lib/sage/venv-python3.12.4/var/lib/sage/scripts/pip/spkg-requirements.txt
[pip-24.0] Moving package files from temporary location /Users/jacksonwalters/Documents/GitHub/sage/local/var/lib/sage/venv-python3.12.4/var/tmp/sage/build/pip-24.0/inst to /Users/jacksonwalters/Documents/GitHub/sage/local/var/lib/sage/venv-python3.12.4
[pip-24.0] [spkg-pipinst] Traceback (most recent call last):
[pip-24.0] [spkg-pipinst]   File "/Users/jacksonwalters/Documents/GitHub/sage/build/bin/sage-flock", line 23, in <module>
[pip-24.0] [spkg-pipinst]     from sage_bootstrap.flock import run
[pip-24.0] [spkg-pipinst]   File "/Users/jacksonwalters/Documents/GitHub/sage/build/bin/../sage_bootstrap/flock.py", line 15, in <module>
[pip-24.0] [spkg-pipinst]     import pipes
[pip-24.0] [spkg-pipinst] ModuleNotFoundError: No module named 'pipes'
[pip-24.0] [spkg-pipinst] Traceback (most recent call last):
[pip-24.0] [spkg-pipinst]   File "/Users/jacksonwalters/Documents/GitHub/sage/build/bin/sage-flock", line 23, in <module>
[pip-24.0] [spkg-pipinst]     from sage_bootstrap.flock import run
[pip-24.0] [spkg-pipinst]   File "/Users/jacksonwalters/Documents/GitHub/sage/build/bin/../sage_bootstrap/flock.py", line 15, in <module>
[pip-24.0] [spkg-pipinst]     import pipes
[pip-24.0] [spkg-pipinst] ModuleNotFoundError: No module named 'pipes'
[pip-24.0] [spkg-pipinst] Warning: installing with "python3 -m pip install --verbose --no-index --find-links=/Users/jacksonwalters/Documents/GitHub/sage/local/var/lib/sage/venv-python3.12.4/var/lib/sage/wheels --disable-pip-version-check --isolated --no-cache-dir" failed. Retrying, adding "--no-deps --ignore-installed --ignore-requires-python"
[pip-24.0] [spkg-pipinst] Traceback (most recent call last):
[pip-24.0] [spkg-pipinst]   File "/Users/jacksonwalters/Documents/GitHub/sage/build/bin/sage-flock", line 23, in <module>
[pip-24.0] [spkg-pipinst]     from sage_bootstrap.flock import run
[pip-24.0] [spkg-pipinst]   File "/Users/jacksonwalters/Documents/GitHub/sage/build/bin/../sage_bootstrap/flock.py", line 15, in <module>
[pip-24.0] [spkg-pipinst]     import pipes
[pip-24.0] [spkg-pipinst] ModuleNotFoundError: No module named 'pipes'
[pip-24.0] [spkg-pipinst] Error: installing with pip  failed
[pip-24.0] [spkg-pipinst] ********************************************************************************
[pip-24.0] [spkg-pipinst] Error installing pip
[pip-24.0] [spkg-pipinst] ********************************************************************************
[pip-24.0] ************************************************************************
[pip-24.0] Error running the pipinst script for pip-24.0.
[pip-24.0] ************************************************************************
[pip-24.0] Please email sage-devel (http://groups.google.com/group/sage-devel)
[pip-24.0] explaining the problem and including the log files
[pip-24.0]   /Users/jacksonwalters/Documents/GitHub/sage/logs/pkgs/pip-24.0.log
[pip-24.0] and
[pip-24.0]   /Users/jacksonwalters/Documents/GitHub/sage/config.log
[pip-24.0] Describe your computer, operating system, etc.
[pip-24.0] ************************************************************************
make[4]: *** [pip-SAGE_VENV-no-deps] Error 1
make[3]: *** [/Users/jacksonwalters/Documents/GitHub/sage/local/var/lib/sage/venv-python3.12.4/var/lib/sage/installed/pip-24.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:         m4ri-20200125
  last build time: Oct 17 15:01
  log file:        /Users/jacksonwalters/Documents/GitHub/sage/logs/pkgs/m4ri-20200125.log
  build directory: /Users/jacksonwalters/Documents/GitHub/sage/local/var/tmp/sage/build/m4ri-20200125
* package:         pip-24.0
  last build time: Oct 18 15:06
  log file:        /Users/jacksonwalters/Documents/GitHub/sage/logs/pkgs/pip-24.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 2m41.391s user 1m45.773s sys 0m34.303s
make[1]: *** [all-start] Error 1
make: *** [all] Error 2

Any help would be greatly appreciated. Thank you!

Jackson


Dima Pasechnik

unread,
Oct 18, 2024, 3:43:14 PM10/18/24
to sage-s...@googlegroups.com, Jackson Walters
Hi,
could you post the top-level config.log
and logs/install.log ?

Thanks.

Jackson Walters

unread,
Oct 18, 2024, 3:51:51 PM10/18/24
to sage-support
Yes, attached.
config.log
install.log
pip-24.0.log

Dima Pasechnik

unread,
Oct 18, 2024, 4:48:51 PM10/18/24
to sage-s...@googlegroups.com, Jackson Walters
The errors you have might be due to the use of pyenv (perhaps it's not
activated, but still it might be a problem). Specifically, in your
PATH you have

PATH: /opt/homebrew/Cellar/pyenv-virtualenv/1.2.4/shims/
PATH: /Users/jacksonwalters/.pyenv/shims/
PATH: /Users/jacksonwalters/.pyenv/bin/
PATH: /opt/homebrew/bin/
PATH: /opt/homebrew/sbin/
PATH: /usr/local/bin/
PATH: /System/Cryptexes/App/usr/bin/

Please remove the first 3 entries from it, and try again. Please also
make sure you sourced
.homebrew-build-env before running ./configure, as explained in
macOS-specific docs.

By the way, you can install more Homebrew packages to be used by Sage,
as you can see at the bottom of config.log (concrete lists of packages
are given there)
> --
> 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/df9de397-ca8d-4feb-b28f-92bcb5feb780n%40googlegroups.com.

Jackson Walters

unread,
Oct 18, 2024, 8:03:19 PM10/18/24
to sage-support
I removed those three from my path and I'm still getting the same error:

% echo $PATH

/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin


I did source .homebrew-build-env before running ./configure. I installed the packages listed in the instructions.

Dima Pasechnik

unread,
Oct 19, 2024, 4:01:30 AM10/19/24
to sage-s...@googlegroups.com
According to the config.log, you are trying to install Sage 10.5.beta0
- which might just not work.
(beta0 are often broken, etc). Anyway, for the development purposes
you'd normally use one of the latest betas.
The latest is 10.5.beta7. Please try it instead.
If you already have changes in your source tree, these should be
rebased over (or merged in) the latest beta branch.
Sorry, I should have spotted it earlier.

Dima
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/39f7e6b6-674d-470c-9c92-6f51ad8457edn%40googlegroups.com.

Jackson Walters

unread,
Oct 19, 2024, 8:58:33 PM10/19/24
to sage-s...@googlegroups.com
Yes, it is 10.5.beta0. I’m not entirely sure how to switch to the latest beta version. I’m just on the branch of the PR that I’m working on currently. 

Do I have to rebase?

No worries, I should’ve included which version I was working with. I should also mention I do have an installation from binary installed (10.4).

Thanks,
Jackson

Henri Girard

unread,
Oct 20, 2024, 12:06:37 AM10/20/24
to sage-s...@googlegroups.com

I do this , probably not the best way :

git pull checkout  develop in the sage dir , then ./bootstrap ./configure and make -j xx

But I get sage from the sage github 

Dima Pasechnik

unread,
Oct 20, 2024, 7:01:02 AM10/20/24
to sage-s...@googlegroups.com


On 20 October 2024 01:58:14 BST, Jackson Walters <jackson...@gmail.com> wrote:
>Yes, it is 10.5.beta0. I’m not entirely sure how to switch to the latest
>beta version. I’m just on the branch of the PR that I’m working on
>currently.
>
>Do I have to rebase?

Rebasing is typically automatic, if you just touched a few files which were not touched in between the betas:

If origin is the name you gave to the Sage remote repo, then you do

git fetch origin develop
git rebase origin/develop

and it hopefully just says "Successfully..."
>> https://groups.google.com/d/msgid/sage-support/39f7e6b6-674d-470c-9c92-6f51ad8457edn%40googlegroups.com
>> .
>>
>> --
>> 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/CAAWYfq0opfjRbuXHwZgC6Cr1czwgKC7%2BJLGvbOAKnS%2BMQz1HcQ%40mail.gmail.com
>> .
>>
>

Jackson Walters

unread,
Oct 20, 2024, 2:06:08 PM10/20/24
to sage-s...@googlegroups.com
I don’t think I understand. I am just making commits in PR #38455. If I switch to the develop branch, surely these won’t have the changes I’m looking to see when I build? I’m probably just misunderstanding how git works.

Thanks,
Jackson

Dima Pasechnik

unread,
Oct 20, 2024, 3:03:11 PM10/20/24
to sage-s...@googlegroups.com, Jackson Walters
On Sun, Oct 20, 2024 at 7:06 PM Jackson Walters
<jackson...@gmail.com> wrote:
>
> I don’t think I understand. I am just making commits in PR #38455. If I switch to the develop branch, surely these won’t have the changes I’m looking to see when I build? I’m probably just misunderstanding how git works.

I'm not telling you to switch to the develop branch, I am telling you
to re-base your work on it.
Currently your base branch, i.e. from where you started your changes, is beta0.
These two commands:

git fetch origin develop
git rebase origin/develop

do the following. The 1st one copies the current develop branch (the
changeset, to be more precise)
from origin onto your local repo. This branch can be addressed,
locally, as origin/develop.
The 2nd command does the rebase of your current branch.
(https://git-scm.com/book/en/v2/Git-Branching-Rebasing)

In fact I just checked that rebase in your case will be automatic (I
got the branch from #38455 and tested on it)

Dima
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/CAGqtwVDjsXqK5_agqfSQstPZHRKqA3NBispiPOCgxeBkazM6SQ%40mail.gmail.com.

Jackson Walters

unread,
Oct 20, 2024, 7:30:47 PM10/20/24
to Dima Pasechnik, sage-s...@googlegroups.com
I tried running those two commands and got merge conflicts:

jacksonwalters@jaxmacbookair sage % git rebase origin/develop

Auto-merging src/sage/doctest/parsing.py

CONFLICT (content): Merge conflict in src/sage/doctest/parsing.py

error: could not apply db5bf6ce535... Filter out R warnings

hint: Resolve all conflicts manually, mark them as resolved with

hint: "git add/rm <conflicted_files>", then run "git rebase --continue".

hint: You can instead skip this commit: run "git rebase --skip".

hint: To abort and get back to the state before "git rebase", run "git rebase --abort".

Could not apply db5bf6ce535... Filter out R warnings

Jackson Walters

unread,
Oct 20, 2024, 10:31:15 PM10/20/24
to Dima Pasechnik, sage-s...@googlegroups.com
Regarding the merge conflicts, there are hundreds of them. I don't see how to get around that and actually complete a rebase.

I tried creating a new branch with the latest release (10.5.beta7) from develop, just to see if I could build it. It failed, so the issue probably isn't related to the version. Config file attached.

make[4]: *** [m4ri-SAGE_LOCAL-no-deps] Error 1

make[3]: *** [/Users/jacksonwalters/Documents/GitHub/sage/local/var/lib/sage/installed/m4ri-20200125] 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:         pip-24.0

  last build time: Oct 20 20:31

  log file:        /Users/jacksonwalters/Documents/GitHub/sage/logs/pkgs/pip-24.0.log


* package:         m4ri-20200125

  last build time: Oct 20 22:24

  log file:        /Users/jacksonwalters/Documents/GitHub/sage/logs/pkgs/m4ri-20200125.log

  build directory: /Users/jacksonwalters/Documents/GitHub/sage/local/var/tmp/sage/build/m4ri-20200125


Bear in mind, this is for one minor change. I tried using Codespaces but it seems pretty hopeless. I made a one line change, and it is reporting all kinds of errors, and I don't see how to rebuild it with the change. I can see the code in an editor, but can I actually build and run Sage in this environment?
config.log

Dima Pasechnik

unread,
Oct 21, 2024, 5:21:11 AM10/21/24
to sage-support
On Monday, October 21, 2024 at 3:31:15 AM UTC+1 jackson...@gmail.com wrote:
Regarding the merge conflicts, there are hundreds of them. I don't see how to get around that and actually complete a rebase.


this can only mean that you have a branch which differs from the one you have on the PR. 

I tried creating a new branch with the latest release (10.5.beta7) from develop, just to see if I could build it. It failed, so the issue probably isn't related to the version. Config file attached.

make[4]: *** [m4ri-SAGE_LOCAL-no-deps] Error 1

make[3]: *** [/Users/jacksonwalters/Documents/GitHub/sage/local/var/lib/sage/installed/m4ri-20200125] 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:         pip-24.0

  last build time: Oct 20 20:31

  log file:        /Users/jacksonwalters/Documents/GitHub/sage/logs/pkgs/pip-24.0.log


* package:         m4ri-20200125

  last build time: Oct 20 22:24

  log file:        /Users/jacksonwalters/Documents/GitHub/sage/logs/pkgs/m4ri-20200125.log

  build directory: /Users/jacksonwalters/Documents/GitHub/sage/local/var/tmp/sage/build/m4ri-20200125


Bear in mind, this is for one minor change. I tried using Codespaces but it seems pretty hopeless. I made a one line change, and it is reporting all kinds of errors, and I don't see how to rebuild it with the change. I can see the code in an editor, but can I actually build and run Sage in this environment?


Please make sure you can use Python provided by homebrew - currently you cannot, as in config.log you see

 configure:40144: will use system package and not install SPKG onetbb 
## -------------------------------------------------------- ## 
## Checking whether SageMath should install SPKG python3... ## 
## -------------------------------------------------------- ## 
configure:40312: checking whether any of bzip2 liblzma libffi zlib is installed as or will be installed as SPKG configure:40317: result: yes; install python3 as well configure:41821: 
no suitable system package found for SPKG python3 

Building Sage's Python+pip on macOS is apparently broken. 
(Not the least because it's complicated, and people prefer using either Homebrew's Python, or the Python you install from python.org)
 I've advocated for years that Sage should not try to build its own Python, because there are always alternatives, and it's very error-prone, so users keep shooting themselves in the foot with it.

 As you can see from your log, 
## -------------------------------------------------------- ## 
## Checking whether SageMath should install SPKG liblzma... ## 
## -------------------------------------------------------- ## 
configure:35282: liblzma has already been installed by SageMath 

So please run

    brew install xz pari pari-elldata pari-galdata pari-galpol pari-seadata

# liblzma is a part of xz - you might already have it installed, but it's ignored as you had Sage build and install liblzma 
# and the latter is always preferred. For the good measure I added commands to install all the packages needed 
# to use/run pari/gp from Homebrew 

   make distclean 

after this, please run 

  ./configure

and check the config.log, so that it shows that it will use python3 from Homebrew. It should also be able to use gmp and pari from Homebrew. If all of the latter is OK, please proceed with running 

    make


If not, please check that you have all the Homebrew packages recommended by ./configure installed. 

Dima 

PS. (Had to repost this via Google groups interface, as my emails to sage-support I blocked by google....)

Jackson Walters

unread,
Dec 19, 2024, 6:28:54 PM12/19/24
to sage-s...@googlegroups.com
Okay, I'm going to try to resolve this issue. I think there were two primary problems, which are solved:

1. my macOS was unable to upgrade to 15.2 (nor 15.0, 15.1), and that has now been resolved. I have a fresh installation of 15.2
2. the branch I was trying to build on was an outdated Sage 10.5beta, so I'll just try a fresh branch

I'm also going to reinstall homebrew from scratch. Before I had set up some virtualenvs with pyenv which was using shims and may have messed things up. Unclear.

Jackson Walters

unread,
Dec 20, 2024, 5:58:37 AM12/20/24
to sage-s...@googlegroups.com

[sagemath_doc_html-none] [spkg-install] 

[sagemath_doc_html-none] [spkg-install]     Note: incremental documentation builds sometimes cause spurious

[sagemath_doc_html-none] [spkg-install]     error messages. To be certain that these are real errors, run

[sagemath_doc_html-none] [spkg-install]     "make doc-clean doc-uninstall" first and try again.

[sagemath_doc_html-none] [spkg-install] make[6]: *** [doc-html--reference_top] Error 1

[sagemath_doc_html-none] [spkg-install] make[5]: *** [doc-html-reference] Error 2

[sagemath_doc_html-none] ************************************************************************

[sagemath_doc_html-none] Error installing package sagemath_doc_html-none

[sagemath_doc_html-none] ************************************************************************

[sagemath_doc_html-none] Please email sage-devel (http://groups.google.com/group/sage-devel)

[sagemath_doc_html-none] explaining the problem and including the log files

[sagemath_doc_html-none]   /Users/jacksonwalters/Documents/GitHub/sage/logs/pkgs/sagemath_doc_html-none.log

[sagemath_doc_html-none] and

[sagemath_doc_html-none]   /Users/jacksonwalters/Documents/GitHub/sage/config.log

[sagemath_doc_html-none] Describe your computer, operating system, etc.

[sagemath_doc_html-none] If you want to try to fix the problem yourself, *don't* just cd to

[sagemath_doc_html-none] /Users/jacksonwalters/Documents/GitHub/sage/local/var/tmp/sage/build/sagemath_doc_html-none and type 'make' or whatever is appropriate.

[sagemath_doc_html-none] Instead, the following commands setup all environment variables

[sagemath_doc_html-none] correctly and load a subshell for you to debug the error:

[sagemath_doc_html-none]   (cd '/Users/jacksonwalters/Documents/GitHub/sage/local/var/tmp/sage/build/sagemath_doc_html-none' && '/Users/jacksonwalters/Documents/GitHub/sage/sage' --buildsh)

[sagemath_doc_html-none] When you are done debugging, you can type "exit" to leave the subshell.

[sagemath_doc_html-none] ************************************************************************

[sagemath_doc_html-none] real 45m53.443s user 65m41.872s sys 19m23.147s

make[4]: *** [sagemath_doc_html-SAGE_DOCS-no-deps] Error 1

make[3]: *** [/Users/jacksonwalters/Documents/GitHub/sage/local/var/lib/sage/installed/sagemath_doc_html-none] 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:         sagemath_doc_html-none

  last build time: Dec 20 05:20

  log file:        /Users/jacksonwalters/Documents/GitHub/sage/logs/pkgs/sagemath_doc_html-none.log

  build directory: /Users/jacksonwalters/Documents/GitHub/sage/local/var/tmp/sage/build/sagemath_doc_html-none


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 67m11.097s user 127m23.853s sys 46m4.781s

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

make: *** [all] Error 2

Reply all
Reply to author
Forward
0 new messages