Closed WGH- closed 3 years ago
My existing sci-mathematics/sage-9.1-r2 crashes on start, though I pretty sure it worked at some point.
/usr/lib64/python3.6/site-packages/sage/rings/real_mpfr.pyx in sage.rings.real_mpfr.RealNumber.__pari__ (/var/tmp/portage/sci-mathematics/sage-9.1-r2/work/sage-9.1/src-python3_6/build/cythonized/sage/rings/real_mpfr.c:22803)()
3250 cdef int prec
3251 prec = (<RealField_class>self._parent).__prec
3252
3253 # We round up the precision to the nearest multiple of wordsize.
3254 cdef int rounded_prec
3255 rounded_prec = (self.prec() + wordsize - 1) & ~(wordsize - 1)
3256
3257 # Yes, assigning to self works fine, even in Cython.
3258 if rounded_prec > prec:
3259 self = RealField(rounded_prec)(self)
3260
3261 cdef mpz_t mantissa
3262 cdef mp_exp_t exponent
3263 cdef GEN pari_float
3264
-> 3265 sig_on()
global sig_on = undefined
3266 if mpfr_zero_p(self.value):
3267 pari_float = real_0_bit(-rounded_prec)
3268 else:
3269 # Now we can extract the mantissa, and it will be normalized
3270 # (the most significant bit of the most significant word will be 1).
3271 mpz_init(mantissa)
3272 exponent = mpfr_get_z_exp(mantissa, self.value)
3273
3274 # Create a PARI REAL
3275 pari_float = cgetr(2 + rounded_prec / wordsize)
3276 pari_float[1] = evalexpo(exponent + rounded_prec - 1) + evalsigne(mpfr_sgn(self.value))
3277 mpz_export(&pari_float[2], NULL, 1, wordsize // 8, 0, 0, mantissa)
3278 mpz_clear(mantissa)
3279
3280 return new_gen(pari_float)
SignalError: Segmentation fault
I recently made some change to the default package.use
and enabled threads
in pari
. It should have triggered a rebuild of all the dependencies of pari
including eclib
. Can you check that
threads
useflagspari
is built with threads
, yes. It's hard to say whether I had threads
in pari
before, since this information isn't preserved in the emerge.log
.
I've rebuilt the packages in order you suggested. This didn't fix existing sage, but new version was emerged just fine and is now working.
Thanks!
Nothing short of a rebuild would fix sage. I should have advertised the change more broadly. I did the switch because the next major version of giac does require pari with threads to work properly (one test crashes on startup with threadless pari). In effect we probably won't see giac 1.6.0.x in sage before 9.3 since there are unresolved issues with it right now.
I had this error when emerging sci-mathematics/sage-9.1-r3 today.
These libraries in question are from: