Building Sage 9.3 on Mac fails due to numpy

50 views
Skip to first unread message

modp...@gmail.com

unread,
May 10, 2021, 2:46:50 PM5/10/21
to sage-devel
I'm trying to build SageMath 9.3 from source on MacOS Big Sur 11.3.1.

It fails with the following:

    v = self.gnu_version_match(version_string)

  File "/Users/myUser/app/sage-9.3/local/var/tmp/sage/build/numpy-1.19.5/src/numpy/distutils/fcompiler/gnu.py", line 80, in gnu_version_match

    raise ValueError(err + version_string)

ValueError: A valid Fortran version was not found in this string:


9.2.0

********************************************************************************

Error building a wheel for numpy-1.19.5

********************************************************************************


Please find the log files attached. Any ideas what the issue might be?

config.log
numpy-1.19.5.log

Matthias Koeppe

unread,
May 10, 2021, 3:01:56 PM5/10/21
to sage-devel
Our configure script rejects the current gfortran from homebrew - which is already 11.1.

This leads to building gfortran from source, an old version which does not support Big Sur. 
Try with https://trac.sagemath.org/ticket/29703 please (use ./bootstrap), which upgrades our gcc/gfortran package.

modp...@gmail.com

unread,
May 10, 2021, 3:27:19 PM5/10/21
to sage-devel
Thanks for the info. But I don't fully get what I should try. The link you have is just a link to the ticket. I do not see what are the steps one need to take for building 9.3 on Mac succesfully.
Can you outline it here?

Zachary Scherr

unread,
May 10, 2021, 3:27:47 PM5/10/21
to sage-devel
I haven't fully tested this yet, but you can also try installing gcc-10 through homebrew and then using gfortran-10.  Here are the steps to try:

> brew install gcc-10

and then once in a clean sage directory (so run make distclean if you need to):

> source .homebrew-build-env
> make configure
> FC=gfortran-10 ./configure
> make

will force the configure script to use gfortran 10.  At the time of posting this I did check that this does allow numpy to build.



Zachary Scherr

unread,
May 10, 2021, 3:28:50 PM5/10/21
to sage-devel
sorry, that should be `brew install gcc@10`

Matthias Koeppe

unread,
May 10, 2021, 3:49:07 PM5/10/21
to sage-devel
On Monday, May 10, 2021 at 12:27:19 PM UTC-7 modp...@gmail.com wrote:
Thanks for the info. But I don't fully get what I should try. The link you have is just a link to the ticket. I do not see what are the steps one need to take for building 9.3 on Mac succesfully.
Can you outline it here?

Check out the branch on that ticket using the instructions at https://doc.sagemath.org/html/en/developer/manual_git.html
Then build following the steps of the top-level README.md file.


 

Matthias Koeppe

unread,
May 10, 2021, 3:52:20 PM5/10/21
to sage-devel
Yes, using gcc@10 from homebrew should be a good option too. I have added this suggestion to  to https://wiki.sagemath.org/ReleaseTours/sage-9.3#Availability_of_Sage_9.3_and_installation_help (it may need expanding)

Zachary Scherr

unread,
May 10, 2021, 4:11:52 PM5/10/21
to sage-devel
Just as a followup, I did confirm on my Big Sur that the steps I outlined above does let sage build.
Reply all
Reply to author
Forward
0 new messages