2011/11/9 Francois Bissey <francois.bis...@canterbury.ac.nz>:
>> 2011/11/9 Francois Bissey <francois.bis...@canterbury.ac.nz>:
>
>>
>>   Maybe setting MPMATH_NOGMPY is not enough to prevent it to
>> call to gmpy "init" function that calls mp_set_memory_functions.
>>
>>   I will try to debug a bit further, in the worst case, I can resubmit a
>> sagemath package with "Conflicts: python-gmpy". I had it for a long
>> time with "Conflicts: python-numpy" when using the patch to use

s/python-numpy/python-mpmath/

>> sympy version of mpmath... With the conflicts rpm information, it
>> asks the user for removal of the package unless using some
>> "--force" like option (actually, usually --nodeps).
>>
> I already complained to mpmath upstream that they have added some code
> that looks for sage even if MPMATH_NOSAGE is set, it could be that something
> similar has been done with gmpy.

  I only noticed that if having sagemath installed, it will fail to
build documentation
if SAGE_ROOT, etc environment variables are not set. It can be worked around
by building the package under "sage -sh" but that is kind ugly :-)

> Upstream listened to my request favorably but we may have to contribute the
> bits. I'll search my home inbox for it. There was some good suggestions on
> what to do.

  Sample of run:

MPMATH_NOGMPY=1 GMPY_DEBUG=99 sage -t -force_lib
"devel/sage/sage/rings/integer.pyx"

besides all warnings in format:

*** glibc detected *** python: free(): invalid pointer: 0x000000000585b770 ***
*** glibc detected *** python: free(): invalid pointer: 0x000000000585b750 ***
*** glibc detected *** python: free(): invalid pointer: 0x000000000585b730 ***
*** glibc detected *** python: free(): invalid pointer: 0x000000000585b710 ***
*** glibc detected *** python: free(): invalid pointer: 0x000000000494c200 ***
*** glibc detected *** *** glibc detected *** python: free(): invalid
pointer: 0x000000000585b690 ***

I see:

sage -t -force_lib "devel/sage/sage/rings/integer.pyx"
 [?1034hinitgmpy() called...
Entering set_pympzcache
Entering set_pympqcache
gmpy_module at 0x7f68ffb122b8
gmpy_module imported copy_reg OK
Pygmpy_mpz() called...
Entering Pympz_new
Pympz_new is creating a new object
Initing new not in zcache
mp_allocate( 8->16 )
mp_allocate( 8->16 ) ->0x49929b0
anynum2Pympz(0x1c949b0)->0x7f690096c530
Pygmpy_mpz: created mpz = 0
Pympz_dealloc: 0x7f690096c530
Pygmpy_mpq() called...
Entering Pympq_new
Pympq_new is creating a new object
Initing new not in qcache
mp_allocate( 8->16 )
mp_allocate( 8->16 ) ->0x4b8afb0
mp_allocate( 8->16 )
mp_allocate( 8->16 ) ->0x470f620
Initing new not in qcache, done
anynum2Pympq(0x1c949b0)->0x7f68ffb14630
...

  Or less output:

$ sudo urpmi python-gmpy; MPMATH_NOGMPY=1 GMPY_DEBUG=99 echo "import
mpmath" | sage


    
rsync://distrib-coffee.ipsl.jussieu.fr/pub/linux/MandrivaLinux/devel/cooker/x86_64/media/contrib/release/python-gmpy-1.14-1mdv2011.0.x86_64.rpm
instalando python-gmpy-1.14-1mdv2011.0.x86_64.rpm a partir de
/var/cache/urpmi/rpms
Preparando...                    #############################################
      1/1: python-gmpy           #############################################
----------------------------------------------------------------------
| Sage Version 4.7.2, Release Date: 2011-10-29                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
*** glibc detected *** python: realloc(): invalid pointer:
0x0000000003b1ef50 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x0000000003b1ef70 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x0000000003adad80 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x0000000003a1aff0 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x0000000003b0e4f0 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x00000000033081b0 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x0000000003228460 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x00000000029fd4b0 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x00000000033e15b0 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x00000000033e04d0 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x0000000002d69920 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x00000000031f5e00 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x00000000031f58a0 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x0000000002ca0d30 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x0000000002796220 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x0000000002574490 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x000000000309c050 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x00000000035702a0 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x00000000032a79a0 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x0000000003546550 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x000000000340a410 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x00000000033a3d10 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x000000000268b6d0 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x0000000003b0de20 ***
*** glibc detected *** python: realloc(): invalid pointer:
0x0000000002ca0d50 ***
sage: sage:
Exiting Sage (CPU time 0m0.14s, Wall time 0m0.14s).
*** glibc detected *** python: free(): invalid pointer: 0x0000000003b1ef30 ***
*** glibc detected *** python: free(): invalid pointer: 0x0000000003a9f950 ***

$ sudo urpme python-gmpy; MPMATH_NOGMPY=1 GMPY_DEBUG=99 echo "import
mpmath" | sage
removendo python-gmpy-1.14-1mdv2011.0.x86_64
Preparando...                    #############################################
removendo pacote python-gmpy-1.14-1mdv2011.0.x86_64
----------------------------------------------------------------------
| Sage Version 4.7.2, Release Date: 2011-10-29                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: sage:
Exiting Sage (CPU time 0m0.14s, Wall time 0m0.14s).

> Francois

Paulo

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to