#17254: Upgrade to Singular-4-0-1
-------------------------------------+-------------------------------------
       Reporter:  jdemeyer           |        Owner:
           Type:  enhancement        |       Status:  new
       Priority:  major              |    Milestone:  sage-6.4
      Component:  packages:          |   Resolution:
  standard                           |    Merged in:
       Keywords:                     |    Reviewers:
        Authors:                     |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  3a512cd7e08e21a4a4e66bfe9179290601717ba0
  u/jakobkroeker/ticket.17254.squashed|     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by john_perry):

 Replying to [comment:34 john_perry]:
 > I just applied this to 6.4.1 and encountered the message,
 >
 >     fatal error: Singular/libsingular.h: No such file or directory
 >
 > while compiling
 >
 >
 build/cythonized/sage/algebras/letterplace/free_algebra_element_letterplace.cpp
 >
 > Any ideas what causes this?

 It's now certain that this, too, was caused by the failure to install
 `Singular` because `singular` exists in the directory (what can I say,
 it's a Mac). Removing that link and reinstalling the spkg fixed all these
 problems.

 '''Meanwhile''', I discovered some memory-related bugs in the patch. For
 instance, ring.pyx has the line
 {{{
 assert( exponent == base_ring.degree() )
 }}}
 which causes a failure. I'm not sure why those should be equal (the test I
 used had `Zmod(2^3)` where `exponent==3` and `base_ring.degree()==1`), but
 commenting it out leads to a failure on these lines:
 {{{
 _param.GFChar     = ch;
 _param.GFDegree   = base_ring.degree();
 _param.GFPar_name = omStrDup(base_ring.gen());
 }}}
 because `_param` has not been initialized. Adding
 {{{
 _param = <GFInfo *>omAlloc(sizeof(GFInfo));
 }}}
 '''before''' the access gives me a ring. However,

     1. I'm not sure whether `omAlloc` or one of the other `omAlloc*`
 commands is more appropriate (e.g., `omAlloc0`). Anyone know?

     1. I suppose this has to be freed somewhere... I know there's an
 obvious-sounding place, so I'll find it.

 There are other places this change has to occur. One more question:

     * A few lines before the ones I cited above is the test for 64-bits.
 I've switched to jdemeyer's test (`sizeof(long)>4`). However, the code in
 the patch is exactly the same for both 32- and 64-bit. Is there a
 recommendation for what to do here? I'm not sufficiently familiar with
 this to know what to do.

--
Ticket URL: <http://trac.sagemath.org/ticket/17254#comment:56>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to