Skip to content

Conversation

@cxzhong
Copy link
Contributor

@cxzhong cxzhong commented Oct 15, 2025

Because the new version of linbox contains all patches. So we can just delete the patches and bump the new version.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

@cxzhong cxzhong marked this pull request as ready for review October 15, 2025 04:53
Copilot AI review requested due to automatic review settings October 15, 2025 04:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the linbox package from version 1.7.0+sage-2024-05-18 to 1.7.1, switching from a custom Sage release to the official upstream version.

  • Updates package version and checksums for linbox 1.7.1
  • Removes several patch files that are no longer needed in the new version
  • Changes the upstream URL from a custom Sage repository to the official linbox-team repository

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
build/pkgs/linbox/package-version.txt Updates version from 1.7.0+sage-2024-05-18 to 1.7.1
build/pkgs/linbox/checksums.ini Updates checksums and upstream URL for the new version
build/pkgs/linbox/patches/43.patch Removes patch file (no longer needed)
build/pkgs/linbox/patches/42.patch Removes patch file (no longer needed)
build/pkgs/linbox/patches/41.patch Removes patch file (no longer needed)
build/pkgs/linbox/patches/310-backport.patch Removes patch file (no longer needed)
build/pkgs/linbox/patches/294.patch Removes patch file (no longer needed)
build/pkgs/linbox/patches/292.patch Removes patch file (no longer needed)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link

github-actions bot commented Oct 15, 2025

Documentation preview for this PR (built with commit f7a0e3c; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@cxzhong cxzhong requested a review from orlitzky October 15, 2025 07:25
@cxzhong
Copy link
Contributor Author

cxzhong commented Oct 15, 2025

The CI fails seems irrelevant.

@cxzhong cxzhong requested review from dimpase and user202729 October 18, 2025 16:53
@dimpase
Copy link
Member

dimpase commented Oct 20, 2025

@jhpalmieri - could you check that this works on your very new Apple hard/software?

@jhpalmieri
Copy link
Member

I don't have particularly new hardware, but the software is up-to-date. This builds on two different OS X machines. If I see any doctest failures that might be related, I will let you know, but if I don't update this, assume it's fine.

@cxzhong
Copy link
Contributor Author

cxzhong commented Oct 20, 2025

I don't have particularly new hardware, but the software is up-to-date. This builds on two different OS X machines. If I see any doctest failures that might be related, I will let you know, but if I don't update this, assume it's fine.

Thank you.

Copy link
Member

@dimpase dimpase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testing on linux goes well too.

vbraun pushed a commit to vbraun/sage that referenced this pull request Oct 26, 2025
sagemathgh-41044: Update linbox to 1.7.1
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->
Because the new version of linbox contains all patches. So we can just
delete the patches and bump the new version.


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#41044
Reported by: Chenxin Zhong
Reviewer(s): Copilot, Dima Pasechnik
@vbraun
Copy link
Member

vbraun commented Oct 26, 2025

On ubuntu 12 I'm getting

[sagelib-10.8.beta7] [spkg-install]   FAILED: [code=1] src/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p/meson-generated_src_sage_libs_linbox_linbox_flint_interface.pyx.cpp.o
[sagelib-10.8.beta7] [spkg-install]   g++ -std=gnu++11 -Isrc/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p -Isrc/sage/libs/linbox -I../../src/sage/libs/linbox -Isrc/sage/libs/flint -I../../src/sage/libs/flint -I/var/lib/buildbot/worker/sage_git/build/local/var/lib/sage/venv-python3.12.5/include/python3.12 -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -O3 -g -O2 -fPIC -DDISABLE_COMMENTATOR -pthread -DFFLAS_COMPILED -DFFPACK_COMPILED -MD -MQ src/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p/meson-generated_src_sage_libs_linbox_linbox_flint_interface.pyx.cpp.o -MF src/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p/meson-generated_src_sage_libs_linbox_linbox_flint_interface.pyx.cpp.o.d -o src/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p/meson-generated_src_sage_libs_linbox_linbox_flint_interface.pyx.cpp.o -c src/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p/src/sage/libs/linbox/linbox_flint_interface.pyx.cpp
[sagelib-10.8.beta7] [spkg-install]   In file included from /var/lib/buildbot/worker/sage_git/build/local/include/flint/ca.h:22,
[sagelib-10.8.beta7] [spkg-install]                    from ../../src/sage/libs/flint/flint_wrap.h:69,
[sagelib-10.8.beta7] [spkg-install]                    from src/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p/src/sage/libs/linbox/linbox_flint_interface.pyx.cpp:1136:
[sagelib-10.8.beta7] [spkg-install]   /var/lib/buildbot/worker/sage_git/build/local/include/flint/fexpr.h: In function 'int fexpr_is_builtin_symbol(const fexpr_struct*, mp_limb_signed_t)':
[sagelib-10.8.beta7] [spkg-install]   /var/lib/buildbot/worker/sage_git/build/local/include/flint/fexpr.h:313:116: warning: comparison of integer expressions of different signedness: 'mp_limb_t' {aka 'long unsigned int'} and 'mp_limb_signed_t' {aka 'long int'} [-Wsign-compare]
[sagelib-10.8.beta7] [spkg-install]     313 |     return (FEXPR_TYPE(head) == FEXPR_TYPE_SMALL_SYMBOL) && (((head >> 8) & 0xff) == 0) && (FEXPR_BUILTIN_ID(head) == i);
[sagelib-10.8.beta7] [spkg-install]         |                                                                                                                    ^
[sagelib-10.8.beta7] [spkg-install]   src/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p/src/sage/libs/linbox/linbox_flint_interface.pyx.cpp: In function 'void __pyx_f_4sage_4libs_6linbox_22linbox_flint_interface_fmpz_mat_get_linbox(LinBox::DenseMatrix<Givaro::ZRing<Givaro::Integer> >&, fmpz_mat_struct*)':
[sagelib-10.8.beta7] [spkg-install]   src/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p/src/sage/libs/linbox/linbox_flint_interface.pyx.cpp:2227:33: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'unsigned int'} and '__pyx_t_4sage_4libs_5flint_5types_slong' {aka 'long int'} [-Wsign-compare]
[sagelib-10.8.beta7] [spkg-install]    2227 |   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
[sagelib-10.8.beta7] [spkg-install]         |                       ~~~~~~~~~~^~~~~~~~~~~
[sagelib-10.8.beta7] [spkg-install]   src/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p/src/sage/libs/linbox/linbox_flint_interface.pyx.cpp:2239:35: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'unsigned int'} and '__pyx_t_4sage_4libs_5flint_5types_slong' {aka 'long int'} [-Wsign-compare]
[sagelib-10.8.beta7] [spkg-install]    2239 |     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
[sagelib-10.8.beta7] [spkg-install]         |                         ~~~~~~~~~~^~~~~~~~~~~
[sagelib-10.8.beta7] [spkg-install]   In file included from /var/lib/buildbot/worker/sage_git/build/local/include/linbox/ring/ntl.h:44,
[sagelib-10.8.beta7] [spkg-install]                    from /var/lib/buildbot/worker/sage_git/build/local/include/linbox/ring/polynomial-ring.h:229,
[sagelib-10.8.beta7] [spkg-install]                    from src/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p/src/sage/libs/linbox/linbox_flint_interface.pyx.cpp:1158:
[sagelib-10.8.beta7] [spkg-install]   /var/lib/buildbot/worker/sage_git/build/local/include/linbox/ring/ntl/ntl-lzz_px.h: In instantiation of 'LinBox::NTL_zz_pX::Element& LinBox::NTL_zz_pX::init(Element&, const std::vector<Element>&) const [with E = Givaro::Integer; Element = NTL::zz_pX]':
[sagelib-10.8.beta7] [spkg-install]   /var/lib/buildbot/worker/sage_git/build/local/include/linbox/ring/ntl/ntl-lzz_px.h:548:8:   required from here
[sagelib-10.8.beta7] [spkg-install]   /var/lib/buildbot/worker/sage_git/build/local/include/linbox/ring/ntl/ntl-lzz_px.h:200:46: error: conversion from 'const __gnu_cxx::__alloc_traits<std::allocator<Givaro::Integer>, Givaro::Integer>::value_type' {aka 'const Givaro::Integer'} to 'long int' is ambiguous
[sagelib-10.8.beta7] [spkg-install]     200 |                                 NTL::SetCoeff( p, i, v[ (size_t) i ] );
[sagelib-10.8.beta7] [spkg-install]         |                                 ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~

@cxzhong
Copy link
Contributor Author

cxzhong commented Oct 26, 2025

On ubuntu 12 I'm getting

[sagelib-10.8.beta7] [spkg-install]   FAILED: [code=1] src/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p/meson-generated_src_sage_libs_linbox_linbox_flint_interface.pyx.cpp.o
[sagelib-10.8.beta7] [spkg-install]   g++ -std=gnu++11 -Isrc/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p -Isrc/sage/libs/linbox -I../../src/sage/libs/linbox -Isrc/sage/libs/flint -I../../src/sage/libs/flint -I/var/lib/buildbot/worker/sage_git/build/local/var/lib/sage/venv-python3.12.5/include/python3.12 -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -O3 -g -O2 -fPIC -DDISABLE_COMMENTATOR -pthread -DFFLAS_COMPILED -DFFPACK_COMPILED -MD -MQ src/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p/meson-generated_src_sage_libs_linbox_linbox_flint_interface.pyx.cpp.o -MF src/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p/meson-generated_src_sage_libs_linbox_linbox_flint_interface.pyx.cpp.o.d -o src/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p/meson-generated_src_sage_libs_linbox_linbox_flint_interface.pyx.cpp.o -c src/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p/src/sage/libs/linbox/linbox_flint_interface.pyx.cpp
[sagelib-10.8.beta7] [spkg-install]   In file included from /var/lib/buildbot/worker/sage_git/build/local/include/flint/ca.h:22,
[sagelib-10.8.beta7] [spkg-install]                    from ../../src/sage/libs/flint/flint_wrap.h:69,
[sagelib-10.8.beta7] [spkg-install]                    from src/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p/src/sage/libs/linbox/linbox_flint_interface.pyx.cpp:1136:
[sagelib-10.8.beta7] [spkg-install]   /var/lib/buildbot/worker/sage_git/build/local/include/flint/fexpr.h: In function 'int fexpr_is_builtin_symbol(const fexpr_struct*, mp_limb_signed_t)':
[sagelib-10.8.beta7] [spkg-install]   /var/lib/buildbot/worker/sage_git/build/local/include/flint/fexpr.h:313:116: warning: comparison of integer expressions of different signedness: 'mp_limb_t' {aka 'long unsigned int'} and 'mp_limb_signed_t' {aka 'long int'} [-Wsign-compare]
[sagelib-10.8.beta7] [spkg-install]     313 |     return (FEXPR_TYPE(head) == FEXPR_TYPE_SMALL_SYMBOL) && (((head >> 8) & 0xff) == 0) && (FEXPR_BUILTIN_ID(head) == i);
[sagelib-10.8.beta7] [spkg-install]         |                                                                                                                    ^
[sagelib-10.8.beta7] [spkg-install]   src/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p/src/sage/libs/linbox/linbox_flint_interface.pyx.cpp: In function 'void __pyx_f_4sage_4libs_6linbox_22linbox_flint_interface_fmpz_mat_get_linbox(LinBox::DenseMatrix<Givaro::ZRing<Givaro::Integer> >&, fmpz_mat_struct*)':
[sagelib-10.8.beta7] [spkg-install]   src/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p/src/sage/libs/linbox/linbox_flint_interface.pyx.cpp:2227:33: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'unsigned int'} and '__pyx_t_4sage_4libs_5flint_5types_slong' {aka 'long int'} [-Wsign-compare]
[sagelib-10.8.beta7] [spkg-install]    2227 |   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
[sagelib-10.8.beta7] [spkg-install]         |                       ~~~~~~~~~~^~~~~~~~~~~
[sagelib-10.8.beta7] [spkg-install]   src/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p/src/sage/libs/linbox/linbox_flint_interface.pyx.cpp:2239:35: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'unsigned int'} and '__pyx_t_4sage_4libs_5flint_5types_slong' {aka 'long int'} [-Wsign-compare]
[sagelib-10.8.beta7] [spkg-install]    2239 |     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
[sagelib-10.8.beta7] [spkg-install]         |                         ~~~~~~~~~~^~~~~~~~~~~
[sagelib-10.8.beta7] [spkg-install]   In file included from /var/lib/buildbot/worker/sage_git/build/local/include/linbox/ring/ntl.h:44,
[sagelib-10.8.beta7] [spkg-install]                    from /var/lib/buildbot/worker/sage_git/build/local/include/linbox/ring/polynomial-ring.h:229,
[sagelib-10.8.beta7] [spkg-install]                    from src/sage/libs/linbox/linbox_flint_interface.cpython-312-i386-linux-gnu.so.p/src/sage/libs/linbox/linbox_flint_interface.pyx.cpp:1158:
[sagelib-10.8.beta7] [spkg-install]   /var/lib/buildbot/worker/sage_git/build/local/include/linbox/ring/ntl/ntl-lzz_px.h: In instantiation of 'LinBox::NTL_zz_pX::Element& LinBox::NTL_zz_pX::init(Element&, const std::vector<Element>&) const [with E = Givaro::Integer; Element = NTL::zz_pX]':
[sagelib-10.8.beta7] [spkg-install]   /var/lib/buildbot/worker/sage_git/build/local/include/linbox/ring/ntl/ntl-lzz_px.h:548:8:   required from here
[sagelib-10.8.beta7] [spkg-install]   /var/lib/buildbot/worker/sage_git/build/local/include/linbox/ring/ntl/ntl-lzz_px.h:200:46: error: conversion from 'const __gnu_cxx::__alloc_traits<std::allocator<Givaro::Integer>, Givaro::Integer>::value_type' {aka 'const Givaro::Integer'} to 'long int' is ambiguous
[sagelib-10.8.beta7] [spkg-install]     200 |                                 NTL::SetCoeff( p, i, v[ (size_t) i ] );
[sagelib-10.8.beta7] [spkg-install]         |                                 ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~

I have made a pr and report to the upstream.
linbox-team/linbox#329
I will make a patch. I think it is a typo.

@dimpase
Copy link
Member

dimpase commented Oct 26, 2025

is this a 32-bit arch error?

@dimpase
Copy link
Member

dimpase commented Oct 26, 2025

maybe we should get a 32-bit CI setup

@vbraun
Copy link
Member

vbraun commented Oct 26, 2025

seems to work on 64-bit

…:Integer to long

This patch fixes compilation issues with clang/libc++ by ensuring coefficients
are properly converted via the coefficient field, avoiding ambiguous implicit
conversions when setting NTL polynomial coefficients.

Related to: linbox-team/linbox#329
@cxzhong
Copy link
Contributor Author

cxzhong commented Oct 27, 2025

seems to work on 64-bit

The patch is applied. Can you test it? I do not have 32-bit arch device. @vbraun

@cxzhong
Copy link
Contributor Author

cxzhong commented Oct 28, 2025

Thank you. @vbraun

vbraun pushed a commit to vbraun/sage that referenced this pull request Nov 1, 2025
sagemathgh-41044: Update linbox to 1.7.1
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->
Because the new version of linbox contains all patches. So we can just
delete the patches and bump the new version.


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#41044
Reported by: Chenxin Zhong
Reviewer(s): Copilot, Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this pull request Nov 2, 2025
sagemathgh-41044: Update linbox to 1.7.1
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->
Because the new version of linbox contains all patches. So we can just
delete the patches and bump the new version.


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#41044
Reported by: Chenxin Zhong
Reviewer(s): Copilot, Dima Pasechnik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants