sagemath/sage

Fixes for the conda-for-Sage-developers installation method, add GH Actions workflow

mkoeppe opened this issue · 375 comments

Add github action workflow that checks the build of sage in a conda environment, completely bypassing the installation of any sage package. This is based on the steps outlined at https://wiki.sagemath.org/Conda.

This also tests that the generated src/environment*.yml files work correctly. (See documentation added in #28745)

Run: https://github.com/sagemath/sagetrac-mirror/actions/workflows/ci-conda.yml

Fixes:

  • #33330: primecountpy is not installed in the conda env because its not listed in environment.yml
  • environment-optional: lcalc 1 is installed and then not recognized / leads to error
building 'sage.libs.lcalc.lcalc_Lfunction' extension
    cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
    In file included from sage/libs/lcalc/lcalc_Lfunction.cpp:740:
    sage/libs/lcalc/lcalc_sage.h:1:10: fatal error: lcalc/L.h: No such file or directory
        1 | #include "lcalc/L.h"
          |          ^~~~~~~~~~~
    compilation terminated.
  • environment-optional: probably related, pari 2.11.4 is installed by conda instead of the newest 2.13.2. This version is then rejected by configure as being too old.
  • Disable conda distro information for gdb because it is broken on macOS.
  • Add conda distro information for lrcalc_python
  • Filter out conda-specific ld warnings in doctests
  • In the feature test for sage_spkg, check whether any Sage packages are actually installed
  • Include an upper version bound for ptyprocess in sagemath-standard's install-requires

Follow-ups: See Meta-ticket #33331

Depends on #33358
Depends on #33330
Depends on #33361
Depends on #33141

CC: @isuruf @tobiasdiez @dimpase @saraedum

Component: build

Keywords: sd111

Author: Tobias Diez, Matthias Koeppe

Branch/Commit: 93fce5a

Reviewer: Matthias Koeppe, Dima Pasechnik, Tobias Diez

Issue created by migration from https://trac.sagemath.org/ticket/30845

Description changed:

--- 
+++ 
@@ -1 +1,2 @@
+This would also test that the generated `environment*.yml` files work correctly.
 
comment:3

Hoping we can make progress on this ticket this week - https://wiki.sagemath.org/days111

Changed keywords from none to sd111

Description changed:

--- 
+++ 
@@ -1,2 +1 @@
-This would also test that the generated `environment*.yml` files work correctly.
-
+This would also test that the generated `environment*.yml` files work correctly. (See documentation added in #28745 and https://wiki.sagemath.org/Conda)
comment:7

Something like https://github.com/tobiasdiez/sage/blob/public/build/conda_gh/.github/workflows/ci-conda.yml?

This currently fails with

configure: creating ./config.status
config.status: creating build/make/Makefile-auto
config.status: creating build/make/Makefile
config.status: creating src/bin/sage-env-config
config.status: creating src/bin/sage-src-env-config
config.status: creating build/bin/sage-build-env-config
config.status: creating build/pkgs/sage_conf/src/sage_conf.py
config.status: creating build/pkgs/sage_conf/src/setup.cfg
config.status: executing depfiles commands
config.status: executing mkdirs commands
config.status: creating directory /home/runner/work/sage/sage/logs/pkgs
config.status: creating directory 
mkdir: cannot create directory '': No such file or directory
config.status: error: could not create 
Error: Process completed with exit code 1.

https://github.com/tobiasdiez/sage/runs/1594237745?check_suite_focus=true
Any idea what could be the reason and how to fix it?

Commit: 9af4614

Author: Tobias Diez

New commits:

c68d262Add first version of workflow
9af4614Try with sudo (why is this needed now?!)

Changed commit from 9af4614 to a178b56

Branch pushed to git repo; I updated commit sha1. New commits:

5ac74eeTry with conda-incubator
a178b56Run in the conda shell

Branch pushed to git repo; I updated commit sha1. New commits:

199886cInstall more conda dependencies
10de3f5Fix conda env name
86411b8Remove unnececesary install of conda dep

Changed commit from a178b56 to 86411b8

comment:11

Managed to fix the above error, just to be stuck two lines further down:

configure: creating ./config.status
config.status: creating build/make/Makefile-auto
config.status: creating build/make/Makefile
config.status: creating src/bin/sage-env-config
config.status: creating src/bin/sage-src-env-config
config.status: creating build/bin/sage-build-env-config
config.status: creating build/pkgs/sage_conf/src/sage_conf.py
config.status: creating build/pkgs/sage_conf/src/setup.cfg
config.status: executing depfiles commands
config.status: executing broken-gcc commands
config.status: executing mkdirs commands
config.status: creating directory /home/runner/work/sage/sage/logs/pkgs
config.status: creating directory /usr/share/miniconda/envs/sage-build
config.status: creating directory /usr/share/miniconda/envs/sage-build/bin
config.status: creating directory /usr/share/miniconda/envs/sage-build/etc
config.status: creating directory /usr/share/miniconda/envs/sage-build/include
config.status: creating directory /usr/share/miniconda/envs/sage-build/lib
config.status: creating directory /usr/share/miniconda/envs/sage-build/lib/pkgconfig
config.status: creating directory /usr/share/miniconda/envs/sage-build/share
config.status: creating directory /usr/share/miniconda/envs/sage-build/var/lib/sage/installed
config.status: error: Cannot perform incremental update, run "make distclean && make"
config.status: /usr/share/miniconda/envs/sage-build/lib64 is not a symlink, see Trac #19782
Error: Process completed with exit code 1.

https://github.com/tobiasdiez/sage/runs/1594601374?check_suite_focus=true

comment:12

Found a hack that fixed it by removing the lib64 folder. It only contained libcc1.so (not sure where/how this is needed).

comment:13

Made a bit more progress, but it currently errors while compiling gcc. Moreover, there is a problem in the detection of the conda/system gcc because "sage-env-config" doesn't exist.
https://github.com/tobiasdiez/sage/runs/1594867631?check_suite_focus=true

Branch pushed to git repo; I updated commit sha1. New commits:

53503dcTry remove lib64 folder by hand
e530ac0Add c++ compiler to conda
ab47f5eInstall directly on top of conda
741c55aMake autogen work

Changed commit from 86411b8 to 741c55a

comment:15

The direct variant should use src/environment.yml - which installs the Python packages of Sage in addition to what is listed in environment.yml

comment:16

The lib64 looks like a conda packaging bug to me - @isuruf, can you help?

comment:17

environment.yml already includes compilers -- I don't think adding cxx-compiler should be necessary

Changed commit from 741c55a to 3aba048

Branch pushed to git repo; I updated commit sha1. New commits:

1231a24Add env logging and fix SAGE_SRC
be024f8Fix build
8a46d04Improve output of print_env
9802c56Improve print statement
3aba048Use correct conda env file
comment:19

Replying to @tobiasdiez:

Made a bit more progress, but it currently errors while compiling gcc. Moreover, there is a problem in the detection of the conda/system gcc because "sage-env-config" doesn't exist.
https://github.com/tobiasdiez/sage/runs/1594867631?check_suite_focus=true

This is now #31097.

Changed dependencies from #28745 to #31097

Description changed:

--- 
+++ 
@@ -1 +1 @@
-This would also test that the generated `environment*.yml` files work correctly. (See documentation added in #28745 and https://wiki.sagemath.org/Conda)
+This would also test that the generated `environment*.yml` and `src/environment*.yml` files work correctly. (See documentation added in #28745 and https://wiki.sagemath.org/Conda)
comment:22

I don't see a lib64 folder. Which package is that coming from?

comment:23

It contains libcc1.so so I guess gcc, g++ or some other compiler package.

Changed commit from 3aba048 to e9cb77b

Branch pushed to git repo; I updated commit sha1. New commits:

d853f14Ok, then install setup.py relative to src
cb5e284Add tests
1cf3de4build/pkgs/gcc/spkg-configure.m4: Fix SAGE_BROKEN_GCC test
1bc9c29Merge branch 'u/mkoeppe/build_pkgs_gcc_spkg_configure_m4__fix_sage_broken_gcc_test' of git://trac.sagemath.org/sage into public/build/conda_gh
c57d615Correct bootstrap command
e85f1baFix venv config
e29a9abCorrect test command
483de62Install autotools
8237b2cInstall gettext
e9cb77bForce configure to not install gcc
comment:25

Current status:

  • Building sage using make on top of conda fails, since gcc is not found and the custom build of gcc fails.
  • Installing sagelib on top of a conda works, but many doctests fail.

https://github.com/sagemath/sagetrac-mirror/actions?query=workflow%3A%22Build+%26+Test+using+conda%22

I let somebody else with more experience in conda/the intricacies of sage's build system take over from here.

comment:26

Thanks for getting this started!

comment:27

Unfortunately the runs do not give the config.log

comment:28

Now I finally realize that for on-top-of-spkg you were trying to do ./configure --prefix=$CONDA_PREFIX -- that can't work.

Changed commit from e9cb77b to 9857e36

Branch pushed to git repo; I updated commit sha1. New commits:

9857e36Without the prefix

Changed commit from 9857e36 to b50ae6a

Branch pushed to git repo; I updated commit sha1. New commits:

b50ae6aRemove conda gcc distro again

Branch pushed to git repo; I updated commit sha1. New commits:

68080faCleanup workflow

Changed commit from b50ae6a to 68080fa

comment:32

Replying to @mkoeppe:

Now I finally realize that for on-top-of-spkg you were trying to do ./configure --prefix=$CONDA_PREFIX -- that can't work.

Thanks! Removing the prefix part indeed fixed the gcc issue. Now we are further in the build, and find this beautiful error:

2020-12-22T21:44:17.7966259Z [cvxopt-1.2.5]   x86_64-conda_cos6-linux-gnu-gcc -pthread -shared -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/share/miniconda/envs/sage-build/lib -L/usr/share/miniconda/envs/sage-build/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/share/miniconda/envs/sage-build/lib -L/usr/share/miniconda/envs/sage-build/lib -Wl,-rpath-link,/home/runner/work/sagetrac-mirror/sagetrac-mirror/local/lib -L/home/runner/work/sagetrac-mirror/sagetrac-mirror/local/lib -Wl,-rpath,/home/runner/work/sagetrac-mirror/sagetrac-mirror/local/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/usr/share/miniconda/envs/sage-build/lib -Wl,-rpath-link,/usr/share/miniconda/envs/sage-build/lib -L/usr/share/miniconda/envs/sage-build/lib -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/share/miniconda/envs/sage-build/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /usr/share/miniconda/envs/sage-build/include build/temp.linux-x86_64-3.8/src/C/lapack.o -L/usr/share/miniconda/envs/sage-build/lib -lopenblas -lopenblas -o build/lib.linux-x86_64-3.8/cvxopt/lapack.cpython-38-x86_64-linux-gnu.so
2020-12-22T21:44:17.7974135Z [cvxopt-1.2.5]   building 'umfpack' extension
2020-12-22T21:44:17.7979362Z [cvxopt-1.2.5]   /usr/share/miniconda/envs/sage-build/bin/x86_64-conda-linux-gnu-cc -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/share/miniconda/envs/sage-build/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /usr/share/miniconda/envs/sage-build/include -fPIC -I/usr/include -I/home/runner/work/sagetrac-mirror/sagetrac-mirror/local/include -I/usr/share/miniconda/envs/sage-build/include/python3.8 -c src/C/umfpack.c -o build/temp.linux-x86_64-3.8/src/C/umfpack.o
2020-12-22T21:44:17.7990748Z [cvxopt-1.2.5]   In file included from /usr/share/miniconda/envs/sage-build/include/python3.8/Python.h:11:0,
2020-12-22T21:44:17.7991831Z [cvxopt-1.2.5]                    from src/C/cvxopt.h:22,
2020-12-22T21:44:17.7992613Z [cvxopt-1.2.5]                    from src/C/umfpack.c:22:
2020-12-22T21:44:17.7993750Z [cvxopt-1.2.5]   /usr/include/limits.h:26:10: fatal error: bits/libc-header-start.h: No such file or directory
2020-12-22T21:44:17.7994924Z [cvxopt-1.2.5]    #include <bits/libc-header-start.h>
2020-12-22T21:44:17.7995741Z [cvxopt-1.2.5]             ^~~~~~~~~~~~~~~~~~~~~~~~~~
2020-12-22T21:44:17.7996470Z [cvxopt-1.2.5]   compilation terminated.
2020-12-22T21:44:17.7997728Z [cvxopt-1.2.5]   error: command '/usr/share/miniconda/envs/sage-build/bin/x86_64-conda-linux-gnu-cc' failed with exit status 1
2020-12-22T21:44:17.7999070Z [cvxopt-1.2.5]   Building wheel for cvxopt (setup.py): finished with status 'error'

Could this be related to the fact that libcc1 is installed in lib64?

comment:33

This is known. #30710

comment:34

Ah thx for the pointer!

comment:35

I guess the main objective of this ticket was to add a workflow verifying that sagelib installed on top of conda works. Since this is accomplished, I'll put it as ready for review.

Fixing the doctests and the build using make can be done later (e.g by resolving #30710).

comment:36

As on-top-of-spkg turns out to be a variant of local-conda-forge-ubuntu-standard, I think I would want to implement this variant using tox.

comment:37

I have opened #31099 for this.

comment:38

Replying to @mkoeppe:

As on-top-of-spkg turns out to be a variant of local-conda-forge-ubuntu-standard, I think I would want to implement this variant using tox.

I thought about using tox as well, but there are

a) problems setting up conda on github actions (this is why the workflow uses a special action for the conda setup)

b) difficulties with conda and tox environment interactions (which I guess are handled by the tox-conda plugin, but I didn't wanted to dive into this)

c) I still think tox is not the right tool for managing the user's environment beyond the Python environment.

comment:39

local-conda-forge-ubuntu-standard has been running for months on GH Actions, see for example https://github.com/sagemath/sage/runs/1553907433 for 9.3.beta4.

#31099 is just a matter of creating a variant that uses conda env create -f environment.yml instead of conda install ....

comment:40

red branch => needs work

comment:41

Moving this ticket to 9.4, as it seems unlikely that it will be merged in 9.3, which is in the release candidate stage

Changed commit from 68080fa to 103f78b

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

103f78b.github/workflows/ci-conda.yml: New
comment:44

I have reduced the branch to one of the jobs, direct, to remove the duplication with the existing workflows.

Changed dependencies from #31097 to none

comment:45

Still needs updating to follow the steps of "Conda for Sage Developers" - https://wiki.sagemath.org/Conda - help welcome

Description changed:

--- 
+++ 
@@ -1 +1 @@
-This would also test that the generated `environment*.yml` and `src/environment*.yml` files work correctly. (See documentation added in #28745 and https://wiki.sagemath.org/Conda)
+This would also test that the generated  `src/environment*.yml` files work correctly. (See documentation added in #28745 and https://wiki.sagemath.org/Conda)

Last 10 new commits:

65e1b49Fix workflow syntax
85c31c3Make workflow at least try to compile sage
fd484d8Github needs sudo
909cd9eAdd a few missing python packages
a91da81Run in parallel
d4945e5Install gap manually
3171f82Split in more jobs
b87f2bcReuse existing bootstrap
eec7abcDelete env-python from gitignore again
68e8330Try with prefix instead of building ecl and gap

Changed commit from 103f78b to 68e8330

Description changed:

--- 
+++ 
@@ -1 +1,7 @@
 This would also test that the generated  `src/environment*.yml` files work correctly. (See documentation added in #28745 and https://wiki.sagemath.org/Conda)
+
+Run: https://github.com/sagemath/sagetrac-mirror/runs/5146995129?check_suite_focus=true
+
+Issues:
+- rpy2 is not installed in the conda env
+- exits without error message during or after compilation of sage/symbolic/ginac/ptr.h
comment:50

Okay, this is now ready for review.

Any pointers to the two open issues are welcome. I looked for open tickets in these directions, but couldn't find one.

Description changed:

--- 
+++ 
@@ -1,7 +1,16 @@
-This would also test that the generated  `src/environment*.yml` files work correctly. (See documentation added in #28745 and https://wiki.sagemath.org/Conda)
+Add github action workflow that checks the build of sage in a conda environment, completely bypassing the installation of any sage package. This follows the steps outlined at https://wiki.sagemath.org/Conda.
 
-Run: https://github.com/sagemath/sagetrac-mirror/runs/5146995129?check_suite_focus=true
+This also tests that the generated `src/environment*.yml` files work correctly. (See documentation added in #28745)
 
-Issues:
+Run: https://github.com/sagemath/sagetrac-mirror/actions/workflows/ci-conda.yml
+
+The build of sage currently fails with the following issues:
 - rpy2 is not installed in the conda env
-- exits without error message during or after compilation of sage/symbolic/ginac/ptr.h
+- exits without error message during or after compilation of sage/symbolic/ginac/ptr.h after complaining multiple times that `other.p` in 
+
+```
+	ptr(const ptr & other) throw() : p(other.p) { p->add_reference(); }
+```
+is used uninitialized in this function
+
+Fixing these problems will be addressed in a follow-up ticket.

Branch pushed to git repo; I updated commit sha1. New commits:

b408f9eCleanup workflow

Changed commit from 68e8330 to b408f9e

comment:52

In https://github.com/sagemath/sagetrac-mirror/runs/5146995129?check_suite_focus=true I see

I see

building 'sage.libs.lcalc.lcalc_Lfunction' extension
    cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
    In file included from sage/libs/lcalc/lcalc_Lfunction.cpp:740:
    sage/libs/lcalc/lcalc_sage.h:1:10: fatal error: lcalc/L.h: No such file or directory
        1 | #include "lcalc/L.h"
          |          ^~~~~~~~~~~
    compilation terminated.
    building 'sage.libs.libecm' extension

Description changed:

--- 
+++ 
@@ -12,5 +12,17 @@
 	ptr(const ptr & other) throw() : p(other.p) { p->add_reference(); }
 ```
 is used uninitialized in this function
+- lcalc is not recognized although installed in conda
+
+```
+building 'sage.libs.lcalc.lcalc_Lfunction' extension
+    cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
+    In file included from sage/libs/lcalc/lcalc_Lfunction.cpp:740:
+    sage/libs/lcalc/lcalc_sage.h:1:10: fatal error: lcalc/L.h: No such file or directory
+        1 | #include "lcalc/L.h"
+          |          ^~~~~~~~~~~
+    compilation terminated.
+```
+- maybe related, pari 2.11.4 is installed by conda instead of the newest 2.13.2. This version is then rejected by `configure` as being too old.
 
 Fixing these problems will be addressed in a follow-up ticket.
comment:54

Good observation. I think, however, this is not the reason why the build terminates as this error occurs somewhere in the middle (and I had similar error messages with gap before).
I've added it to the list of "issues" in the ticket description.

comment:55

This is the reason for the failure. There's no mystery there.

comment:56

Do you get lcalc>=2 with conda?

comment:57

Replying to @mkoeppe:

This is the reason for the failure. There's no mystery there.

Could be. But the point of this ticket is to add the github action, so that one can fix these issues in follow-up tickets and have a direct verification. It might take quite some time until this workflow is green, especially since there are probably quite a few tests that fail.

So except if you think that there is something fundamentally flawed with the current steps which result in the lcalc error, this should be ready for review.

comment:58

Replying to @isuruf:

Do you get lcalc>=2 with conda?

Nope, its installing lcalc 1.23 h0d16fac_1004 conda-forge. That's probably the reason why its not working.

comment:59

So build/pkgs/lcalc/distros/conda.txt should be changed

comment:60

Replying to @tobiasdiez:

the point of this ticket is to add the github action

Well, it fails early, so we cannot see whether the later steps work.

comment:61

Replying to @mkoeppe:

So build/pkgs/lcalc/distros/conda.txt should be changed

I don't think it will be that easy to solve:

mamba install lcalc=2.0.5 -n sage-dev
 > package libeantic-1.0.2-hf1f868f_1 requires antic >=0.2.4,<0.3.0a0, but none of the providers can be installed

mamba install libeantic=1.1.0 -n sage-dev
 > package libeantic-1.1.0-h52e3b27_0 requires arb >=2.21.1,<2.22.0a0, but none of the providers can be installed

mamba install arb=2.21.1 -n sage-dev
 > package e-antic-1.0.2-hf1f868f_0 requires arb >=2.19.0,<2.20.0a0, but none of the providers can be installed

I appears that there is a funny cyclic dependency thing going on.

comment:62

Replying to @mkoeppe:

Replying to @tobiasdiez:

the point of this ticket is to add the github action

Well, it fails early, so we cannot see whether the later steps work.

Should I un-comment the last test step for now?

comment:63

Try switching from src/environment-optional.yml to src/environment.yml.
e_antic is an optional package for Sage. Let's try without optional packages first.

Branch pushed to git repo; I updated commit sha1. New commits:

051b7b5Don't use -optional env

Changed commit from b408f9e to 051b7b5

comment:65

That should indeed work to get loalc 2.0.5. Good suggestion.

For the record: first installing environment.yml and then updating the env to environment-optional.yml yields the following downgrade of packgages:

  Downgrade:
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

  - arb                                               2.22.1  hbbd85db_0              installed
  + arb                                               2.19.0  h7e34412_0              conda-forge/linux-64        7MB
  - boost-cpp                                         1.77.0  h359cf19_1              installed
  + boost-cpp                                         1.74.0  h312852a_4              conda-forge/linux-64     Cached
  - cvxopt                                             1.2.7  py310h9fd565e_1         installed
  + cvxopt                                             1.2.6  py38h55e5319_0          conda-forge/linux-64     Cached
  - cysignals                                         1.11.2  py310h15010d2_0         installed
  + cysignals                                         1.10.3  py38hd3cf888_0          conda-forge/linux-64     Cached
  - eclib                                           20210625  h52f5ea4_4              installed
  + eclib                                           20190909  h5b7fb09_3              conda-forge/linux-64       36MB
  - gap-core                                          4.11.1  h1725ef4_2              installed
  + gap-core                                          4.11.0  h1725ef4_7              conda-forge/linux-64       67MB
  - gap-defaults                                      4.11.1  ha770c72_2              installed
  + gap-defaults                                      4.11.0  ha770c72_7              conda-forge/linux-64       88MB
  - gsl                                                  2.7  he838d99_0              installed
  + gsl                                                  2.6  he838d99_2              conda-forge/linux-64     Cached
  - harfbuzz                                           3.3.1  hb4a5f5f_0              installed
  + harfbuzz                                           3.1.1  h83ec7ef_0              conda-forge/linux-64     Cached
  - icu                                                 69.1  h9c3ff4c_0              installed
  + icu                                                 68.2  h9c3ff4c_0              conda-forge/linux-64     Cached
  - lcalc                                              2.0.5  h8cd7e2e_0              installed
  + lcalc                                               1.23  h0d16fac_1004           conda-forge/linux-64     Cached
  - libclang                                          13.0.1  default_hc23dcda_0      installed
  + libclang                                          11.1.0  default_ha53f305_1      conda-forge/linux-64     Cached
  - libflint                                           2.8.4  hd3cd37b_ntl_100        installed
  + libflint                                           2.6.3  h6b702e8_0              conda-forge/linux-64       11MB
  - libpq                                               14.2  hd57d9b9_0              installed
  + libpq                                               13.5  hd57d9b9_1              conda-forge/linux-64     Cached
  - libuv                                             1.43.0  h7f98852_0              installed
  + libuv                                             1.42.0  h7f98852_0              conda-forge/linux-64     Cached
  - pari                                              2.13.3  h82e6b41_1_pthread      installed
  + pari                                              2.11.4  hddaffa3_2              conda-forge/linux-64     Cached
  - python                                            3.10.2  h85951f9_3_cpython      installed
  + python                                            3.8.12  ha38a3c6_3_cpython      conda-forge/linux-64     Cached
  - python_abi                                          3.10  2_cp310                 installed
  + python_abi                                           3.8  2_cp38                  conda-forge/linux-64     Cached
  - r-base                                             4.1.2  hde4fec0_0              installed
  + r-base                                             4.1.1  hb67fd72_0              conda-forge/linux-64     Cached
  - singular                                        4.2.1.p3  haca423c_0              installed
  + singular                                        4.1.1.p2  ha188dad_4              conda-forge/linux-64       22MB

comment:66

There must be some outdated pins / version constraints in the conda-forge packaging. Likely related to the fact that the Sage distribution has fallen behind upstream regarding e_antic/normaliz (see #31588).

comment:67

@isuruf, I think Sage works fine with current upstream versions of normaliz/pynormaliz that use the e_antic 1.x series, so it should be safe to remove such constraints. (We just can't yet update within the Sage distribution because of portability bugs in e_antic, see #31588.)

comment:68

Replying to @mkoeppe:

So build/pkgs/lcalc/distros/conda.txt should be changed

... to say "lcalc >=2"

Description changed:

--- 
+++ 
@@ -5,7 +5,7 @@
 Run: https://github.com/sagemath/sagetrac-mirror/actions/workflows/ci-conda.yml
 
 The build of sage currently fails with the following issues:
-- rpy2 is not installed in the conda env
+- The correct version of rpy2, scipy, sphinx among other packages is not installed in the conda env
 - exits without error message during or after compilation of sage/symbolic/ginac/ptr.h after complaining multiple times that `other.p` in 
 
 ```
comment:70

Regarding the pari issue mentioned in the ticket description, we should probably use configure --with-system-pari=force so the error is signalled earlier

Let's also keep the instructions in https://wiki.sagemath.org/Conda updated.

comment:71

Oh, and configure --with-system-lcalc=force too...

Description changed:

--- 
+++ 
@@ -12,7 +12,7 @@
 	ptr(const ptr & other) throw() : p(other.p) { p->add_reference(); }
 ```
 is used uninitialized in this function
-- lcalc is not recognized although installed in conda
+- environment-optional: lcalc 1 is installed and then not recognized / leads to error
 
 ```
 building 'sage.libs.lcalc.lcalc_Lfunction' extension
@@ -23,6 +23,6 @@
           |          ^~~~~~~~~~~
     compilation terminated.
 ```
-- maybe related, pari 2.11.4 is installed by conda instead of the newest 2.13.2. This version is then rejected by `configure` as being too old.
+- environment-optional: probably related, pari 2.11.4 is installed by conda instead of the newest 2.13.2. This version is then rejected by `configure` as being too old.
 
 Fixing these problems will be addressed in a follow-up ticket.
comment:74

Replying to @mkoeppe:

Regarding the pari issue mentioned in the ticket description, we should probably use configure --with-system-pari=force so the error is signalled earlier

Let's also keep the instructions in https://wiki.sagemath.org/Conda updated.

With the basic env, its now also using pari 2.13.3.

I guess some of the optional packages is lagging behind a bit and still requiring some older version of some package. This then leads to these various downgrades of arb, ecl, pari, lcalc etc

comment:75

Yes, and we are missing many of the version constraints that are in https://github.com/conda-forge/sage-feedstock/blob/master/recipe/meta.yaml

comment:76

Many of these should be added to the conda.txt files, so that they will be included in our src/environment*.yml.

Changed commit from 051b7b5 to bd65274

Branch pushed to git repo; I updated commit sha1. New commits:

bd65274Fix test command
comment:78

Okay, after using environment.yml the build now succeeds. The tests fail almost immediately at the import of sage.all, because primecountpy is not installed in the conda env (it is also in neither environment file).

I propose to get this ticket in and then work on the improvements to fix the various issues.

Description changed:

--- 
+++ 
@@ -6,7 +6,8 @@
 
 The build of sage currently fails with the following issues:
 - The correct version of rpy2, scipy, sphinx among other packages is not installed in the conda env
-- exits without error message during or after compilation of sage/symbolic/ginac/ptr.h after complaining multiple times that `other.p` in 
+- primecountpy is not installed in the conda env because its not listed in `environment.yml`
+- environment-optional: exits without error message during or after compilation of sage/symbolic/ginac/ptr.h after complaining multiple times that `other.p` in 
 
 ```
 	ptr(const ptr & other) throw() : p(other.p) { p->add_reference(); }

Description changed:

--- 
+++ 
@@ -4,7 +4,7 @@
 
 Run: https://github.com/sagemath/sagetrac-mirror/actions/workflows/ci-conda.yml
 
-The build of sage currently fails with the following issues:
+During the work on this issue the following issues have been detected:
 - The correct version of rpy2, scipy, sphinx among other packages is not installed in the conda env
 - primecountpy is not installed in the conda env because its not listed in `environment.yml`
 - environment-optional: exits without error message during or after compilation of sage/symbolic/ginac/ptr.h after complaining multiple times that `other.p` in 

Description changed:

--- 
+++ 
@@ -7,12 +7,6 @@
 During the work on this issue the following issues have been detected:
 - The correct version of rpy2, scipy, sphinx among other packages is not installed in the conda env
 - primecountpy is not installed in the conda env because its not listed in `environment.yml`
-- environment-optional: exits without error message during or after compilation of sage/symbolic/ginac/ptr.h after complaining multiple times that `other.p` in 
-
-```
-	ptr(const ptr & other) throw() : p(other.p) { p->add_reference(); }
-```
-is used uninitialized in this function
 - environment-optional: lcalc 1 is installed and then not recognized / leads to error
 
 ```
comment:82

Just add build/pkgs/primecountpy/distros/conda.txt

comment:83

At the current pace, it will take months before this ticket is merged. Little point in waiting for that to happen. There's a momentum now to fix it.

comment:84

comment:70, comment:71, comment:76, comment:82 are actionable