Re: [sage-devel] About mpmath and sympy

2010-07-19 Thread François Bissey
> On Fri, Jul 16, 2010 at 3:21 PM, François Bissey
> 
>  wrote:
> >>   Hi,
> >> 
> >>   Newer sympy has a bundled copy of mpmath, what causes several
> >> problems in my sagemath package. I was in vacation during most of
> >> Mandriva 2010.1 freeze, and did not fully test the package for some
> >> time, but I am working on an update for it; basically an 's/import
> >> mpmath/import sympy.mpmath as mpmath/', but would like to know what
> >> would be the better approach. (just letting the code use both leads to
> >> SEGvs).
> >> 
> >>   The new sagemath package will conflict with
> >> python-mpmath-0.14-1mdv2010.1 (forcing it to be uninstalled), because
> >> the sympy is python-sympy-0.6.7-1mdv2010.1.
> > 
> > Hi Paulo,
> > 
> > that will probably be a pain for us in gentoo as well.
> > At the moment we are sticking with sympy-0.6.6 as
> > sympy-0.6.7 gives us trouble. The gentoo philosophy
> > at this point will be to remove mpmath from sympy and
> > make it a requirement. But I haven't been actively working
> > on that.
> 
> Yes, I run into similar problems when trying to upgrade sympy in Sage.
> 
> We ship our own version of mpmath, because different versions of
> mpmath are not compatible with each other (e.g. you can't just depend
> on mpmath externaly, there are little things that break). However, we
> do try to update mpmath in sympy, for example the latest git sympy is
> using the latest release of mpmath. But you can see the related
> commits, that it's not as trivial as just replacing the code.
> 
> If you know any solution, it'd be absolutely awesome.
> 
> One solution that I can think of is to drop python2.4 support, and use
> relative imports in sympy to use our own versin of mpmath, that is
> tested and works. That way it should not interfere with the other
> installation of mpmath, that the user might have (in Sage or else).
> 
What about making it a build time option? If a suitable version is provided
don't use the internal one.
As far as python-2.4 is concerned we can restrict that in Gentoo and 
sage has moved away from it.

Francois

-- 
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


Re: [sage-devel] About mpmath and sympy

2010-07-19 Thread Ondrej Certik
On Mon, Jul 19, 2010 at 1:01 PM, William Stein  wrote:
> On Mon, Jul 19, 2010 at 9:54 PM, Ondrej Certik  wrote:
>> On Fri, Jul 16, 2010 at 3:21 PM, François Bissey
>>  wrote:
   Hi,

   Newer sympy has a bundled copy of mpmath, what causes several
 problems in my sagemath package. I was in vacation during most of
 Mandriva 2010.1 freeze, and did not fully test the package for some
 time, but I am working on an update for it; basically an 's/import
 mpmath/import sympy.mpmath as mpmath/', but would like to know what
 would be the better approach. (just letting the code use both leads to
 SEGvs).

   The new sagemath package will conflict with
 python-mpmath-0.14-1mdv2010.1 (forcing it to be uninstalled), because
 the sympy is python-sympy-0.6.7-1mdv2010.1.

>>> Hi Paulo,
>>>
>>> that will probably be a pain for us in gentoo as well.
>>> At the moment we are sticking with sympy-0.6.6 as
>>> sympy-0.6.7 gives us trouble. The gentoo philosophy
>>> at this point will be to remove mpmath from sympy and
>>> make it a requirement. But I haven't been actively working
>>> on that.
>>
>> Yes, I run into similar problems when trying to upgrade sympy in Sage.
>>
>> We ship our own version of mpmath, because different versions of
>> mpmath are not compatible with each other (e.g. you can't just depend
>> on mpmath externaly, there are little things that break). However, we
>> do try to update mpmath in sympy, for example the latest git sympy is
>> using the latest release of mpmath. But you can see the related
>> commits, that it's not as trivial as just replacing the code.
>>
>> If you know any solution, it'd be absolutely awesome.
>>
>> One solution that I can think of is to drop python2.4 support, and use
>> relative imports in sympy to use our own versin of mpmath, that is
>> tested and works. That way it should not interfere with the other
>> installation of mpmath, that the user might have (in Sage or else).
>>
>> Ondrej
>
> Alternatively you could rename the version of mpmath that you include
> in sympy, e.g., call it
>
>   mpmath_sympy

Actually, that's a very good idea. We should do that.

Ondrej

-- 
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


Re: [sage-devel] About mpmath and sympy

2010-07-19 Thread William Stein
On Mon, Jul 19, 2010 at 9:54 PM, Ondrej Certik  wrote:
> On Fri, Jul 16, 2010 at 3:21 PM, François Bissey
>  wrote:
>>>   Hi,
>>>
>>>   Newer sympy has a bundled copy of mpmath, what causes several
>>> problems in my sagemath package. I was in vacation during most of
>>> Mandriva 2010.1 freeze, and did not fully test the package for some
>>> time, but I am working on an update for it; basically an 's/import
>>> mpmath/import sympy.mpmath as mpmath/', but would like to know what
>>> would be the better approach. (just letting the code use both leads to
>>> SEGvs).
>>>
>>>   The new sagemath package will conflict with
>>> python-mpmath-0.14-1mdv2010.1 (forcing it to be uninstalled), because
>>> the sympy is python-sympy-0.6.7-1mdv2010.1.
>>>
>> Hi Paulo,
>>
>> that will probably be a pain for us in gentoo as well.
>> At the moment we are sticking with sympy-0.6.6 as
>> sympy-0.6.7 gives us trouble. The gentoo philosophy
>> at this point will be to remove mpmath from sympy and
>> make it a requirement. But I haven't been actively working
>> on that.
>
> Yes, I run into similar problems when trying to upgrade sympy in Sage.
>
> We ship our own version of mpmath, because different versions of
> mpmath are not compatible with each other (e.g. you can't just depend
> on mpmath externaly, there are little things that break). However, we
> do try to update mpmath in sympy, for example the latest git sympy is
> using the latest release of mpmath. But you can see the related
> commits, that it's not as trivial as just replacing the code.
>
> If you know any solution, it'd be absolutely awesome.
>
> One solution that I can think of is to drop python2.4 support, and use
> relative imports in sympy to use our own versin of mpmath, that is
> tested and works. That way it should not interfere with the other
> installation of mpmath, that the user might have (in Sage or else).
>
> Ondrej

Alternatively you could rename the version of mpmath that you include
in sympy, e.g., call it

   mpmath_sympy

 - William

>
> --
> 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
>



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
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


Re: [sage-devel] About mpmath and sympy

2010-07-19 Thread Ondrej Certik
On Fri, Jul 16, 2010 at 3:21 PM, François Bissey
 wrote:
>>   Hi,
>>
>>   Newer sympy has a bundled copy of mpmath, what causes several
>> problems in my sagemath package. I was in vacation during most of
>> Mandriva 2010.1 freeze, and did not fully test the package for some
>> time, but I am working on an update for it; basically an 's/import
>> mpmath/import sympy.mpmath as mpmath/', but would like to know what
>> would be the better approach. (just letting the code use both leads to
>> SEGvs).
>>
>>   The new sagemath package will conflict with
>> python-mpmath-0.14-1mdv2010.1 (forcing it to be uninstalled), because
>> the sympy is python-sympy-0.6.7-1mdv2010.1.
>>
> Hi Paulo,
>
> that will probably be a pain for us in gentoo as well.
> At the moment we are sticking with sympy-0.6.6 as
> sympy-0.6.7 gives us trouble. The gentoo philosophy
> at this point will be to remove mpmath from sympy and
> make it a requirement. But I haven't been actively working
> on that.

Yes, I run into similar problems when trying to upgrade sympy in Sage.

We ship our own version of mpmath, because different versions of
mpmath are not compatible with each other (e.g. you can't just depend
on mpmath externaly, there are little things that break). However, we
do try to update mpmath in sympy, for example the latest git sympy is
using the latest release of mpmath. But you can see the related
commits, that it's not as trivial as just replacing the code.

If you know any solution, it'd be absolutely awesome.

One solution that I can think of is to drop python2.4 support, and use
relative imports in sympy to use our own versin of mpmath, that is
tested and works. That way it should not interfere with the other
installation of mpmath, that the user might have (in Sage or else).

Ondrej

-- 
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


Re: [sage-devel] About mpmath and sympy

2010-07-19 Thread Tim Daly



Paulo César Pereira de Andrade wrote:

2010/7/17 François Bissey :
  

As an aside, if two upstream packages include another upstream
package (e.g. both include GMP) what does Sage do? Are there
two copies of GMP? They could have different versions of the
same package since project 1 could have stopped at one version
and project 2 could have stopped at another. Sage could be
using a third.
  

Funny you mentioned GMP. At one point givaro was shipping its own
GMP. It was actually an accident on the givaro devs part - and I had
notified them. But I didn't notify this list. So in at least one release
givaro was actually overwriting part of GMP.



  I think there may be still duplicates somewhere, not just GMP, but
probably don't affect sage because either sage doesn't build it by
default, e.g. gap optional modules, or sage talks to it using the
pexpect interface.

  

For your question I guess it depends if it is kept internally without
clash with anything else or it actively tries to overwrite things that
have been installed already.
The second one is a no-no, and the first one should be fixed to use upstream
but not as a matter of emergency I would guess.



  If it is linked statically, and provides only an opaque interface,
usually it should just work, but that may depend on how the duplicates
access external resources, like files, kernel interface, etc. Problems
can get serious on shared objects when there are name clashes
(I remember when I tried LD_PRELOAD=libpolybori.so and discovered that
it builds stubs to several libc calls if UNIX is not defined, and it
is not in Linux).

  About Tim Daly comment that I think may be related to axiom :-) The
axiom package was broken for quite some time in Mandriva. My first
work on it I got it to work with system gmp,
but need several gcl patches. When someone else in Mandriva updated to
gmp 5, I rebuilt axiom using its internal copy of gmp3 (I am using git
axiom). In case you want to check it:
http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/axiom/
  

Axiom for mandriva is at the usual download site. I was curious how Sage was
planning to handle the multiple-version problem. If you look at the way 
software
can be layered you find that each layer tries to reduce errors by 
including the

upstream software. So MPIR is included in the distro for some packages but
each package usually has its own version.

Axiom only depends on two packages (GCL and noweb (noweb is going away))
but including Axiom under Sage will end up including gmp since that is 
included in

GCL. Including Axiom under Sage also includes a lisp but Maxima in Sage uses
ECL these days so there would be two complete lisps. Maxima can build on 
GCL.


Would it be reasonable for Sage to establish "fundamental spkgs" (like gmp)
which were used by all of the spkgs? I think Sage could play the role of a
"normalizing force", suggesting that upstream packages use the same distros.
This would be similar to the (decades-old) push to use standard system
libraries. There was a day when everyone included their own copy of printf
in every program. Maybe it is time for a new "spkg substrate" push, at least
in the computer algebra community.

  

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


Re: [sage-devel] About mpmath and sympy

2010-07-17 Thread Paulo César Pereira de Andrade
2010/7/17 François Bissey :
>> As an aside, if two upstream packages include another upstream
>> package (e.g. both include GMP) what does Sage do? Are there
>> two copies of GMP? They could have different versions of the
>> same package since project 1 could have stopped at one version
>> and project 2 could have stopped at another. Sage could be
>> using a third.
>
> Funny you mentioned GMP. At one point givaro was shipping its own
> GMP. It was actually an accident on the givaro devs part - and I had
> notified them. But I didn't notify this list. So in at least one release
> givaro was actually overwriting part of GMP.

  I think there may be still duplicates somewhere, not just GMP, but
probably don't affect sage because either sage doesn't build it by
default, e.g. gap optional modules, or sage talks to it using the
pexpect interface.

> For your question I guess it depends if it is kept internally without
> clash with anything else or it actively tries to overwrite things that
> have been installed already.
> The second one is a no-no, and the first one should be fixed to use upstream
> but not as a matter of emergency I would guess.

  If it is linked statically, and provides only an opaque interface,
usually it should just work, but that may depend on how the duplicates
access external resources, like files, kernel interface, etc. Problems
can get serious on shared objects when there are name clashes
(I remember when I tried LD_PRELOAD=libpolybori.so and discovered that
it builds stubs to several libc calls if UNIX is not defined, and it
is not in Linux).

  About Tim Daly comment that I think may be related to axiom :-) The
axiom package was broken for quite some time in Mandriva. My first
work on it I got it to work with system gmp,
but need several gcl patches. When someone else in Mandriva updated to
gmp 5, I rebuilt axiom using its internal copy of gmp3 (I am using git
axiom). In case you want to check it:
http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/axiom/

> 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


Re: [sage-devel] About mpmath and sympy

2010-07-16 Thread François Bissey
> As an aside, if two upstream packages include another upstream
> package (e.g. both include GMP) what does Sage do? Are there
> two copies of GMP? They could have different versions of the
> same package since project 1 could have stopped at one version
> and project 2 could have stopped at another. Sage could be
> using a third.

Funny you mentioned GMP. At one point givaro was shipping its own 
GMP. It was actually an accident on the givaro devs part - and I had
notified them. But I didn't notify this list. So in at least one release
givaro was actually overwriting part of GMP.

For your question I guess it depends if it is kept internally without 
clash with anything else or it actively tries to overwrite things that 
have been installed already.
The second one is a no-no, and the first one should be fixed to use upstream
but not as a matter of emergency I would guess.

Francois

-- 
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


Re: [sage-devel] About mpmath and sympy

2010-07-16 Thread Tim Daly

As an aside, if two upstream packages include another upstream
package (e.g. both include GMP) what does Sage do? Are there
two copies of GMP? They could have different versions of the
same package since project 1 could have stopped at one version
and project 2 could have stopped at another. Sage could be
using a third.

François Bissey wrote:

  Hi,

  Newer sympy has a bundled copy of mpmath, what causes several
problems in my sagemath package. I was in vacation during most of
Mandriva 2010.1 freeze, and did not fully test the package for some
time, but I am working on an update for it; basically an 's/import
mpmath/import sympy.mpmath as mpmath/', but would like to know what
would be the better approach. (just letting the code use both leads to
SEGvs).

  The new sagemath package will conflict with
python-mpmath-0.14-1mdv2010.1 (forcing it to be uninstalled), because
the sympy is python-sympy-0.6.7-1mdv2010.1.



Hi Paulo,

that will probably be a pain for us in gentoo as well. 
At the moment we are sticking with sympy-0.6.6 as 
sympy-0.6.7 gives us trouble. The gentoo philosophy

at this point will be to remove mpmath from sympy and
make it a requirement. But I haven't been actively working
on that.

Francois

  


--
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


Re: [sage-devel] About mpmath and sympy

2010-07-16 Thread Paulo César Pereira de Andrade
2010/7/16 François Bissey :
>>   Hi,
>>
>>   Newer sympy has a bundled copy of mpmath, what causes several
>> problems in my sagemath package. I was in vacation during most of
>> Mandriva 2010.1 freeze, and did not fully test the package for some
>> time, but I am working on an update for it; basically an 's/import
>> mpmath/import sympy.mpmath as mpmath/', but would like to know what
>> would be the better approach. (just letting the code use both leads to
>> SEGvs).
>>
>>   The new sagemath package will conflict with
>> python-mpmath-0.14-1mdv2010.1 (forcing it to be uninstalled), because
>> the sympy is python-sympy-0.6.7-1mdv2010.1.
>>
> Hi Paulo,
>
> that will probably be a pain for us in gentoo as well.
> At the moment we are sticking with sympy-0.6.6 as
> sympy-0.6.7 gives us trouble. The gentoo philosophy
> at this point will be to remove mpmath from sympy and
> make it a requirement. But I haven't been actively working
> on that.

  Hi François,

  I think the proper solution should be for upstream sympy to not have
a copy of mpmath, or, somehow not let it conflict with a toplevel
mpmath. Otherwise, patching will be required. For now I am using this
one (with minor changes for 2010.1 and sage 4.4):
http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/sagemath/current/SOURCES/sage-4.4.4-sympy_mpmath.patch?view=markup
and forcing python-mpmath to be uninstalled if upgrading the sagemath package.

> 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


Re: [sage-devel] About mpmath and sympy

2010-07-16 Thread François Bissey
>   Hi,
> 
>   Newer sympy has a bundled copy of mpmath, what causes several
> problems in my sagemath package. I was in vacation during most of
> Mandriva 2010.1 freeze, and did not fully test the package for some
> time, but I am working on an update for it; basically an 's/import
> mpmath/import sympy.mpmath as mpmath/', but would like to know what
> would be the better approach. (just letting the code use both leads to
> SEGvs).
> 
>   The new sagemath package will conflict with
> python-mpmath-0.14-1mdv2010.1 (forcing it to be uninstalled), because
> the sympy is python-sympy-0.6.7-1mdv2010.1.
> 
Hi Paulo,

that will probably be a pain for us in gentoo as well. 
At the moment we are sticking with sympy-0.6.6 as 
sympy-0.6.7 gives us trouble. The gentoo philosophy
at this point will be to remove mpmath from sympy and
make it a requirement. But I haven't been actively working
on that.

Francois

-- 
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


[sage-devel] About mpmath and sympy

2010-07-16 Thread Paulo César Pereira de Andrade
  Hi,

  Newer sympy has a bundled copy of mpmath, what causes several
problems in my sagemath package. I was in vacation during most of
Mandriva 2010.1 freeze, and did not fully test the package for some
time, but I am working on an update for it; basically an 's/import
mpmath/import sympy.mpmath as mpmath/', but would like to know what
would be the better approach. (just letting the code use both leads to
SEGvs).

  The new sagemath package will conflict with
python-mpmath-0.14-1mdv2010.1 (forcing it to be uninstalled), because
the sympy is python-sympy-0.6.7-1mdv2010.1.

Thanks,
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