Hello,

I guess it isn't a secret that William want Sage 2.8.1 to work on
Solaris "out of the box". Didie, William and I spend most of yesterday
in the IRC channel #sage-devel to cooridnate the hacking and got quite
far. We are done yet, but here are some notes on things to be done:

sage -br fixes/suggestions for Solaris

libsingular builds with the right headers. Make install target needs
fixing. The current singular.spkg expects install-sh in very odd
places and therefore fails easily. One of them is $SAGE_LOCAL/bin -
very naughty.

real_rqdf: INFINITY and NAN are undefined on Solaris. That can be
accompilished by the slightly changed cygwinfix.h (which is no
misnamed :))

// cygwinfix.h
// defines NAN and INFINITY on Solaris. The same applies to *BSD if
anybody cares.

#if defined(__sun)
#define NAN (0.0/0.0)
#define INFINITY (__builtin_huge_valf())
#endif

It isn't worth to provide this as a patch, but I am sure William will
give me credit :)

Later on in the code for real_rqdf.pyx we have another two problems:

#    if isinf(d[0]):
#        d[0] = INFINITY
#        return qd_from_double(d[0])

#    if not finite(d[0]):
#        d[0] = NAN
#        return qd_from_double(d[0])

The problem with isinf can be resolved via an explicit cast. The
symbol finite is missing and  might no longer exist after the update
to quad_double 2.3pre5.

coerce:

The following took quite a while to figure our: coerce doesn't
compile:

building 'sage.structure.coerce' extension
gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -
fPIC -I/extra/home/mabshoff/SAGE-build/sage-2.8/local//include -I/
extra/home/mabshoff/SAGE-build/sage-2.8/local//include/python -I/extra/
home/mabshoff/SAGE-build/sage-2.8/devel//sage/sage/ext -I/extra/home/
mabshoff/SAGE-build/sage-2.8/local/include/python2.5 -c sage/structure/
coerce.c -o build/temp.solaris-2.9-sun4u-2.5/sage/structure/coerce.o -
w
sage/structure/coerce.c:824: error: expected identifier or '(' before
numeric constant
sage/structure/coerce.c:825: error: expected ';' before 'int'
error: command 'gcc' failed with exit status 1
sage: There was an error installing modified sage library code.

If you look around line 300 in coerce.pyx you will find the following
code:

    def coercion_maps(self, R, S):
        return self.coercion_maps_c(R, S)

    cdef coercion_maps_c(self, R, S):
        try:
            return self._coercion_maps[R,S]
        except KeyError:
            homs = self.discover_coercion_c(R, S)
            if homs is not None:
                self._coercion_maps[R,S] = homs
                self._coercion_maps[S,R] = (homs[1], homs[0])
            else:
                self._coercion_maps[R,S] = self._coercion_maps[S,R] =
None
            return homs

    def get_action(self, R, S, op):
        return self.get_action_c(R, S, op)

Now cython turns this into C code. All the variables named R in cython
are  named _R in C, analog for S which turns into _S. This is a
problem in Solaris because at least one of those is defined as a
numercial constant and therefore makes gcc barf. In LinBox the same
happended in lb-solve.C where a template member is called _B. It would
be very nice if somebody familiar with the coercion code could change
the variable names to something longer and submit a patch to William.
That way he migth wake up to a bunch of bugs squashed. If you know of
any other places in the cython code now might be a good idea to speak
up.

There have been many changes already to the 2.8 packages in order to
make them build on Solaris. If you want to help out check out #sage-
devel in a couple hours. I am getting some sleep now, it has been a
long night.

Cheers,

Michael


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to