Paulo César Pereira de Andrade wrote:
2010/7/17 François Bissey <[email protected]>:
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 [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to