Make boost a prerequisite specifically on macOS (gh-40689)

143 views
Skip to first unread message

Volker Braun

unread,
Sep 11, 2025, 6:48:47 PM (11 days ago) Sep 11
to sage-devel
This is to gather some feedback about future requirements for installing Sage. https://github.com/sagemath/sage/pull/40689 wants to make installing boost the user's responsibility to install, which is easy enough on linux (unless you are not root) and what I would have thought way past the frustration tolerance of a casual user on macOS if they don't already use some third-party package manager. 

In that case (plain macOS) you basically have to follow the instructions on https://www.boost.org/doc/user-guide/getting-started.html#_download_boost to compile & install boost by hand. 

I personally don't use macOS unless I absolutely have to, so I don't really have any skin in the game here. So if you use a mac and have some thoughts about installing boost, this is your thread ;)

PS: On a meta-level there are definitely advantages to let somebody else provide the basic environment. But imho we should then start with a specific and reproducable basic environment that you can easily install (and fwiw conda is the only contender here that does not require root and is cross-platform). And not start by making that switch implicitly as a side effect of "move boost to prereqs, and by the way here are three different ways to get boost"

Tobia...@gmx.de

unread,
Sep 11, 2025, 8:16:45 PM (11 days ago) Sep 11
to sage-devel
It's important to have the overall situation for this in mind:
- Dima is the main maintainer nowadays for updating packages in sage-the-distro. One should perhaps say the only maintainer. In fact, he has trouble to even find reviewers for package update PRs. 
- The maintenance burden is way to high: according to https://repology.org/repository/sagemath_develop , 200, or 60%, of the packages in sage-the-distro are outdated. 

So if Dima thinks it's too much overhead to update a certain dependency (in the case of boost, we are carrying a 9 year old version), then we should follow that judgment - even if it means the install experience for a certain group of people might be slightly worse. The alternative is a completely unusable and unmaintained sage-the-distro in the future. Unless of course there are now more people that view this as a call to contribute to the updates. 

BTW, Conda is already the recommended approach for compiling from source. 

Dima Pasechnik

unread,
Sep 12, 2025, 1:54:37 AM (11 days ago) Sep 12
to sage-...@googlegroups.com
Volker, sorry,
this post is mistitled, it sounds as if I single out macOS users...

#40689 does not do anything macOS-specific. It removes the  boost spkg, making it a pre-requisite on all platforms, not just on macOS.

Well, indeed, if you happen not to use any package manager (and this is only possible on macOS), and use our standard workflow to build Sage, then you would be required to install boost without a package manager, i.e. yourself, which is a very painless process and takes about 5 minutes (documented in the PR). The only requirement for the process is having a C++ compiler installed, something one would have anyway.

Dima

Dima Pasechnik

unread,
Sep 12, 2025, 1:54:56 AM (11 days ago) Sep 12
to sage-...@googlegroups.com


On September 11, 2025 5:48:47 PM CDT, Volker Braun <vbrau...@gmail.com> wrote:
>This is to gather some feedback about future requirements for installing
>Sage. https://github.com/sagemath/sage/pull/40689 wants to make installing
>boost the user's responsibility to install, which is easy enough on linux
>(unless you are not root) and what I would have thought way past the
>frustration tolerance of a casual user on macOS

A casual macOS user who out of the blue decides to install Sage from source, without using any package manager? I expect a lot of head-banging-on-the-keyboard, really a lot.

The only users which have a need to install Sage in such a painful way are those who package Sage into macOS apps (or perhaps work classified jobs), and it's a very small, non-casual, and well-qualified subset of users,
who would have absolutely zero issue with needing to install boost this way.

Dima

Volker Braun

unread,
Sep 12, 2025, 12:16:13 PM (11 days ago) Sep 12
to sage-devel
> A casual macOS user who out of the blue decides to install Sage from source, without using any package manager? I expect a lot of head-banging-on-the-keyboard, really a lot.

It actually works reasonably easily:
* Download xcode from the App Store
* Install pkg-config by double-clicking on the macos installer from https://github.com/donmccaughey/pkg-config_pkg
* Download sage and run the usual ./configure && make

Volker Braun

unread,
Sep 12, 2025, 12:20:38 PM (11 days ago) Sep 12
to sage-devel
> BTW, Conda is already the recommended approach for compiling from source.

Is it? I mean thats great but I'm not aware of it

Our documentation https://doc.sagemath.org/html/en/installation/source.html curiously only explains how to NOT use conda in case you happen to be in an activated conda environment.

I'm not aware of any documentation with a conda one-liner that creates an environment with the base dependencies, but we do have separate one-liners for five different linux distributions and macOS homebrew

I'm seeing a lot of build failues when testing tickets, but never have I seen one that would helpfully mention which conda package to install.

Dima Pasechnik

unread,
Sep 12, 2025, 10:23:22 PM (10 days ago) Sep 12
to sage-...@googlegroups.com
On Fri, Sep 12, 2025 at 11:20 AM Volker Braun <vbrau...@gmail.com> wrote:
>
> > BTW, Conda is already the recommended approach for compiling from source.
>
> Is it? I mean thats great but I'm not aware of it
>
> Our documentation https://doc.sagemath.org/html/en/installation/source.html curiously only explains how to NOT use conda in case you happen to be in an activated conda environment.
>
> I'm not aware of any documentation with a conda one-liner that creates an environment with the base dependencies,

Are we talking about building sagelib from source, or building
sage-distro from source?
There is no supported way to build a mix of conda and non-conda
sage-disto packages,
nor there should be, IMHO.
In more detail, see

https://doc.sagemath.org/html/en/installation/conda.html

specifically

https://doc.sagemath.org/html/en/installation/conda.html#using-conda-to-provide-all-dependencies-for-the-sage-library

explains how to set things up in Conda to work on sagelib - with all
deps provided by conda.

we don't and really cannot support a mix with the standard install
(./boostrap+./configure+make) pulling some deps from Conda and some
from elsewhere. Conda setup is for sagelib only; updating a
(sage-distro) dependency in this context means updating the
corresponding Conda package.

Dima


> but we do have separate one-liners for five different linux distributions and macOS homebrew
>
> I'm seeing a lot of build failues when testing tickets, but never have I seen one that would helpfully mention which conda package to install.
>
> On Friday, September 12, 2025 at 2:16:45 AM UTC+2 Tobia...@gmx.de wrote:
>>
>> It's important to have the overall situation for this in mind:
>> - Dima is the main maintainer nowadays for updating packages in sage-the-distro. One should perhaps say the only maintainer. In fact, he has trouble to even find reviewers for package update PRs.
>> - The maintenance burden is way to high: according to https://repology.org/repository/sagemath_develop , 200, or 60%, of the packages in sage-the-distro are outdated.
>>
>> So if Dima thinks it's too much overhead to update a certain dependency (in the case of boost, we are carrying a 9 year old version), then we should follow that judgment - even if it means the install experience for a certain group of people might be slightly worse. The alternative is a completely unusable and unmaintained sage-the-distro in the future. Unless of course there are now more people that view this as a call to contribute to the updates.
>>
>> BTW, Conda is already the recommended approach for compiling from source.
>>
>>
>>
>> On Friday, September 12, 2025 at 6:48:47 AM UTC+8 Volker Braun wrote:
>>>
>>> This is to gather some feedback about future requirements for installing Sage. https://github.com/sagemath/sage/pull/40689 wants to make installing boost the user's responsibility to install, which is easy enough on linux (unless you are not root) and what I would have thought way past the frustration tolerance of a casual user on macOS if they don't already use some third-party package manager.
>>>
>>> In that case (plain macOS) you basically have to follow the instructions on https://www.boost.org/doc/user-guide/getting-started.html#_download_boost to compile & install boost by hand.
>>>
>>> I personally don't use macOS unless I absolutely have to, so I don't really have any skin in the game here. So if you use a mac and have some thoughts about installing boost, this is your thread ;)
>>>
>>> PS: On a meta-level there are definitely advantages to let somebody else provide the basic environment. But imho we should then start with a specific and reproducable basic environment that you can easily install (and fwiw conda is the only contender here that does not require root and is cross-platform). And not start by making that switch implicitly as a side effect of "move boost to prereqs, and by the way here are three different ways to get boost"
>
> --
> 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 visit https://groups.google.com/d/msgid/sage-devel/53121272-a355-4725-8253-64be6020c978n%40googlegroups.com.

Tobia...@gmx.de

unread,
Sep 12, 2025, 10:28:46 PM (10 days ago) Sep 12
to sage-devel
The documentation was changed in the 10.7 release cycle but the published docs are still for 10.6.

In the updated docs:
https://doc-develop--sagemath.netlify.app/html/en/developer/walkthrough uses conda to setup the dev env for new developers
https://doc-develop--sagemath.netlify.app/html/en/installation/meson explains how to build sagelib on top of conda (or system packages on certain systems

But you are right, it's probably also a good idea to add a link on https://doc-develop--sagemath.netlify.app/html/en/installation/source to conda. I'll do this later today.

Volker Braun

unread,
Sep 13, 2025, 5:31:51 AM (10 days ago) Sep 13
to sage-devel
> cannot support a mix with the standard install (./boostrap+./configure+make) pulling some deps from Conda and some from elsewhere

Why not? Specifically, why do we support that for homebrew and cannot for conda? 

You at least implied on the PR that boost could be installed from conda, so is that not true? Or only when I install every dependency under the sun from conda? So is the plan to no longer test compiling sage-the-distro and just rely on conda? 

Dima Pasechnik

unread,
Sep 14, 2025, 9:40:43 PM (8 days ago) Sep 14
to sage-...@googlegroups.com


On September 13, 2025 4:31:51 AM CDT, Volker Braun <vbrau...@gmail.com> wrote:
>> cannot support a mix with the standard install
>(./boostrap+./configure+make) pulling some deps from Conda and some from
>elsewhere
>
>Why not? Specifically, why do we support that for homebrew and cannot for
>conda?

OK, maybe it's possible. It's just much messier, in particular as Conda brings in its own compilers, and libraries built by different C++ compilers don't mix well. Homebrew is much less intrusive in this respect.

>
>You at least implied on the PR that boost could be installed from conda, so
>is that not true? Or only when I install every dependency under the sun
>from conda? So is the plan to no longer test compiling sage-the-distro and
>just rely on conda?

huh, who said that?
That's certainly not the plan.
On the other hand, sage the distro should drop the (hardly used) compilers, and most Python spkgs. The vast majority of the latter have nothing to do with maths and computing, it's build tools, sphinx, jupyter, and testing tools. All of these are much better served by external tools.
Reply all
Reply to author
Forward
0 new messages