Opened 16 months ago
Closed 14 months ago
#30745 closed defect (fixed)
Allow using arb, flint and ntl from Homebrew
Reported by:  mkoeppe  Owned by:  

Priority:  critical  Milestone:  sage9.3 
Component:  build: configure  Keywords:  
Cc:  dimpase, jhpalmieri, vbraun, nbruin, fbissey  Merged in:  
Authors:  Dima Pasechnik  Reviewers:  John Palmieri 
Report Upstream:  N/A  Work issues:  
Branch:  2fd95cd (Commits, GitHub, GitLab)  Commit:  2fd95cded92f24596c4484757b486bd1e99ed74c 
Dependencies:  #29719  Stopgaps: 
Description (last modified by )
 ntl/flint/singular: https://groups.google.com/d/msg/sagedevel/KXK_zxzfhIQ/0MaSLhvMAAAJ
 ecl: Reported in https://groups.google.com/d/msg/sagedevel/gFaUNw4v3aw/PdTJ5IOCgAJ
/usr/local
is leaking into our build, through wrong orders of include and/or library directives.
Critical for 9.3 because it affects a major supported platform. We should at least give a configuretime error if these installations are found on homebrew if we cannot fix this.
Change History (39)
comment:1 Changed 16 months ago by
 Description modified (diff)
comment:2 Changed 16 months ago by
comment:3 followups: ↓ 4 ↓ 5 Changed 16 months ago by
 Priority changed from blocker to major
Traditionally build systems are supposed to pick up stuff in /usr/local, so its a bit of a feature. Gentoo doesn't install anything there afaik, it is intended for stuff that users install by hand (i.e. nonportage in Gentoo). I consider it the big homebrew WTF.
Realistically, if you have stuff installed in /usr/local then you don't have a supported platform any more. Sure we should try to accommodate homebrew but imho not a blocker.
comment:4 in reply to: ↑ 3 Changed 16 months ago by
 Description modified (diff)
 Priority changed from major to critical
Replying to vbraun:
Realistically, if you have stuff installed in /usr/local then you don't have a supported platform any more. Sure we should try to accommodate homebrew but imho not a blocker.
Given that since Sage 9.1, we recommend homebrew packages that the user should install, I don't think the view that a system with homebrew installed in /usr/local
is not a "supported platform" has much practical value.
Setting it to "critical" rather than "blocker" because there is, of course, an easy remedy  just uninstall the useless homebrew packages that cause the problem.
comment:5 in reply to: ↑ 3 Changed 16 months ago by
Replying to vbraun:
Traditionally build systems are supposed to pick up stuff in /usr/local, so its a bit of a feature. Gentoo doesn't install anything there afaik, it is intended for stuff that users install by hand (i.e. nonportage in Gentoo). I consider it the big homebrew WTF.
Realistically, if you have stuff installed in /usr/local then you don't have a supported platform any more. Sure we should try to accommodate homebrew but imho not a blocker.
Despite your personal misgivings about Homebrew, this is a nonstarter, Volker, sorry. Homebrew is the most popular macOS package manager out there, and it goes without saying that we want to support as many packages there as possible, and hopefully have a proper Homebrew Sage package.
As well, many *BSD systems install their packages in /usr/local, e.g. FreeBSD (where we now have a semiworking native package, with all the deps neatly divided into native packages), OpenBSD, etc.
comment:6 Changed 16 months ago by
Trying this with tox e localhomebrewusrlocalstandard
. Building the ecl extension uses the following command line:
gcc Wnounusedresult Wsigncompare Wunreachablecode fnocommon dynamic DNDEBUG g fwrapv O3 Wall isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers Isage/libs I./sage/cpython I/Users/mkoeppe/s/sage/sagerebasing/.tox/localhomebrewusrlocalstandard/local/lib/python3.8/sitepackages/cysignals I/Users/mkoeppe/s/sage/sagerebasing/build/pkgs/sagelib/src I/Users/mkoeppe/s/sage/sagerebasing/build/pkgs/sagelib/src/sage/ext I/usr/local/Cellar/python@3.8/3.8.6/Frameworks/Python.framework/Versions/3.8/include/python3.8 I/Users/mkoeppe/s/sage/sagerebasing/.tox/localhomebrewusrlocalstandard/local/lib/python3.8/sitepackages/numpy/core/include Ibuild/cythonized I/usr/local/include I/usr/local/opt/openssl@1.1/include I/usr/local/opt/sqlite/include I/Users/mkoeppe/s/sage/sagerebasing/.tox/localhomebrewusrlocalstandard/local/include I/usr/local/Cellar/python@3.8/3.8.6/Frameworks/Python.framework/Versions/3.8/include/python3.8 c build/cythonized/sage/libs/ecl.c o build/temp.macosx10.15x86_643.8/build/cythonized/sage/libs/ecl.o fnostrictaliasing DCYTHON_CLINE_IN_TRACEBACK=1 std=c99
which indeed has /usr/local/include
in front of $SAGE_LOCAL/include
. (There is also CPATH
, which is set to $SAGE_LOCAL/include
; but CPATH
is searched "after any paths given with I options on the command line"  https://gcc.gnu.org/onlinedocs/gcc/EnvironmentVariables.html)
comment:7 Changed 16 months ago by
A related recent change was made in #29697 (sage_include_directories
: Do not add another copy of SAGE_INC, SAGE_LOCAL/lib to include dirs, library dirs).
comment:8 Changed 16 months ago by
The correct fix for ecl
is probably to call eclconfig
to determine the correct flags. #30770
comment:9 Changed 15 months ago by
arb, ntl, and flint can and should just be enabled on Homebrew. ECL is a different story, as it lacks patches.
comment:10 followup: ↓ 11 Changed 15 months ago by
It's not quite that easy, I am afraid. There are still the threading issues such as #27764
comment:11 in reply to: ↑ 10 Changed 15 months ago by
Replying to mkoeppe:
It's not quite that easy, I am afraid. There are still the threading issues such as #27764
these issues have solved themselves  I am able to build and doctest on macOS 10.15.7 with arb, ntl, flint from Homebrew just fine (with #30805 and doctest patches from the Flint 2.6 upgrade ticket).
comment:12 Changed 15 months ago by
more precisely, I see 2 doctests failing in src/sage/rings/polynomial/plural.pyx
 not sure if this is related. The rest of make ptest
passes.
comment:13 Changed 15 months ago by
 Milestone changed from sage9.2 to sage9.3
comment:14 Changed 15 months ago by
 Branch set to u/dimpase/build/brewenablearbetc
 Commit set to bb37468f15668033ab10af7c6157ef6a2a5f3379
 Component changed from build to build: configure
 Status changed from new to needs_review
my tests show that we can use Homebrew's NTL, arb, and flint, and with flint 2.6.3 patches in it's time to advertise them.
For testing, don't forget to ran make arbclean ntlclean flintclean
after installing them in Homebrew.
New commits:
bb37468  advertise NTL, flint, and arb on Homebrew

comment:15 Changed 15 months ago by
 Reviewers set to https://github.com/mkoeppe/sage/actions/runs/367237067
comment:16 Changed 14 months ago by
I'm getting some doctest errors, apparently from this. This is on OS X Big Sur with a beta release of Xcode 12.3, Sage 9.3.beta1 built from scratch:
File "src/sage/modules/fg_pid/fgp_module.py", line 130, in sage.modules.fg_pid.fgp_module Failed example: y = f.lift(3*M1.0); y Expected: (0, 13) Got: (1, 0) ********************************************************************** File "src/sage/modules/fg_pid/fgp_module.py", line 1288, in sage.modules.fg_pid.fgp_module.FGP_Module_class.coordinate_vector Failed example: Q.coordinate_vector(x, reduce=False) Expected: (0, 4) Got: (0, 8) ********************************************************************** File "src/sage/modules/fg_pid/fgp_module.py", line 1417, in sage.modules.fg_pid.fgp_module.FGP_Module_class.optimized Failed example: X Expected: [0 4 0] [0 1 0] [0 0 1] Got: [ 0 8 0] [ 0 1 0] [ 0 0 1] ********************************************************************** 3 items had failures: 1 of 45 in sage.modules.fg_pid.fgp_module 1 of 23 in sage.modules.fg_pid.fgp_module.FGP_Module_class.coordinate_vector 1 of 11 in sage.modules.fg_pid.fgp_module.FGP_Module_class.optimized [396 tests, 3 failures, 9.12 s]
and
sage t long warnlong 198.4 randomseed=0 src/sage/rings/polynomial/plural.pyx ********************************************************************** File "src/sage/rings/polynomial/plural.pyx", line 401, in sage.rings.polynomial.plural.NCPolynomialRing_plural.__dealloc__ Failed example: R2 = A2.g_algebra({y*x:x*yz, z*x:x*z+2*x, z*y:y*z2*y}, order=TermOrder('degrevlex', 2)) Exception raised: Traceback (most recent call last): File "/Users/palmieri/Sage/TESTING/sage9.3.beta1/local/lib/python3.9/sitepackages/sage/doctest/forker.py", line 720, in _run self.compile_and_execute(example, compiler, test.globs) File "/Users/palmieri/Sage/TESTING/sage9.3.beta1/local/lib/python3.9/sitepackages/sage/doctest/forker.py", line 1145, in compile_and_execute exec(compiled, globs) File "<doctest sage.rings.polynomial.plural.NCPolynomialRing_plural.__dealloc__[6]>", line 1, in <module> R2 = A2.g_algebra({y*x:x*yz, z*x:x*z+Integer(2)*x, z*y:y*zInteger(2)*y}, order=TermOrder('degrevlex', Integer(2))) File "/Users/palmieri/Sage/TESTING/sage9.3.beta1/local/lib/python3.9/sitepackages/sage/algebras/free_algebra.py", line 873, in g_algebra return g_Algebra(base_ring, cmat, dmat, names = names or self.variable_names(), File "sage/structure/factory.pyx", line 369, in sage.structure.factory.UniqueFactory.__call__ (build/cythonized/sage/structure/factory.c:2258) return self.get_object(version, key, kwds) File "sage/structure/factory.pyx", line 412, in sage.structure.factory.UniqueFactory.get_object (build/cythonized/sage/structure/factory.c:2652) obj = self.create_object(version, key, **extra_args) File "sage/rings/polynomial/plural.pyx", line 176, in sage.rings.polynomial.plural.G_AlgFactory.create_object (build/cythonized/sage/rings/polynomial/plural.cpp:5470) return NCPolynomialRing_plural(base_ring, names, c, d, order, File "sage/rings/polynomial/plural.pyx", line 334, in sage.rings.polynomial.plural.NCPolynomialRing_plural.__init__ (build/cythonized/sage/rings/polynomial/plural.cpp:6549) cdef RingWrap rw = ncalgebra(self._c, self._d, ring = P) File "sage/libs/singular/function.pyx", line 1334, in sage.libs.singular.function.SingularFunction.__call__ (build/cythonized/sage/libs/singular/function.cpp:15148) return call_function(self, args, ring, interruptible, attributes) File "sage/libs/singular/function.pyx", line 1516, in sage.libs.singular.function.call_function (build/cythonized/sage/libs/singular/function.cpp:16998) with opt_ctx: # we are preserving the global options state here File "sage/libs/singular/function.pyx", line 1518, in sage.libs.singular.function.call_function (build/cythonized/sage/libs/singular/function.cpp:16910) sig_on() cysignals.signals.SignalError: Segmentation fault
and
File "src/sage/modules/free_module_morphism.py", line 353, in sage.modules.free_module_morphism.FreeModuleMorphism.lift Failed example: f.lift([1/3]) Expected: (8, 16) Got: (20, 48) ********************************************************************** File "src/sage/modules/free_module_morphism.py", line 355, in sage.modules.free_module_morphism.FreeModuleMorphism.lift Failed example: f.lift([1/2]) Expected: (12, 24) Got: (30, 72) ********************************************************************** File "src/sage/modules/free_module_morphism.py", line 357, in sage.modules.free_module_morphism.FreeModuleMorphism.lift Failed example: f.lift([1/6]) Expected: (4, 8) Got: (10, 24) ********************************************************************** 1 item had failures: 3 of 22 in sage.modules.free_module_morphism.FreeModuleMorphism.lift
and
********************************************************************** File "src/doc/en/constructions/algebraic_geometry.rst", line 145, in doc.en.constructions.algebraic_geometry Failed example: print(L) Expected: [1]: _[1]=y _[2]=x ... Got: [1]: _[1]=y^2+y+1 _[2]=x+1 [2]: _[1]=y^2+y+1 _[2]=x+y+1 [3]: _[1]=y^2+y+1 _[2]=x+y [4]: _[1]=y^2+y+1 _[2]=x [5]: _[1]=y+1 _[2]=x^2+x+1 [6]: _[1]=y+1 _[2]=x+1 [7]: _[1]=y+1 _[2]=x [8]: _[1]=y _[2]=x^2+x+1 [9]: _[1]=y _[2]=x+1 [10]: _[1]=y _[2]=x
and maybe one or two others.
comment:17 Changed 14 months ago by
most of these errors look like the things fixed in the branch of #29719  which is marked as closed, but perhaps it's not in your/this branch yet?
comment:18 Changed 14 months ago by
The branch from #29719 is named public/packages/flint260
 you can try merging it and test again.
comment:19 Changed 14 months ago by
I've tried on another computer (running OS X 10.15.7 this time), including the branch from #29719:
sage t long randomseed=0 src/sage/functions/other.py # 1 doctest failed sage t long randomseed=0 src/sage/parallel/decorate.py # 1 doctest failed sage t long randomseed=0 src/sage/repl/preparse.py # 12 doctests failed sage t long randomseed=0 src/sage/rings/polynomial/plural.pyx # 2 doctests failed sage t long randomseed=0 src/sage/data_structures/mutable_poset.py # 1 doctest failed sage t long randomseed=0 src/sage/rings/polynomial/pbori/randompoly.py # 1 doctest failed
Most of these are due to Python 3.9, but this is new:
sage t long randomseed=0 src/sage/rings/polynomial/plural.pyx
(Details in the previous comment.)
Not only is it new, but I see this error (a) with this branch (merged with #29719), but also (b) with homebrew's flint, ntl, and arb installed but with a standard develop
branch from 9.3.beta1. If I remove those homebrew packages, the doctests pass. So just the presence of those packages is interfering with Sage's build somehow.
comment:20 Changed 14 months ago by
yes, I also see the error on plural.pyx
, only on macOS with arb, ntl, flint from Homebrew.
This is very localised (and lighly used). I'd try to reproduce it in Singular directly, but it should not really prevent this branch being merged.
Anyhow, arb has nothing to do with Singular, and I fail to see differences between ntl+flint from Homebrew and ntl+flint 2.6.3 from #29719.
That ntl and flint install in Homebrew affect (lib)Singular linked with other instances of ntl and flint is a Singular bug. I'll report it.
comment:21 Changed 14 months ago by
 Dependencies set to #29719
comment:22 Changed 14 months ago by
the plural.pyx
doctest error iso a Heisenbug. The following, i.e. repeating a part of this test a bit earlier in the lets the tests there pass for me. Needless to say, it cannot be reproduced in the Sage prompt, either.

src/sage/rings/polynomial/plural.pyx
a b cdef class NCPolynomialRing_plural(Ring): 367 367 True 368 368 sage: H is loads(dumps(H)) # indirect doctest 369 369 True 370 sage: A2.<x,y,z> = FreeAlgebra(GF(5), 3) 371 sage: R2 = A2.g_algebra({y*x:x*yz, z*x:x*z+2*x, z*y:y*z2*y}, order=TermOrder('degrevlex', 2)) 370 372 371 373 Check that :trac:`17224` is fixed:: 372 374
If you like I can add this "fix" to the branch.
alternatively, if I just change the order of tests, using randorder
option, everything works too:
./sage tp randomseed=0 randorder=42 long src/sage/rings/polynomial/plural.pyx
comment:23 followup: ↓ 24 Changed 14 months ago by
That's sweeping things under the rug. Not necessarily the worst thing to do, but I wish there were an actual fix. I guess if we "fix" this now and upstream fixes the real bug pretty soon, it's a good approach.
comment:24 in reply to: ↑ 23 Changed 14 months ago by
Replying to jhpalmieri:
That's sweeping things under the rug. Not necessarily the worst thing to do, but I wish there were an actual fix. I guess if we "fix" this now and upstream fixes the real bug pretty soon, it's a good approach.
Yes, certainly, what I propose is not a real fix.
Just reproducing the Heisenbug in question outside of the testing framework is a very tall order, leave alone fixing it. By the way, if I run the tests with ./sage tp 8 src/sage/
then the bug does not show, either. Maybe it's a OS bug, who knows.
comment:25 Changed 14 months ago by
 Commit changed from bb37468f15668033ab10af7c6157ef6a2a5f3379 to 2fd95cded92f24596c4484757b486bd1e99ed74c
Branch pushed to git repo; I updated commit sha1. New commits:
2fd95cd  "fixing" tests on #30745

comment:26 Changed 14 months ago by
ready for review
comment:27 Changed 14 months ago by
This whole thing makes no sense to me. I agree that the problem is there with #29719. If instead of your change, I do this:

src/sage/rings/polynomial/plural.pyx
diff git a/src/sage/rings/polynomial/plural.pyx b/src/sage/rings/polynomial/plural.pyx index c2792aec88..500253533a 100644
a b cdef class NCPolynomialRing_plural(Ring): 399 399 sage: R1 = A1.g_algebra({y*x:x*yz, z*x:x*z+2*x, z*y:y*z2*y}, order=TermOrder('degrevlex', 2)) 400 400 sage: A2.<x,y,z> = FreeAlgebra(GF(5), 3) 401 401 sage: R2 = A2.g_algebra({y*x:x*yz, z*x:x*z+2*x, z*y:y*z2*y}, order=TermOrder('degrevlex', 2)) 402 sage: A2.<x,y,z> = FreeAlgebra(GF(5), 3) 403 sage: R2 = A2.g_algebra({y*x:x*yz, z*x:x*z+2*x, z*y:y*z2*y}, order=TermOrder('degrevlex', 2)) 402 404 sage: A3.<x,y,z> = FreeAlgebra(GF(11), 3) 403 405 sage: R3 = A3.g_algebra({y*x:x*yz, z*x:x*z+2*x, z*y:y*z2*y}, order=TermOrder('degrevlex', 2)) 404 406 sage: A4.<x,y,z> = FreeAlgebra(GF(13), 3)
then I get a more detailed segfault:
sage t randomseed=0 src/sage/rings/polynomial/plural.pyx ********************************************************************** File "src/sage/rings/polynomial/plural.pyx", line 401, in sage.rings.polynomial.plural.NCPolynomialRing_plural.__dealloc__ Failed example: R2 = A2.g_algebra({y*x:x*yz, z*x:x*z+2*x, z*y:y*z2*y}, order=TermOrder('degrevlex', 2)) Exception raised: Traceback (most recent call last): File "/Users/jpalmier/Desktop/Sage/sage_builds/TESTING/sage9.3.beta1/local/lib/python3.9/sitepackages/sage/doctest/forker.py", line 720, in _run self.compile_and_execute(example, compiler, test.globs) File "/Users/jpalmier/Desktop/Sage/sage_builds/TESTING/sage9.3.beta1/local/lib/python3.9/sitepackages/sage/doctest/forker.py", line 1145, in compile_and_execute exec(compiled, globs) File "<doctest sage.rings.polynomial.plural.NCPolynomialRing_plural.__dealloc__[6]>", line 1, in <module> R2 = A2.g_algebra({y*x:x*yz, z*x:x*z+Integer(2)*x, z*y:y*zInteger(2)*y}, order=TermOrder('degrevlex', Integer(2))) File "/Users/jpalmier/Desktop/Sage/sage_builds/TESTING/sage9.3.beta1/local/lib/python3.9/sitepackages/sage/algebras/free_algebra.py", line 873, in g_algebra return g_Algebra(base_ring, cmat, dmat, names = names or self.variable_names(), File "sage/structure/factory.pyx", line 369, in sage.structure.factory.UniqueFactory.__call__ (build/cythonized/sage/structure/factory.c:2258) return self.get_object(version, key, kwds) File "sage/structure/factory.pyx", line 412, in sage.structure.factory.UniqueFactory.get_object (build/cythonized/sage/structure/factory.c:2652) obj = self.create_object(version, key, **extra_args) File "sage/rings/polynomial/plural.pyx", line 176, in sage.rings.polynomial.plural.G_AlgFactory.create_object (build/cythonized/sage/rings/polynomial/plural.cpp:5471) return NCPolynomialRing_plural(base_ring, names, c, d, order, File "sage/rings/polynomial/plural.pyx", line 334, in sage.rings.polynomial.plural.NCPolynomialRing_plural.__init__ (build/cythonized/sage/rings/polynomial/plural.cpp:6550) cdef RingWrap rw = ncalgebra(self._c, self._d, ring = P) File "sage/libs/singular/function.pyx", line 1334, in sage.libs.singular.function.SingularFunction.__call__ (build/cythonized/sage/libs/singular/function.cpp:15149) return call_function(self, args, ring, interruptible, attributes) File "sage/libs/singular/function.pyx", line 1516, in sage.libs.singular.function.call_function (build/cythonized/sage/libs/singular/function.cpp:16999) with opt_ctx: # we are preserving the global options state here File "sage/libs/singular/function.pyx", line 1518, in sage.libs.singular.function.call_function (build/cythonized/sage/libs/singular/function.cpp:16911) sig_on() cysignals.signals.SignalError: Segmentation fault Killed due to bus error ********************************************************************** Tests run before process (pid=40470) failed: sage: A.<x,y,z> = FreeAlgebra(QQ, 3) ## line 51 ## [snip] sage: from sage.rings.polynomial.plural import NCPolynomialRing_plural ## line 396 ## sage: from sage.algebras.free_algebra import FreeAlgebra ## line 397 ## sage: A1.<x,y,z> = FreeAlgebra(QQ, 3) ## line 398 ## sage: R1 = A1.g_algebra({y*x:x*yz, z*x:x*z+2*x, z*y:y*z2*y}, order=TermOrder('degrevlex', 2)) ## line 399 ## sage: A2.<x,y,z> = FreeAlgebra(GF(5), 3) ## line 400 ## sage: R2 = A2.g_algebra({y*x:x*yz, z*x:x*z+2*x, z*y:y*z2*y}, order=TermOrder('degrevlex', 2)) ## line 401 ## sage: A2.<x,y,z> = FreeAlgebra(GF(5), 3) ## line 402 ## sage: R2 = A2.g_algebra({y*x:x*yz, z*x:x*z+2*x, z*y:y*z2*y}, order=TermOrder('degrevlex', 2)) ## line 403 ##  0 signals.cpython39darwin.so 0x0000000103090252 print_backtrace + 66 1 signals.cpython39darwin.so 0x0000000103094167 sigdie + 39 2 signals.cpython39darwin.so 0x0000000103094102 sigdie_for_sig + 290 3 libsystem_platform.dylib 0x00007fff6e8865fd _sigtramp + 29 4 Python 0x00000001014c3eb0 _Py_FalseStruct + 0 5 multi_polynomial_libsingular.cpytho 0x0000000154c6810b _ZL109__pyx_f_4sage_5rings_10polynomial_28multi_polynomial_libsingular_23MPolynomial_libsingular__new_constant_polyP90__pyx_obj_4sage_5rings_10polynomial_28multi_polynomial_libsingular_MPolynomial_libsingularP7_objectP94__pyx_obj_4sage_5rings_10polynomial_28multi_polynomial_libsingular_MPolynomialRing_libsingulari + 571 6 multi_polynomial_libsingular.cpytho 0x0000000154c8e1db _ZL111__pyx_pw_4sage_5rings_10polynomial_28multi_polynomial_libsingular_23MPolynomial_libsingular_9_new_constant_polyP7_objectS0_S0_ + 123 7 Python 0x0000000101321487 cfunction_call + 122 8 polynomial_element.cpython39darwi 0x00000001514c90bd __pyx_f_4sage_5rings_10polynomial_18polynomial_element_27PolynomialBaseringInjection__call_ + 397 9 parent.cpython39darwin.so 0x00000001030d84b7 __pyx_pw_4sage_9structure_6parent_6Parent_33__call__ + 1207 10 args.cpython39darwin.so 0x0000000152a3b8cd __Pyx_PyObject_CallOneArg + 237 11 args.cpython39darwin.so 0x0000000152a56e8c __pyx_gb_4sage_6matrix_4args_10MatrixArgs_12generator1 + 9996 12 cachefunc.cpython39darwin.so 0x00000001023e8aea __Pyx_Coroutine_SendEx + 122 13 Python 0x00000001013086ca list_extend + 246 14 Python 0x00000001012df55f PySequence_List + 47 15 args.cpython39darwin.so 0x0000000152a3d10b __pyx_f_4sage_6matrix_4args_10MatrixArgs_list + 363 16 matrix_generic_dense.cpython39dar 0x0000000152a8b758 __pyx_pw_4sage_6matrix_20matrix_generic_dense_20Matrix_generic_dense_1__init__ + 520 17 Python 0x000000010133321b type_call + 150 18 Python 0x00000001012f0b47 _PyObject_MakeTpCall + 266 19 Python 0x0000000101398bd7 call_function + 455 20 Python 0x0000000101395d34 _PyEval_EvalFrameDefault + 27452 21 Python 0x00000001013996eb _PyEval_EvalCode + 1998 22 Python 0x00000001012f117c _PyFunction_Vectorcall + 248 23 Python 0x00000001012f09cc _PyObject_FastCallDictTstate + 149 24 Python 0x00000001012f1435 _PyObject_Call_Prepend + 139 25 Python 0x0000000101338e83 slot_tp_call + 87 26 matrix0.cpython39darwin.so 0x0000000152e16125 __pyx_pw_4sage_6matrix_7matrix0_6Matrix_37change_ring + 2725 27 plural.cpython39darwin.so 0x0000000154e5ca7a _ZL25__Pyx_PyObject_CallOneArgP7_objectS0_ + 138 28 plural.cpython39darwin.so 0x0000000154e8c1f7 _ZL84__pyx_pw_4sage_5rings_10polynomial_6plural_12G_AlgFactory_3create_key_and_extra_argsP7_objectS0_S0_ + 5175 29 Python 0x00000001012f0b47 _PyObject_MakeTpCall + 266 30 Python 0x00000001012f2e78 method_vectorcall + 205 31 Python 0x00000001012f0ec3 PyVectorcall_Call + 146 32 factory.cpython39darwin.so 0x0000000150d3f2ce __pyx_pw_4sage_9structure_7factory_13UniqueFactory_5__call__ + 206 33 Python 0x00000001012f0b47 _PyObject_MakeTpCall + 266 34 Python 0x0000000101398bd7 call_function + 455 35 Python 0x0000000101395e9e _PyEval_EvalFrameDefault + 27814 36 Python 0x00000001013996eb _PyEval_EvalCode + 1998 37 Python 0x00000001012f117c _PyFunction_Vectorcall + 248 38 Python 0x00000001012f2e4f method_vectorcall + 164 39 Python 0x0000000101398ba3 call_function + 403 40 Python 0x0000000101395e9e _PyEval_EvalFrameDefault + 27814 41 Python 0x00000001013996eb _PyEval_EvalCode + 1998 42 Python 0x000000010138f11d PyEval_EvalCode + 79 43 Python 0x000000010138c457 builtin_exec + 581 44 Python 0x0000000101320d43 cfunction_vectorcall_FASTCALL + 203 45 Python 0x0000000101398ba3 call_function + 403 46 Python 0x0000000101395de0 _PyEval_EvalFrameDefault + 27624 47 Python 0x00000001012f11ec function_code_fastcall + 97 48 Python 0x0000000101398ba3 call_function + 403 49 Python 0x0000000101395d18 _PyEval_EvalFrameDefault + 27424 50 Python 0x00000001013996eb _PyEval_EvalCode + 1998 51 Python 0x00000001012f117c _PyFunction_Vectorcall + 248 52 Python 0x0000000101398ba3 call_function + 403 53 Python 0x0000000101395d18 _PyEval_EvalFrameDefault + 27424 54 Python 0x00000001013996eb _PyEval_EvalCode + 1998 55 Python 0x00000001012f117c _PyFunction_Vectorcall + 248 56 Python 0x0000000101398ba3 call_function + 403 57 Python 0x0000000101395d18 _PyEval_EvalFrameDefault + 27424 58 Python 0x00000001012f11ec function_code_fastcall + 97 59 Python 0x0000000101398ba3 call_function + 403 60 Python 0x0000000101395d18 _PyEval_EvalFrameDefault + 27424 61 Python 0x00000001013996eb _PyEval_EvalCode + 1998 62 Python 0x00000001012f117c _PyFunction_Vectorcall + 248 63 Python 0x00000001012f0a0b _PyObject_FastCallDictTstate + 212 64 Python 0x00000001012f1435 _PyObject_Call_Prepend + 139 65 Python 0x0000000101338e83 slot_tp_call + 87 66 Python 0x00000001012f0b47 _PyObject_MakeTpCall + 266 67 Python 0x0000000101398bd7 call_function + 455 68 Python 0x0000000101395de0 _PyEval_EvalFrameDefault + 27624 69 Python 0x00000001012f11ec function_code_fastcall + 97 70 Python 0x0000000101398ba3 call_function + 403 71 Python 0x0000000101395d18 _PyEval_EvalFrameDefault + 27424 72 Python 0x00000001013996eb _PyEval_EvalCode + 1998 73 Python 0x00000001012f117c _PyFunction_Vectorcall + 248 74 Python 0x00000001012f2e4f method_vectorcall + 164 75 Python 0x0000000101398ba3 call_function + 403 76 Python 0x0000000101395e9e _PyEval_EvalFrameDefault + 27814 77 Python 0x00000001012f11ec function_code_fastcall + 97 78 Python 0x0000000101398ba3 call_function + 403 79 Python 0x0000000101395d18 _PyEval_EvalFrameDefault + 27424 80 Python 0x00000001012f11ec function_code_fastcall + 97 81 Python 0x00000001012f0a0b _PyObject_FastCallDictTstate + 212 82 Python 0x00000001012f1435 _PyObject_Call_Prepend + 139 83 Python 0x0000000101339a1e slot_tp_init + 87 84 Python 0x000000010133321b type_call + 150 85 Python 0x00000001012f0b47 _PyObject_MakeTpCall + 266 86 Python 0x0000000101398bd7 call_function + 455 87 Python 0x0000000101395de0 _PyEval_EvalFrameDefault + 27624 88 Python 0x00000001012f11ec function_code_fastcall + 97 89 Python 0x0000000101398ba3 call_function + 403 90 Python 0x0000000101395d34 _PyEval_EvalFrameDefault + 27452 91 Python 0x00000001012f11ec function_code_fastcall + 97 92 Python 0x0000000101398ba3 call_function + 403 93 Python 0x0000000101395d34 _PyEval_EvalFrameDefault + 27452 94 Python 0x00000001012f11ec function_code_fastcall + 97 95 Python 0x00000001012f2e4f method_vectorcall + 164 96 Python 0x0000000101398ba3 call_function + 403 97 Python 0x0000000101395d34 _PyEval_EvalFrameDefault + 27452 98 Python 0x00000001013996eb _PyEval_EvalCode + 1998 99 Python 0x00000001012f117c _PyFunction_Vectorcall + 248 100 Python 0x0000000101398ba3 call_function + 403 101 Python 0x0000000101395d18 _PyEval_EvalFrameDefault + 27424 102 Python 0x00000001013996eb _PyEval_EvalCode + 1998 103 Python 0x00000001012f117c _PyFunction_Vectorcall + 248 104 Python 0x0000000101398ba3 call_function + 403 105 Python 0x0000000101395d18 _PyEval_EvalFrameDefault + 27424 106 Python 0x00000001012f11ec function_code_fastcall + 97 107 Python 0x0000000101398ba3 call_function + 403 108 Python 0x0000000101395d18 _PyEval_EvalFrameDefault + 27424 109 Python 0x00000001012f11ec function_code_fastcall + 97 110 Python 0x0000000101398ba3 call_function + 403 111 Python 0x0000000101395d18 _PyEval_EvalFrameDefault + 27424 112 Python 0x00000001012f11ec function_code_fastcall + 97 113 Python 0x0000000101398ba3 call_function + 403 114 Python 0x0000000101395d18 _PyEval_EvalFrameDefault + 27424 115 Python 0x00000001013996eb _PyEval_EvalCode + 1998 116 Python 0x000000010138f11d PyEval_EvalCode + 79 117 Python 0x00000001013ca185 run_eval_code_obj + 110 118 Python 0x00000001013c957d run_mod + 103 119 Python 0x00000001013c8441 PyRun_FileExFlags + 241 120 Python 0x00000001013c7a31 PyRun_SimpleFileExFlags + 271 121 Python 0x00000001013df94d Py_RunMain + 1839 122 Python 0x00000001013dfc86 pymain_main + 306 123 Python 0x00000001013dfcd4 Py_BytesMain + 42 124 libdyld.dylib 0x00007fff6e68dcc9 start + 1  Unhandled SIGBUS: A bus error occurred. This probably occurred because a *compiled* module has a bug in it and is not properly wrapped with sig_on(), sig_off(). Python will now terminate.  **********************************************************************  sage t randomseed=0 src/sage/rings/polynomial/plural.pyx # Killed due to bus error
Does that convey any useful information?
comment:28 Changed 14 months ago by
 Cc nbruin fbissey added
 Description modified (diff)
The problem is certainly not in flint update, which is modern high quality code, but in Singular's plural package, which is relying on 9year old C++, not used much, either, no wonder it misbehaves.
I cc few people who might tell us more about the dump (I can reproduce it, so it's not random).
It seems that Singular with Clang is not tested much (e.g. Singular built on OpenBSD 6.7 and 6.8 with OpenBSD's clang 10 and 11: standalone Singular crashes on startup).
comment:29 Changed 14 months ago by
At first glance, from what I can read, it looks like the system has to be "primed" before the error occurs. That suggests memory management issues  which have always been a hard topic in singular :(
comment:30 Changed 14 months ago by
Unfortunately it also seems that the Singular team is uninterested in portability testing  my pull request at https://github.com/Singular/Singular/pull/1018 has been sitting there without even an acknowledgment by the maintainers
comment:31 followup: ↓ 33 Changed 14 months ago by
If this is really a Singular issue, then let's merge the bandaid and move on. Any objections? What is the status with ecl? Does that need a new ticket?
comment:32 Changed 14 months ago by
Also note #29528 which is about this Singular bug. As well, in #25993 (upgrade to Singular 4.1.3p2  the latest)
these tests are marked as # not tested
. I tried the branch of #25993 with these tests reenabled, and they all work! And this doubling from comment:27 does not give any trouble either. So perhaps the latest Singular and the latest Flint are a winning combo?
comment:33 in reply to: ↑ 31 Changed 14 months ago by
Replying to jhpalmieri:
If this is really a Singular issue, then let's merge the bandaid and move on. Any objections? What is the status with ecl? Does that need a new ticket?
yes, let's move on this. And open a new ticket for ecl.
comment:34 Changed 14 months ago by
 Reviewers changed from https://github.com/mkoeppe/sage/actions/runs/367237067 to John Palmieri, https://github.com/mkoeppe/sage/actions/runs/367237067
 Status changed from needs_review to positive_review
comment:35 Changed 14 months ago by
 Reviewers changed from John Palmieri, https://github.com/mkoeppe/sage/actions/runs/367237067 to John Palmieri
comment:36 followup: ↓ 38 Changed 14 months ago by
Since the ECL part is postponed, should we update this ticket's summary and description?
Could the summary be: "Allow using arb, flint and ntl from Homebrew"?
Is the ECL issue part of #29617 or does it need a new ticket?
comment:37 Changed 14 months ago by
 Summary changed from homebrew: Errors when homebrew's ntl, flint, or ecl are installed in /usr/local to Allow using arb, flint and ntl from Homebrew
Changing ticket summary; feel free to improve or revert.
comment:38 in reply to: ↑ 36 Changed 14 months ago by
Replying to slelievre:
Since the ECL part is postponed, should we update this ticket's summary and description?
Could the summary be: "Allow using arb, flint and ntl from Homebrew"?
Is the ECL issue part of #29617 or does it need a new ticket?
yes, #29617 would probably take care of this. Even better, we should upsteam to Homebrew "our" ECL patches.
comment:39 Changed 14 months ago by
 Branch changed from u/dimpase/build/brewenablearbetc to 2fd95cded92f24596c4484757b486bd1e99ed74c
 Resolution set to fixed
 Status changed from positive_review to closed
upstream ecl is indeed useless, as no known to me distro (gentoo, homebrew) provides sufficiently patched ecl20. So we can have a spkgconfigure.m4 for it, erroring out if it's found, on any distro.
perhaps ntl/flint/singular combo on homebrew is good enough for Sage?