pip-21.1.2 compile fails on MacOS

79 views
Skip to first unread message

harald....@gmail.com

unread,
Nov 11, 2021, 2:00:06 PM11/11/21
to sage-devel
Hi,

I'm trying to build Sagemath from source (within miniconda) on an Intel-based Mac Mini running MacOS Monterrey. I get:

[pip-21.1.2] Error building a wheel for pip-21.1.2
...

[pip-21.1.2] Error installing package pip-21.1.2

See the log files.

Best

Harald

pip-21.1.2.log
config.log

harald....@gmail.com

unread,
Nov 11, 2021, 3:23:32 PM11/11/21
to sage-devel
I run into the same issue without miniconda, and thus cannot build Sage at all.

Dima Pasechnik

unread,
Nov 11, 2021, 4:38:13 PM11/11/21
to sage-devel
Hi Harald,

We don't have Sage ported to macos 12 yet, I am afraid.
We have been fighting macos 11 until April, see


Binaries built on macOS 10 or 11 might run on 12, but building is another story.

Can one install Sage on macOS 12 using (mini)Conda at all ?

I think building might be easier with Homebrew rather than Conda, too.

Cheers,
Dima

Isuru Fernando

unread,
Nov 11, 2021, 4:56:45 PM11/11/21
to sage-devel
> Can one install Sage on macOS 12 using (mini)Conda at all ?

Sure. It should work fine. Bug reports are welcome.

Isuru

--
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/c95cfc0d-c1ea-41b9-8038-c360479af7efn%40googlegroups.com.

Isuru Fernando

unread,
Nov 11, 2021, 5:03:30 PM11/11/21
to sage-devel
For this issue, you need setuptools 58 or higher.

Isuru

Dima Pasechnik

unread,
Nov 11, 2021, 5:04:34 PM11/11/21
to sage-devel
On Thu, Nov 11, 2021 at 9:56 PM Isuru Fernando <isu...@gmail.com> wrote:
> Can one install Sage on macOS 12 using (mini)Conda at all ?

Sure. It should work fine. Bug reports are welcome.

Am I right that it's possible to change Sage's Cython files in such an installation, and  update Sage this way?

Isuru Fernando

unread,
Nov 11, 2021, 5:10:10 PM11/11/21
to sage-devel
> Am I right that it's possible to change Sage's Cython files in such an installation, and  update Sage this way?

No, it's binary only. See https://wiki.sagemath.org/Conda section "Conda for sage developers" if you want to do that.
(Btw, that hasn't been updated in a while and might not work due to a recent restructure of sage build system)

Isuru

Dima Pasechnik

unread,
Nov 11, 2021, 5:38:13 PM11/11/21
to sage-devel
On Thu, Nov 11, 2021 at 10:10 PM Isuru Fernando <isu...@gmail.com> wrote:
> Am I right that it's possible to change Sage's Cython files in such an installation, and  update Sage this way?

No, it's binary only. See https://wiki.sagemath.org/Conda section "Conda for sage developers" if you want to do that.
(Btw, that hasn't been updated in a while and might not work due to a recent restructure of sage build system)

I'm checking it now on macOS 11, did few changes already.
 

Dima Pasechnik

unread,
Nov 11, 2021, 6:15:33 PM11/11/21
to sage-devel
Conda's pari packages are a bit broken (they are per env, but not
quite), and this test fails:

configure:21400: result: libpari's datadir does not match GP's datadir. Not good
configure:21449: no suitable system package found for SPKG pari

namely, GP's datadir is
/Users/dima/opt/miniconda3/envs/sage-build/share/pari
but libpari's datadir is
/Users/dima/opt/miniconda3/envs/sage/share/pari

and if I try "mamba install pari" I just get

All requested packages already installed.

I suppose I don't understand conda's environments well - how does one tell
conda to install pari (and libpari) into sage-build?



On Thu, Nov 11, 2021 at 9:56 PM Isuru Fernando <isu...@gmail.com> wrote:
>
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CA%2B01voOYmV5hZAnoRjN-zw6v8A6qvLHHYhZ75firWG%2BGg6a6Lg%40mail.gmail.com.

Isuru Fernando

unread,
Nov 11, 2021, 6:49:18 PM11/11/21
to sage-devel
It's not good to have two conda environments. I'm not sure how you got them both involved in the build.

`mamba install pari -n sage-build` will install sage in `sage-build` env.

Isuru

Dima Pasechnik

unread,
Nov 11, 2021, 6:51:51 PM11/11/21
to sage-devel
On Thu, Nov 11, 2021 at 11:49 PM Isuru Fernando <isu...@gmail.com> wrote:
>
> It's not good to have two conda environments. I'm not sure how you got them both involved in the build.
hmm. First I just installed Sage 9.4 as a conda package, (getting sage
env), and then
tried your sage-build env. instructions.
> 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/xYQXZKVMYfM/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/CA%2B01voP8%2BR%2BjtbWJieM4Nsn7Af3QmhUMTYvySN%3DK%2B-3VX314Dg%40mail.gmail.com.

Isuru Fernando

unread,
Nov 11, 2021, 6:56:24 PM11/11/21
to sage-devel
I suggest running `conda activate sage-build` and then doing a `make dist-clean`.

Dima Pasechnik

unread,
Nov 11, 2021, 7:24:47 PM11/11/21
to sage-devel, Matthias Koeppe
anyhow, Conda for Sage Developers needs updates.
Before doing

cd src/
python setup.py install

one needs to do the same for a number of packages in
pkgs/

cd pkgs/sage-conf
python setup.py install
cd ../sage-setup
python setup.py install

and I also did

pip install memory-allocator

because some of these was failing with an error there


Perhaps Matthias can tell us more about the precise order and need.


On Thu, Nov 11, 2021 at 11:56 PM Isuru Fernando <isu...@gmail.com> wrote:
>
> I suggest running `conda activate sage-build` and then doing a `make dist-clean`.
>
> --
> 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/CA%2B01voMXPYnm3FmYZYq-4fRWkB7ttBpABBbJ%3D6p_Yaw9mNAZKw%40mail.gmail.com.

Matthias Koeppe

unread,
Nov 11, 2021, 7:27:38 PM11/11/21
to sage-devel
Invoking "setup.py install" is always wrong, it should not be used directly anymore.

Try "pip install ." instead

Matthias Koeppe

unread,
Nov 12, 2021, 1:36:00 AM11/12/21
to sage-devel
I have updated the instructions.

Dima Pasechnik

unread,
Nov 12, 2021, 5:42:09 AM11/12/21
to sage-devel
On Friday, November 12, 2021 at 6:36:00 AM UTC Matthias Koeppe wrote:
I have updated the instructions.

Thanks - are these tested?

I've changed the release version at the bottom, so that it does not look like something untouched since Sage 9.2

Matthias Koeppe

unread,
Nov 12, 2021, 12:01:23 PM11/12/21
to sage-devel
On Friday, November 12, 2021 at 2:42:09 AM UTC-8 Dima Pasechnik wrote:
On Friday, November 12, 2021 at 6:36:00 AM UTC Matthias Koeppe wrote:
I have updated the instructions.

Thanks - are these tested?

Yes, I tested them on macOS Big Sur.

 

Dima Pasechnik

unread,
Nov 12, 2021, 1:39:47 PM11/12/21
to sage-devel
hmm, by design, or in error, "make ptest" starts building all the
dependencies, e.g. maxima.
So that's not a usual environment - perhaps it should be mentioned.


>
>
>
> --
> 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/7cffbfcd-ef4c-48a4-a2ae-126677315662n%40googlegroups.com.

Matthias Koeppe

unread,
Nov 12, 2021, 3:20:24 PM11/12/21
to sage-devel
Yes, if one is not using the Sage distribution for build, one should also not use it for testing.
Use "sage -t".

Dima Pasechnik

unread,
Nov 12, 2021, 5:09:12 PM11/12/21
to sage-devel
On Friday, November 12, 2021 at 8:20:24 PM UTC Matthias Koeppe wrote:
Yes, if one is not using the Sage distribution for build, one should also not use it for testing.
Use "sage -t".

that's not nice. Should we have a ./configure option that just blesses all deps as "coming from the system"?

Matthias Koeppe

unread,
Nov 12, 2021, 5:17:05 PM11/12/21
to sage-devel
No, we should revise the documentation so that it does not advertise "make ....test" any more.

Matthias Koeppe

unread,
Nov 12, 2021, 5:20:29 PM11/12/21
to sage-devel
I have added this as a task to https://trac.sagemath.org/ticket/30453

Dima Pasechnik

unread,
Nov 12, 2021, 5:47:12 PM11/12/21
to sage-devel
On Fri, Nov 12, 2021 at 10:17 PM Matthias Koeppe
<matthia...@gmail.com> wrote:
>
> No, we should revise the documentation so that it does not advertise "make ....test" any more.

No, if we use autotools/make to build a project, there should be
meaningful make targets for testing too, force
people to learn peculiarities of tox or whatever the latest Python
testing rage is, is wrong.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/b316b9ed-c5d9-4ac6-9717-ffb275ea267fn%40googlegroups.com.

Dima Pasechnik

unread,
Nov 12, 2021, 5:50:57 PM11/12/21
to sage-devel
On Fri, Nov 12, 2021 at 10:46 PM Dima Pasechnik <dim...@gmail.com> wrote:
>
> On Fri, Nov 12, 2021 at 10:17 PM Matthias Koeppe
> <matthia...@gmail.com> wrote:
> >
> > No, we should revise the documentation so that it does not advertise "make ....test" any more.
>
> No, if we use autotools/make to build a project, there should be
> meaningful make targets for testing too, force
> people to learn peculiarities of tox or whatever the latest Python
> testing rage is, is wrong.

Besides, in the use case we're taking about, ./configure produces
results which are
wrong for the purposes of the further use, which is not to build any
packages, but only sagelib.
Let's stop this confusion - I suppose then the ugly pip commands can
be replaces by "make build", no?
Reply all
Reply to author
Forward
0 new messages