Trouble building cython

174 views
Skip to first unread message

Trevor Karn

unread,
Feb 8, 2021, 4:20:39 AM2/8/21
to sage-devel
Hi,

I'm trying to build Sage from the source code. I cloned it from git, and tried to build from the develop branch using make from the sage directory. I ran into trouble building cython. The error message suggested that I email this group. Does anyone have any advice on how to proceed? 

I am using macOS Big Sur 11.2 on a MacBook Air. 

The log file is attached, this is from a second run - it failed once, and I tried running make a second time without any changes and this is the log from the second run, which returns the same error just without all of the info before it (eg. the flint installation).

Thanks so much.

Best,
Trevor
cython-0.29.21.log

Dima Pasechnik

unread,
Feb 8, 2021, 6:42:56 AM2/8/21
to sage-devel
This seems to be well-known issue, see e.g
https://github.com/pypa/virtualenv/issues/2027

Are you on the most recent develop branch (9.3.beta7)?
> --
> 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/1c93ec2e-86bd-45f0-bba0-cc254a392305n%40googlegroups.com.

Trevor Karn

unread,
Feb 8, 2021, 8:02:34 AM2/8/21
to sage-...@googlegroups.com
Thanks for sending that link. I am confused though, because it says a fix was issued. Does that mean it should work now?

And yes, I am on the most recent develop branch

You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/TmbLnmwz2mg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq3CFFAYzUtNnSrt_RPKW7X_p8j_VXGtZbKLWG%2BST%3DCO%2BQ%40mail.gmail.com.
--
Best,

Trevor

Dima Pasechnik

unread,
Feb 8, 2021, 8:09:52 AM2/8/21
to sage-devel


On Mon, 8 Feb 2021, 13:02 Trevor Karn, <trevor...@gmail.com> wrote:
Thanks for sending that link. I am confused though, because it says a fix was issued. Does that mean it should work now?

sorry, I was not clear. What I meant to say that it appears to be a well-known issue in the Python@macOS universe,
and lately all seems to be OK with Sage.

To figure out exactly goes wrong in your case, we need to know where Python3 used in Sage is coming from.
Please post the top-level config.log


Trevor Karn

unread,
Feb 8, 2021, 8:53:17 AM2/8/21
to sage-...@googlegroups.com
Ah I see, thanks for explaining.

Here is my top-level config.log.

Best Regards,

Trevor Karn


config.log

Dima Pasechnik

unread,
Feb 8, 2021, 9:17:20 AM2/8/21
to sage-devel
Could it be that you need to update your Homebrew (?) python3 package?
What version do you have now?
E.g. on a box where the latest Sage builds I have

% brew info python3

python@3.9: stable 3.9.1 (bottled)
Interpreted, interactive, object-oriented programming language
https://www.python.org/
/usr/local/Cellar/python@3.9/3.9.1_8 (4,057 files, 67.8MB) *
Poured from bottle on 2021-02-06 at 10:13:24
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/pyt...@3.9.rb
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAJ6VCMDJEN7KzDmvB0x0GDrXiQrK3F_e_eBZvSJf-JxVre0n-Q%40mail.gmail.com.

Trevor Karn

unread,
Feb 8, 2021, 9:32:20 AM2/8/21
to sage-...@googlegroups.com


Here is what I get. It seems like it is the same as yours?


trevorkarn@Trevors-MacBook-Air sage % brew info python3

python@3.9: stable 3.9.1

Interpreted, interactive, object-oriented programming language

https://www.python.org/

/usr/local/Cellar/python@3.9/3.9.1_8 (8,665 files, 129.4MB) *

  Built from source on 2021-02-05 at 16:39:31

From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/pyt...@3.9.rb

License: Python-2.0

==> Dependencies

Build: pkg-config

Required: gdbm , openssl@1.1 , readline , sqlite , tcl-tk , xz

==> Caveats

Python has been installed as

  /usr/local/bin/python3


Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to

`python3`, `python3-config`, `pip3` etc., respectively, have been installed into

  /usr/local/opt/python@3.9/libexec/bin


You can install Python packages with

  pip3 install <package>

They will install into the site-package directory

  /usr/local/lib/python3.9/site-packages


See: https://docs.brew.sh/Homebrew-and-Python

==> Analytics

install: 755,419 (30 days), 2,396,024 (90 days), 2,995,387 (365 days)

install-on-request: 244,063 (30 days), 714,665 (90 days), 799,812 (365 days)

build-error: 0 (30 days)


Best Regards,

Trevor Karn


Trevor Karn

unread,
Feb 8, 2021, 10:01:02 AM2/8/21
to sage-...@googlegroups.com
I also have this. Is there any reason it might be calling python instead of python3?

trevorkarn@Trevors-MacBook-Air sage % python3 --version

Python 3.9.1

trevorkarn@Trevors-MacBook-Air sage % python --version

Python 2.7.16


Best Regards,

Trevor Karn

Zachary Scherr

unread,
Feb 8, 2021, 10:09:38 AM2/8/21
to sage-devel
I really don't understand.  The Cython log file shows that the problem is in

/Users/trevorkarn/Applications/sage/local/lib/python3.9/site-packages/wheel/pep425tags.py

I could be mistaken, but I don't think pep425tags.py has been a part of the wheel package for a while now.  Certainly when I looked at wheel on my sage there was no such file.

Can you go to your "/Users/trevorkarn/Applications/sage/local/lib/python3.9/site-packages/wheel/" directory and take a look at __init__.py.  Does the version say 0.36.2?

Trevor Karn

unread,
Feb 8, 2021, 10:21:09 AM2/8/21
to sage-...@googlegroups.com
The only contents of the file you pointed me towards are

__version__ = '0.36.2'

Best Regards,

Trevor Karn


Zachary Scherr

unread,
Feb 8, 2021, 10:50:59 AM2/8/21
to sage-devel
and do you see that pep425tags.py file in that directory?

Dima Pasechnik

unread,
Feb 8, 2021, 10:54:11 AM2/8/21
to sage-devel
the only explanation for pep425tags.py would be an unclean build
environment - e.g. weird env vars set, or strange stuff in PATH.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/bd636baa-f6b1-42f7-866b-77ba0af40b6en%40googlegroups.com.

Trevor Karn

unread,
Feb 8, 2021, 10:59:05 AM2/8/21
to sage-...@googlegroups.com
I do not see pep425tags.py in that directory. 

trevorkarn@Trevors-MacBook-Air sage % cd /Users/trevorkarn/Applications/sage/local/lib/python3.9/site-packages/wheel/

trevorkarn@Trevors-MacBook-Air wheel % ls

__init__.py __pycache__ cli metadata.py util.py wheelfile.py

__main__.py bdist_wheel.py macosx_libfile.py pkginfo.py vendored


Is there a way to clean the build environment?

Best Regards,

Trevor Karn


Zachary Scherr

unread,
Feb 8, 2021, 11:29:44 AM2/8/21
to sage-devel
Probably the thing to try would be:

make distclean

and then you can build from scratch via:

./bootstrap
source .homebrew-build-env
./configure
make -j4 build

But if you want to try cleaning wheel first before starting from scratch, you could just try

make wheel-clean
make -j4 build

but it might be better to clean everything and start from scratch.

Trevor Karn

unread,
Feb 8, 2021, 12:27:01 PM2/8/21
to sage-...@googlegroups.com
I tried make distclean and got an error “make: *** No rule to make target ‘distclean’. Stop.”

So I tried your second suggestion and it seems to be working so far, but it is still compiling.

--
Best,

Trevor

Zachary Scherr

unread,
Feb 8, 2021, 12:31:49 PM2/8/21
to sage-devel
Are you sure you typed it correctly? Maybe try running

./bootstrap

to make sure that the make targets are in order.

Trevor Karn

unread,
Feb 8, 2021, 2:25:16 PM2/8/21
to sage-...@googlegroups.com
I must have typed it wrong. The second option you gave failed on numpy, but I tried the first option again, and it is compiling.

Best Regards,

Trevor Karn


Zachary Scherr

unread,
Feb 8, 2021, 2:56:23 PM2/8/21
to sage-devel
yea, something seems messed up.  For example, the numpy problem was fixed on beta 6 and should still be fixed in beta 7.  It looks like somehow you have old files hanging around which are causing problems.  Hopefully make distclean will clean everything and let you start fresh.

Trevor Karn

unread,
Feb 8, 2021, 9:27:11 PM2/8/21
to sage-...@googlegroups.com
Unfortunately, that did not seem to work. 

Here are the last few lines of the terminal output and I've attached the numpy log.

[singular-4.1.1p2.p0] real 28m38.843s

[singular-4.1.1p2.p0] user 24m18.545s

[singular-4.1.1p2.p0] sys 3m53.423s

[singular-4.1.1p2.p0] Copying package files from temporary location /Users/trevorkarn/Applications/sage/local/var/tmp/sage/build/singular-4.1.1p2.p0/inst to /Users/trevorkarn/Applications/sage/local

[singular-4.1.1p2.p0] Successfully installed singular-4.1.1p2.p0

[singular-4.1.1p2.p0] Deleting temporary build directory

[singular-4.1.1p2.p0] /Users/trevorkarn/Applications/sage/local/var/tmp/sage/build/singular-4.1.1p2.p0

[singular-4.1.1p2.p0] Finished installing singular-4.1.1p2.p0

make[2]: *** [all-build] Error 2


real 182m14.796s

user 355m33.883s

sys 72m32.388s

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

Error building Sage.


The following package(s) may have failed to build (not necessarily

during this run of 'make all-build'):


* package:         numpy-1.19.4

  last build time: Feb 8 19:48

  log file:        /Users/trevorkarn/Applications/sage/logs/pkgs/numpy-1.19.4.log

  build directory: /Users/trevorkarn/Applications/sage/local/var/tmp/sage/build/numpy-1.19.4


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-build] Error 1

make: *** [build] Error 2

trevorkarn@Trevors-MacBook-Air sage %



Best Regards,

Trevor Karn


numpy-1.19.4.log

Zachary Scherr

unread,
Feb 8, 2021, 9:38:49 PM2/8/21
to sage-devel
In your original config.log, it looked like sage was picking up its own fortran:

configure:11991: gfortran has already been installed by SageMath
configure:39396: result: gfortran-9.2.0:                              already installed as an SPKG

The current version of gfortran from homebrew is 10.2.0 version 3

GNU Fortran (Homebrew GCC 10.2.0_3) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

./configure should be picking up homebrew's gfortran (installed with gcc), and it seems from your config.log file that you do have homebrew and therefore you should have the most recent gfortran.
Do you have the newest config.log file from after running make distclean? You may also want to try running

brew doctor

to see if there is something wrong with your homebrew. 

Trevor Karn

unread,
Feb 8, 2021, 10:10:01 PM2/8/21
to sage-...@googlegroups.com
brew doctor is giving lots of errors about unbrewed files:

trevorkarn@Trevors-MacBook-Air sage % brew doctor

Please note that these warnings are just used to help the Homebrew maintainers

with debugging if you file an issue. If everything you use Homebrew for is

working fine: please don't worry or file an issue; just ignore this. Thanks!


Warning: Unbrewed dylibs were found in /usr/local/lib.

If you didn't put them there on purpose they could cause problems when

building Homebrew formulae, and may need to be deleted.


Unexpected dylibs:

  /usr/local/lib/libtcl8.6.dylib

  /usr/local/lib/libtk8.6.dylib


Warning: Unbrewed header files were found in /usr/local/include.

If you didn't put them there on purpose they could cause problems when

building Homebrew formulae, and may need to be deleted.


Unexpected header files:

  /usr/local/include/fakemysql.h

  /usr/local/include/fakepq.h

  /usr/local/include/fakesql.h

  /usr/local/include/itcl.h

  /usr/local/include/itcl2TclOO.h

  /usr/local/include/itclDecls.h

  /usr/local/include/itclInt.h

  /usr/local/include/itclIntDecls.h

  /usr/local/include/itclMigrate2TclCore.h

  /usr/local/include/itclTclIntStubsFcn.h

  /usr/local/include/mysqlStubs.h

  /usr/local/include/odbcStubs.h

  /usr/local/include/pqStubs.h

  /usr/local/include/tcl.h

  /usr/local/include/tclDecls.h

  /usr/local/include/tclOO.h

  /usr/local/include/tclOODecls.h

  /usr/local/include/tclPlatDecls.h

  /usr/local/include/tclThread.h

  /usr/local/include/tclTomMath.h

  /usr/local/include/tclTomMathDecls.h

  /usr/local/include/tdbc.h

  /usr/local/include/tdbcDecls.h

  /usr/local/include/tdbcInt.h

  /usr/local/include/tk.h

  /usr/local/include/tkDecls.h

  /usr/local/include/tkPlatDecls.h


Warning: Unbrewed '.pc' files were found in /usr/local/lib/pkgconfig.

If you didn't put them there on purpose they could cause problems when

building Homebrew formulae, and may need to be deleted.


Unexpected '.pc' files:

  /usr/local/lib/pkgconfig/tcl.pc

  /usr/local/lib/pkgconfig/tk.pc


Warning: Unbrewed static libraries were found in /usr/local/lib.

If you didn't put them there on purpose they could cause problems when

building Homebrew formulae, and may need to be deleted.


Unexpected static libraries:

  /usr/local/lib/libtclstub8.6.a

  /usr/local/lib/libtkstub8.6.a


Warning: You have unlinked kegs in your Cellar.

Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on

those kegs to fail to run properly once built. Run `brew link` on these:

  ffmpeg

  ghostscript


Warning: Homebrew's "sbin" was not found in your PATH but you have installed

formulae that put executables in /usr/local/sbin.

Consider setting your PATH for example like so:

  echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc


Warning: Broken symlinks were found. Remove them with `brew cleanup`:

  /usr/local/bin/git-trac

  /usr/local/share/ghostscript/9.27/Resource/Font/wasy10.pfb

  /usr/local/share/ghostscript/9.27/Resource/Font/wasy5.pfb

  /usr/local/share/ghostscript/9.27/Resource/Font/wasy6.pfb

  /usr/local/share/ghostscript/9.27/Resource/Font/wasy7.pfb

  /usr/local/share/ghostscript/9.27/Resource/Font/wasy8.pfb

  /usr/local/share/ghostscript/9.27/Resource/Font/wasy9.pfb

  /usr/local/share/ghostscript/9.27/Resource/Font/wasyb10.pfb

  /usr/local/share/man/man1/brew-cask.1

  /usr/local/share/zsh/site-functions/_brew_cask

trevorkarn@Trevors-MacBook-Air sage % brew cleanup

Removing: /usr/local/Cellar/gettext/0.20.1... (1,899 files, 18.5MB)

Removing: /usr/local/Cellar/gmp/6.1.2_2... (18 files, 3.1MB)

Removing: /usr/local/Cellar/gnutls/3.6.9... (1,227 files, 9.9MB)

Removing: /usr/local/Cellar/icu4c/64.2... (257 files, 69.2MB)

Removing: /usr/local/Cellar/libevent/2.1.11... (1,063 files, 5MB)

Removing: /usr/local/Cellar/libffi/3.2.1... (16 files, 296.8KB)

Removing: /usr/local/Cellar/libidn2/2.2.0_1... (70 files, 700.9KB)

Removing: /usr/local/Cellar/libtasn1/4.14... (59 files, 384KB)

Removing: /usr/local/Cellar/nettle/3.4.1... (85 files, 2MB)

Error: Interrupted system call @ dir_initialize - /usr/local/Cellar/opus

trevorkarn@Trevors-MacBook-Air sage % ;2D


Best Regards,

Trevor Karn


Zachary Scherr

unread,
Feb 8, 2021, 10:40:37 PM2/8/21
to sage-devel
At some point you should deal with those warnings, but I don't think that is what is causing your problems (although they are probably symptomatic of other possible issues).  

The config.log file you posted earlier is picking up a lot of packages that were built by sage and not from homebrew.  Do you have the config.log file that you got after running make distclean? 

Trevor Karn

unread,
Feb 8, 2021, 10:52:43 PM2/8/21
to sage-...@googlegroups.com
Here is the new one. Thanks so much for all of your help on this, Zachary.


Best Regards,

Trevor Karn


config.log

Zachary Scherr

unread,
Feb 8, 2021, 11:07:02 PM2/8/21
to sage-devel
I need to sign off for the night, but the numpy error is definitely related to gfortran.  If you have gcc installed via homebrew then it should come with the latest version of gfortran.  You can see from your config.log file that gfortran is not found:

configure:7281: checking for gfortran
configure:7311: result: no

and other standard homebrew packages are not found, like openblas:

configure:12171: checking BLAS library
configure:12190: result: openblas
configure:12239: checking whether any of gfortran is installed as or will be installed as SPKG
configure:12243: result: yes; install openblas as well
configure:13540: no suitable system package found for SPKG openblas

are you aware if you have gcc and openblas installed via homebrew? I also see that you didn't run "source .homebrew-build-env" before running ./configure since I don't see certain items on your path.  If you go to the sage installation guide at https://doc.sagemath.org/html/en/installation/source.html#macos-recommended-installation you can see a list of homebrew packages you might want to have before installing sage.  I think if you get everything in working order with homebrew then you shouldn't have any issues installing sage.  Here is my best suggestion as to what to try:

- fix all "brew doctor" warnings.  This might not be necessary, but I get worried when I see so many warnings.  You can probably just delete all the suggested files and you should be fine.

- install all the recommended homebrew packages.  If any are already installed then maybe try "brew reinstall" to make sure it is installed properly.  If you think you have homebrew gcc installed then you should be able to do "which gfortran" and "gfortran --version".  That should hopefully show you that you have gfortran 10.2.0_3.

- in your sage folder under the develop branch you should run the commands I mentioned, and don't skip out on "source .homebrew-build-env":

>> make distclean
>> ./bootstrap
>> source .homebrew-build-env
>> ./configure

Before running "make -j4 build" you can look at config.log and make sure that it picked up all of the relevant homebrew packages.





Dima Pasechnik

unread,
Feb 9, 2021, 5:06:23 AM2/9/21
to sage-devel
On Tue, Feb 9, 2021 at 4:07 AM Zachary Scherr <zsc...@gmail.com> wrote:
>
> I need to sign off for the night, but the numpy error is definitely related to gfortran. If you have gcc installed via homebrew then it should come with the latest version of gfortran. You can see from your config.log file that gfortran is not found:
>
> configure:7281: checking for gfortran
> configure:7311: result: no
>
> and other standard homebrew packages are not found, like openblas:
>
> configure:12171: checking BLAS library
> configure:12190: result: openblas
> configure:12239: checking whether any of gfortran is installed as or will be installed as SPKG
> configure:12243: result: yes; install openblas as well
> configure:13540: no suitable system package found for SPKG openblas
>
> are you aware if you have gcc and openblas installed via homebrew? I also see that you didn't run "source .homebrew-build-env" before running ./configure since I don't see certain items on your path. If you go to the sage installation guide at https://doc.sagemath.org/html/en/installation/source.html#macos-recommended-installation you can see a list of homebrew packages you might want to have before installing sage. I think if you get everything in working order with homebrew then you shouldn't have any issues installing sage. Here is my best suggestion as to what to try:
>
> - fix all "brew doctor" warnings. This might not be necessary, but I get worried when I see so many warnings. You can probably just delete all the suggested files and you should be fine.
>
> - install all the recommended homebrew packages. If any are already installed then maybe try "brew reinstall" to make sure it is installed properly. If you think you have homebrew gcc installed then you should be able to do "which gfortran" and "gfortran --version". That should hopefully show you that you have gfortran 10.2.0_3.
>
> - in your sage folder under the develop branch you should run the commands I mentioned, and don't skip out on "source .homebrew-build-env":
>
> >> make distclean
> >> ./bootstrap
> >> source .homebrew-build-env
> >> ./configure
>
> Before running "make -j4 build" you can look at config.log and make sure that it picked up all of the relevant homebrew packages.
>
>
source .homebrew-build-env

should be run before ./bootstrap


as well, ./confugure at the end of its run outputs an advice on
packages that can still be installed.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/b66c5f47-43b6-4b27-8d3f-b0962b57dd75n%40googlegroups.com.

Trevor Karn

unread,
Feb 9, 2021, 10:32:13 AM2/9/21
to sage-...@googlegroups.com
I uninstalled and reinstalled homebrew and that got rid of the brew doctor warnings. I then brewed the suggested packages from the Sage link Zachary provided and the packages listed at the end of the output of configure.

Then from SAGE_ROOT I ran 

make distclean
source .homebrew-build-env
./bootstrap -d   
./configure 
make -j4 build

In the end this seems to be working. Thank you so much Dima and Zachary for your help.

The reason for running ./bootstrap with the -d flag was because that is what an error message told me to do. Without -d flag:

trevorkarn@Trevors-MacBook-Air sage % source .homebrew-build-env 

trevorkarn@Trevors-MacBook-Air sage % ./bootstrap

rm -rf config configure build/make/Makefile-auto.in

rm -f src/doc/en/installation/*.txt

rm -rf src/doc/en/reference/spkg/*.rst

rm -f src/doc/en/reference/repl/*.txt

rm -f environment.yml

rm -f src/environment.yml

rm -f environment-optional.yml

rm -f src/environment-optional.yml

src/doc/bootstrap:92: installing src/doc/en/installation/arch.txt and src/doc/en/installation/arch-optional.txt

src/doc/bootstrap:92: installing src/doc/en/installation/debian.txt and src/doc/en/installation/debian-optional.txt

src/doc/bootstrap:92: installing src/doc/en/installation/fedora.txt and src/doc/en/installation/fedora-optional.txt

src/doc/bootstrap:92: installing src/doc/en/installation/cygwin.txt and src/doc/en/installation/cygwin-optional.txt

src/doc/bootstrap:92: installing src/doc/en/installation/homebrew.txt and src/doc/en/installation/homebrew-optional.txt

src/doc/bootstrap:66: installing environment.yml, environment-optional.yml, src/environment.yml and src/environment-optional.yml

src/doc/bootstrap:103: installing src/doc/en/reference/spkg/*.rst

src/doc/bootstrap:182: installing src/doc/en/reference/repl/options.txt

bootstrap:73: installing 'config/config.rpath'

./bootstrap: line 118: aclocal: command not found

Bootstrap failed. Either install autotools or run bootstrap with

the -d option to download the auto-generated files instead.


Best Regards,

Trevor Karn


Dima Pasechnik

unread,
Feb 9, 2021, 10:43:00 AM2/9/21
to sage-devel
build/pkgs/_bootstrap/distros/homebrew.txt

contains a list of dev packages recommended for Homebrew.
(and with these installed, ./bootstrap should complete without errors)

I wonder whether any of these are printed at the end of the ./configure run.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAJ6VCMDbN4HT-rxZZmQTPRGy%3Dja5KeAZfqk_9CzmWCjZVD9zoQ%40mail.gmail.com.

Zachary Scherr

unread,
Feb 9, 2021, 12:09:32 PM2/9/21
to sage-devel
I see that the link I posted to the installation from source documentation doesn't mention autoconf/automake, but I would have thought some other package would have already installed them.  Probably since homebrew is all bottles now they don't automatically get installed anymore if you are not building locally.

But Dima is right, it's probably best practice to brew install the packages listed in the file build/pkgs/_bootstrap/distros/homebrew.txt.

Matthias Koeppe

unread,
Feb 9, 2021, 2:15:09 PM2/9/21
to sage-devel
On Tuesday, February 9, 2021 at 9:09:32 AM UTC-8 zsc...@gmail.com wrote:
I see that the link I posted to the installation from source documentation doesn't mention autoconf/automake, but I would have thought some other package would have already installed them.  Probably since homebrew is all bottles now they don't automatically get installed anymore if you are not building locally.

But Dima is right, it's probably best practice to brew install the packages listed in the file build/pkgs/_bootstrap/distros/homebrew.txt.


The installation manual does not mention the bootstrapping prerequisites because users installing source releases will not need them.
Bootstrapping is only needed when developers use branches from git that make changes to packages or build scripts.

However the developer's manual should be updated to discuss bootstrapping. 

There is a ticket for improvements to this manual -  https://trac.sagemath.org/ticket/29784 - which needs help.

 

Trevor Karn

unread,
Feb 10, 2021, 8:27:36 AM2/10/21
to sage-...@googlegroups.com
I would be willing to help make improvements to the manual, my only hesitation is that I'm not 100% sure what is going on with the bootstrapping. Is there anything particular to bootstrapping in Sage that wouldn't show up in googling around about it?

Best Regards,

Trevor Karn


--
You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/TmbLnmwz2mg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.

Dima Pasechnik

unread,
Feb 10, 2021, 9:18:24 AM2/10/21
to sage-devel
On Wed, Feb 10, 2021 at 1:27 PM Trevor Karn <trevor...@gmail.com> wrote:
>
> I would be willing to help make improvements to the manual, my only hesitation is that I'm not 100% sure what is going on with the bootstrapping. Is there anything particular to bootstrapping in Sage that wouldn't show up in googling around about it?

./bootstrap is a shell script that calls autoconf and other autotools,
as well as sets up several other
things.

It would make sense if bootstrap also printed platform-specific system packages
(as listed in build/pkgs/_bootstrap/distros/<platform>.txt) it needs,
in case it fails and tells them to try "./bootstrap -d", - see the lines

echo >&2 "Bootstrap failed. Either $verb autotools or
run bootstrap with"
echo >&2 "the -d option to download the auto-generated
files instead."

in bootstrap.

It ought to be relatively straightforward (not sure about platform
recongition, this might be
a bit of work (probably copying from the right place in Sage's build/ ?)

Dima




>
> Best Regards,
>
> Trevor Karn
>
>
> On Tue, Feb 9, 2021 at 1:15 PM Matthias Koeppe <matthia...@gmail.com> wrote:
>>
>> On Tuesday, February 9, 2021 at 9:09:32 AM UTC-8 zsc...@gmail.com wrote:
>>>
>>> I see that the link I posted to the installation from source documentation doesn't mention autoconf/automake, but I would have thought some other package would have already installed them. Probably since homebrew is all bottles now they don't automatically get installed anymore if you are not building locally.
>>>
>>> But Dima is right, it's probably best practice to brew install the packages listed in the file build/pkgs/_bootstrap/distros/homebrew.txt.
>>>>
>>>>
>>
>> The installation manual does not mention the bootstrapping prerequisites because users installing source releases will not need them.
>> Bootstrapping is only needed when developers use branches from git that make changes to packages or build scripts.
>>
>> However the developer's manual should be updated to discuss bootstrapping.
>>
>> There is a ticket for improvements to this manual - https://trac.sagemath.org/ticket/29784 - which needs help.
>>
>>
>>
>> --
>> You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/TmbLnmwz2mg/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/43f209e5-8536-4685-8c9d-78e5eeb0aa84n%40googlegroups.com.
>
> --
> 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/CAJ6VCMDGmFZ%2BOqofD2t8_-yjd3FapZtY%3DPF_Nhz%3DFJoGLyKuuA%40mail.gmail.com.

Matthias Koeppe

unread,
Feb 10, 2021, 11:13:12 AM2/10/21
to sage-devel
On Wednesday, February 10, 2021 at 6:18:24 AM UTC-8 Dima Pasechnik wrote:
It would make sense if bootstrap also printed platform-specific system packages
(as listed in build/pkgs/_bootstrap/distros/<platform>.txt) it needs,
in case it fails and tells them to try "./bootstrap -d", - see the lines

echo >&2 "Bootstrap failed. Either $verb autotools or
run bootstrap with"
echo >&2 "the -d option to download the auto-generated
files instead."

in bootstrap.

It ought to be relatively straightforward (not sure about platform
recongition, this might be
a bit of work (probably copying from the right place in Sage's build/ ?)


Good idea, I've opened https://trac.sagemath.org/ticket/31375 for this
 
Reply all
Reply to author
Forward
0 new messages