cschwan / sage-on-gentoo

(Unofficial) Gentoo Overlay for Sage- and Sage-related ebuilds
80 stars 26 forks source link

sci-mathematics/sagemath-standard-10.4: build failure: #789

Open CaptainBloodz opened 1 month ago

CaptainBloodz commented 1 month ago

emerge -pv sci-mathematics/sagemath-standard Dependency resolution took 167.61 s (backtrack: 0/20).

[ebuild N ~] sci-mathematics/sagemath-standard-10.4::sage-on-gentoo USE="-X -debug -doc jmol -latex -test" PYTHON_TARGETS="-python3_10 python3_11 -python3_12" 0 KiB

sci-mathematics:sagemath-standard-10.4:20240721-133007.log.gz

egrf sci-mathematics/sagemath-standard

jiffygist commented 1 month ago

I had to update sci-mathematics/flint to 3.1.3

CaptainBloodz commented 1 month ago

I had to update sci-mathematics/flint to 3.1.3

Working here, indeed.

kiwifb commented 1 month ago

Indeed signature of an error with flint. But I cannot remember why it had to be updated or why I did not bump the dependency over 3.1.0. In any case I will have to raise it to force the update. And of course it does cause rebuilds, some of whom had to be forced on my machine.

strogdon commented 1 month ago

Could something other than flint be the issue? I built sagemath-standard-9999 (which is sagemath-standard-10.4) yesterday without issue and I have flint-3.1.0 installed.

CaptainBloodz commented 1 month ago

Did flint-3.1.0 first where sci-mathematics/sagemath-standard-10.4 failed (+ a few depedencies update aka sci-libs/givaro, sci-libs/fflas-ffpack & sci-libs/linbox) Then only flint-3.1.3_p1 to succeed.

kiwifb commented 1 month ago

OK technically, flint-3.0.x or flint-3.1.x should be usable. There was no change of sage's code related to updates to flint-3.1.0, 3.1.2 or 3.1.3. But flint may have needed a rebuild after gmp or another of its dependency was updated - but not picked up.

/usr/include/flint/mpoly.h:1366:43: error: expected ')' before '__extension__'
 1366 | void mpoly_gcd_info_init(mpoly_gcd_info_t I, slong nvars);
      |                                           ^
In file included from sage/libs/flint/flint_wrap.h:29,
                 from /var/no-tmpfs/portage/sci-mathematics/sagemath-standard-10.4/work/sagemath_standard-10.4-python3_11/build/cythonized/sage/matrix/change_ring.c:1274:
/usr/include/flint/mpoly.h:1366:46: error: expected ';', ',' or ')' before 'mp_limb_signed_t'
 1366 | void mpoly_gcd_info_init(mpoly_gcd_info_t I, slong nvars);
      |                                              ^~~~~
/usr/include/flint/mpoly.h:1368:44: error: expected ')' before '__extension__'
 1368 | void mpoly_gcd_info_clear(mpoly_gcd_info_t I);
      |                                            ^
/usr/include/flint/mpoly.h:1381:47: error: expected ')' before '__extension__'
 1381 | void mpoly_gcd_info_set_perm(mpoly_gcd_info_t I,
      |                                               ^
/usr/include/flint/mpoly.h:1382:26: error: expected ';', ',' or ')' before 'mp_limb_signed_t'
 1382 |                          slong Alength, slong Blength, const mpoly_ctx_t mctx);
      |                          ^~~~~
/usr/include/flint/mpoly.h:1384:67: error: expected ')' before '__extension__'
 1384 | slong mpoly_gcd_info_get_brown_upper_limit(const mpoly_gcd_info_t I,
      |                                                                   ^
/usr/include/flint/mpoly.h:1385:56: error: expected ';', ',' or ')' before 'mp_limb_signed_t'
 1385 |                                                        slong var, slong bound);
      |                                                        ^~~~~
/usr/include/flint/mpoly.h:1387:53: error: expected ')' before '__extension__'
 1387 | void mpoly_gcd_info_measure_hensel(mpoly_gcd_info_t I,
      |                                                     ^
/usr/include/flint/mpoly.h:1388:26: error: expected ';', ',' or ')' before 'mp_limb_signed_t'
 1388 |                          slong Alength, slong Blength, const mpoly_ctx_t mctx);
      |                          ^~~~~
/usr/include/flint/mpoly.h:1390:52: error: expected ')' before '__extension__'
 1390 | void mpoly_gcd_info_measure_brown(mpoly_gcd_info_t I,
      |                                                    ^
/usr/include/flint/mpoly.h:1391:26: error: expected ';', ',' or ')' before 'mp_limb_signed_t'
 1391 |                          slong Alength, slong Blength, const mpoly_ctx_t mctx);
      |                          ^~~~~
/usr/include/flint/mpoly.h:1393:50: error: expected ')' before '__extension__'
 1393 | void mpoly_gcd_info_measure_bma(mpoly_gcd_info_t I,
      |                                                  ^
/usr/include/flint/mpoly.h:1394:26: error: expected ';', ',' or ')' before 'mp_limb_signed_t'
 1394 |                          slong Alength, slong Blength, const mpoly_ctx_t mctx);
      |                          ^~~~~
/usr/include/flint/mpoly.h:1396:53: error: expected ')' before '__extension__'
 1396 | void mpoly_gcd_info_measure_zippel(mpoly_gcd_info_t I,
      |                                                     ^
/usr/include/flint/mpoly.h:1397:26: error: expected ';', ',' or ')' before 'mp_limb_signed_t'
 1397 |                          slong Alength, slong Blength, const mpoly_ctx_t mctx);
      |                          ^~~~~
/usr/include/flint/mpoly.h:1399:54: error: expected ')' before '__extension__'
 1399 | void mpoly_gcd_info_measure_zippel2(mpoly_gcd_info_t I,
      |                                                      ^
/usr/include/flint/mpoly.h:1400:26: error: expected ';', ',' or ')' before 'mp_limb_signed_t'
 1400 |                          slong Alength, slong Blength, const mpoly_ctx_t mctx);
      |                          ^~~~~
/usr/include/flint/fmpz_mpoly.h:1091:105: error: expected ')' before '__extension__'
 1091 | void fmpz_mpoly_reduction_primitive_part(fmpz_mpoly_t res, const fmpz_mpoly_t f, const fmpz_mpoly_vec_t I, const fmpz_mpoly_ctx_t ctx);
      |                                                                                                         ^
In file included from /usr/include/flint/fmpz_mpoly_q.h:26,
                 from /usr/include/flint/ca.h:22,
                 from sage/libs/flint/flint_wrap.h:61:
/usr/include/flint/fmpz_mpoly.h:1091:108: error: expected ';', ',' or ')' before 'const'
 1091 | void fmpz_mpoly_reduction_primitive_part(fmpz_mpoly_t res, const fmpz_mpoly_t f, const fmpz_mpoly_vec_t I, const fmpz_mpoly_ctx_t ctx);
      |                                                                                                            ^~~~~
/usr/include/flint/fmpz_mod_mpoly_factor.h:1206:54: error: expected ')' before '__extension__'
 1206 | int fmpz_mod_mpoly_pfrac_init(fmpz_mod_mpoly_pfrac_t I,
      |                                                      ^
/usr/include/flint/fmpz_mod_mpoly_factor.h:1207:5: error: expected ';', ',' or ')' before 'mp_limb_t'
 1207 |     flint_bitcnt_t bits, slong l, slong r, const fmpz_mod_mpoly_struct * betas,
      |     ^~~~~~~~~~~~~~
/usr/include/flint/fmpz_mod_mpoly_factor.h:1210:56: error: expected ')' before '__extension__'
 1210 | void fmpz_mod_mpoly_pfrac_clear(fmpz_mod_mpoly_pfrac_t I,
      |                                                        ^
In file included from sage/libs/flint/flint_wrap.h:92:
/usr/include/flint/fmpz_mod_mpoly_factor.h:1211:47: error: expected ';', ',' or ')' before 'const'
 1211 |                                               const fmpz_mod_mpoly_ctx_t ctx);
      |                                               ^~~~~
/usr/include/flint/fmpz_mod_mpoly_factor.h:1214:45: error: expected ')' before '__extension__'
 1214 |                      fmpz_mod_mpoly_pfrac_t I, const fmpz_mod_mpoly_ctx_t ctx);
      |                                             ^
/usr/include/flint/fmpz_mod_mpoly_factor.h:1214:48: error: expected ';', ',' or ')' before 'const'
 1214 |                      fmpz_mod_mpoly_pfrac_t I, const fmpz_mod_mpoly_ctx_t ctx);
      |                                                ^~~~~
/usr/include/flint/fmpz_mod_mpoly_factor.h:1293:28: error: expected ')' before '__extension__'
 1293 |     const mpoly_gcd_info_t I,
      |                            ^
/usr/include/flint/fmpz_mod_mpoly_factor.h:1294:5: error: expected ';', ',' or ')' before 'fmpz_mod_poly_polyun_mpolyn_stack_t'
 1294 |     fmpz_mod_poly_polyun_mpolyn_stack_t St);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/flint/nmod_mpoly.h:1624:77: error: expected ')' before '__extension__'
 1624 |                          const nmod_mpoly_ctx_t ctx, const mpoly_gcd_info_t I,
      |                                                                             ^
In file included from /usr/include/flint/fmpz_mpoly_factor.h:24,
                 from sage/libs/flint/flint_wrap.h:97:
/usr/include/flint/nmod_mpoly.h:1625:58: error: expected ';', ',' or ')' before 'nmod_poly_stack_t'
 1625 |                                                          nmod_poly_stack_t Sp);
      |                                                          ^~~~~~~~~~~~~~~~~
/usr/include/flint/nmod_mpoly.h:1630:77: error: expected ')' before '__extension__'
 1630 |                          const nmod_mpoly_ctx_t ctx, const mpoly_gcd_info_t I,
      |                                                                             ^
/usr/include/flint/nmod_mpoly.h:1631:25: error: expected ';', ',' or ')' before 'const'
 1631 |                         const thread_pool_handle * handles, slong num_workers);
      |                         ^~~~~
/usr/include/flint/fmpz_mpoly_factor.h:301:77: error: expected ')' before '__extension__'
  301 |                          const fmpz_mpoly_ctx_t ctx, const mpoly_gcd_info_t I);
      |                                                                             ^
/usr/include/flint/fmpz_mpoly_factor.h:305:77: error: expected ')' before '__extension__'
  305 |                          const fmpz_mpoly_ctx_t ctx, const mpoly_gcd_info_t I,
      |                                                                             ^
/usr/include/flint/fmpz_mpoly_factor.h:306:25: error: expected ';', ',' or ')' before 'const'
  306 |                         const thread_pool_handle * handles, slong num_handles);
      |                         ^~~~~
/usr/include/flint/fmpz_mpoly_factor.h:343:45: error: expected ')' before '__extension__'
  343 | void fmpz_poly_pfrac_init(fmpz_poly_pfrac_t I);
      |                                             ^
/usr/include/flint/fmpz_mpoly_factor.h:345:46: error: expected ')' before '__extension__'
  345 | void fmpz_poly_pfrac_clear(fmpz_poly_pfrac_t I);
      |                                              ^
/usr/include/flint/fmpz_mpoly_factor.h:347:50: error: expected ')' before '__extension__'
  347 | int fmpz_poly_pfrac_precompute(fmpz_poly_pfrac_t I,
      |                                                  ^
/usr/include/flint/fmpz_mpoly_factor.h:348:43: error: expected ';', ',' or ')' before 'const'
  348 |                                           const fmpz_poly_struct * b, slong r);
      |                                           ^~~~~
/usr/include/flint/fmpz_mpoly_factor.h:351:77: error: expected ')' before '__extension__'
  351 |                                      const fmpz_poly_t A, fmpz_poly_pfrac_t I);
      |                                                                             ^
/usr/include/flint/fmpz_mpoly_factor.h:375:46: error: expected ')' before '__extension__'
  375 | int fmpz_mpoly_pfrac_init(fmpz_mpoly_pfrac_t I, flint_bitcnt_t bits,
      |                                              ^
/usr/include/flint/fmpz_mpoly_factor.h:375:49: error: expected ';', ',' or ')' before 'mp_limb_t'
  375 | int fmpz_mpoly_pfrac_init(fmpz_mpoly_pfrac_t I, flint_bitcnt_t bits,
      |                                                 ^~~~~~~~~~~~~~
/usr/include/flint/fmpz_mpoly_factor.h:379:48: error: expected ')' before '__extension__'
  379 | void fmpz_mpoly_pfrac_clear(fmpz_mpoly_pfrac_t I,
      |                                                ^
/usr/include/flint/fmpz_mpoly_factor.h:380:52: error: expected ';', ',' or ')' before 'const'
  380 |                                                    const fmpz_mpoly_ctx_t ctx);
      |                                                    ^~~~~
/usr/include/flint/fmpz_mpoly_factor.h:383:49: error: expected ')' before '__extension__'
  383 |                              fmpz_mpoly_pfrac_t I, const fmpz_mpoly_ctx_t ctx);
      |                                                 ^
/usr/include/flint/fmpz_mpoly_factor.h:383:52: error: expected ';', ',' or ')' before 'const'
  383 |                              fmpz_mpoly_pfrac_t I, const fmpz_mpoly_ctx_t ctx);
      |                                                    ^~~~~
/usr/include/flint/fq_nmod_mpoly_factor.h:430:27: error: expected ')' before '__extension__'
  430 |     fq_nmod_mpoly_pfrac_t I,
      |                           ^
/usr/include/flint/fq_nmod_mpoly_factor.h:431:5: error: expected ';', ',' or ')' before 'mp_limb_t'
  431 |     flint_bitcnt_t bits,
      |     ^~~~~~~~~~~~~~
/usr/include/flint/fq_nmod_mpoly_factor.h:438:27: error: expected ')' before '__extension__'
  438 |     fq_nmod_mpoly_pfrac_t I,
      |                           ^
In file included from sage/libs/flint/flint_wrap.h:116:
/usr/include/flint/fq_nmod_mpoly_factor.h:439:5: error: expected ';', ',' or ')' before 'const'
  439 |     const fq_nmod_mpoly_ctx_t ctx);
      |     ^~~~~
/usr/include/flint/fq_nmod_mpoly_factor.h:445:27: error: expected ')' before '__extension__'
  445 |     fq_nmod_mpoly_pfrac_t I,
      |                           ^
/usr/include/flint/fq_nmod_mpoly_factor.h:446:5: error: expected ';', ',' or ')' before 'const'
  446 |     const fq_nmod_mpoly_ctx_t ctx);
      |     ^~~~~
/usr/include/flint/nmod_mpoly_factor.h:365:46: error: expected ')' before '__extension__'
  365 | int nmod_mpoly_pfrac_init(nmod_mpoly_pfrac_t I, flint_bitcnt_t bits,
      |                                              ^
/usr/include/flint/nmod_mpoly_factor.h:365:49: error: expected ';', ',' or ')' before 'mp_limb_t'
  365 | int nmod_mpoly_pfrac_init(nmod_mpoly_pfrac_t I, flint_bitcnt_t bits,
      |                                                 ^~~~~~~~~~~~~~
/usr/include/flint/nmod_mpoly_factor.h:369:48: error: expected ')' before '__extension__'
  369 | void nmod_mpoly_pfrac_clear(nmod_mpoly_pfrac_t I,
      |                                                ^
In file included from sage/libs/flint/flint_wrap.h:148:
/usr/include/flint/nmod_mpoly_factor.h:370:52: error: expected ';', ',' or ')' before 'const'
  370 |                                                    const nmod_mpoly_ctx_t ctx);
      |                                                    ^~~~~
/usr/include/flint/nmod_mpoly_factor.h:373:49: error: expected ')' before '__extension__'
  373 |                              nmod_mpoly_pfrac_t I, const nmod_mpoly_ctx_t ctx);
      |                                                 ^
/usr/include/flint/nmod_mpoly_factor.h:373:52: error: expected ';', ',' or ')' before 'const'
  373 |                              nmod_mpoly_pfrac_t I, const nmod_mpoly_ctx_t ctx);
      |                                                    ^~~~~

As you can it points to flint, but more interestingly that flint headers themselves are inconsistent.

kiwifb commented 1 month ago

Did flint-3.1.0 first where sci-mathematics/sagemath-standard-10.4 failed (+ a few depedencies update aka sci-libs/givaro, sci-libs/fflas-ffpack & sci-libs/linbox) Then only flint-3.1.3_p1 to succeed.

I think a dependency of flint is the issue trigger, it may require a higher version of flint to be compatible.

kiwifb commented 1 month ago

Our guilty party may be a compiler update https://github.com/flintlib/flint/commit/1b93e73d00881be12e04b7f13e070214a3c9e1cc

strogdon commented 1 month ago

I'm using gcc-13.2.1_p20240210.

CaptainBloodz commented 1 month ago

sys-devel/gcc-13.3.1_p20240614 here.

kiwifb commented 1 month ago

I think we have a culprit. Since gcc-13.3.1_px is stable, I think it is appropriate to do a dependency bump. I also have to include numpy-2.0 compat so there will be a revbump of sagemath-standard later today.

kiwifb commented 1 month ago

Just double checked and the flint-3.1.3_p1 ebuild does include a patch for the flint PR I quoted above but flint-3.1.0 does not. uSo, it probably is definitely that issue. It also matches the error messages that point to I in the first instance.

kiwifb commented 1 month ago

sys-devel/gcc-13.3.1_p20240614 here.

Should actually work with gcc-13.3.1 (it does work here) are you sure you do not have gcc-14?

kiwifb commented 1 month ago

sagemath-standard-10.4-r1 pushed to the overlay with additional keywords for flint-3.1.3_p1.

strogdon commented 1 month ago

sagemath-standard-9999 builds here with gcc-13.3.1_p20240614 and flint-3.1.3_p1 installed.