#15317: Troubles with Python and ncurses on Cygwin
-------------------------------------+-------------------------------------
       Reporter:  jpflori            |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.1
      Component:  porting: Cygwin    |   Resolution:
       Keywords:  cygwin spkg        |    Merged in:
  ncurses                            |    Reviewers:
        Authors:  Jean-Pierre Flori  |  Work issues:
Report Upstream:  Workaround found;  |       Commit:
  Bug reported upstream.             |  79166403ba2f72a9cda9a6641a8914293d3cd2d1
         Branch:                     |     Stopgaps:
  u/jpflori/ticket/15317             |
   Dependencies:                     |
-------------------------------------+-------------------------------------
Changes (by {'newvalue': u'Jean-Pierre Flori', 'oldvalue': ''}):

 * status:  new => needs_review
 * author:   => Jean-Pierre Flori
 * branch:   => u/jpflori/ticket/15317
 * upstream:  Fixed upstream, but not in a stable release. => Workaround
     found; Bug reported upstream.
 * commit:   => 79166403ba2f72a9cda9a6641a8914293d3cd2d1


Old description:

> Python currently fails/is suboptimal on Cygwin because:
> * it does not properly detect readline which is only installed as a
> shared library, patch "2.7.3-dylib.patch" from Cygwin package fixes that;
> * the curses module is not built because of undefined refs, just passing
> -lcurses when linking is not enough, one should add -ltinfo; in fact the
> real problem is that setup.py tries to run ldd on the import library
> (dll.a) which fails to detect what libraries are already linked and
> anyway would decide to discard -ltinfo as its already linked to readline,
> but on Cygwin you have to explicitely pass everything...
> * it segfault at startup when loading the readline module, not sure why.
> It looks exactly as what is reported at
> http://trac.macports.org/ticket/29496 . Rebuilding ncurses with debug
> info (including CFLAGS="-O0 -g" which cannot easily be passed right now)
> does not give much info. The offending line pointed by GCC is "char
> *result = exit_attribute_mode;"; maybe some dark magic going on as
> reported in http://lists.gnu.org/archive/html/bug-
> ncurses/2006-10/msg00002.html ; please not that on Cygwin the stack is
> small by default but playing a little bit with that did not really help.
> Further info: ncurses 5.7 is fine, ncurses 5.8 fails in the same way.
> Upstream bu report: http://lists.gnu.org/archive/html/bug-
> ncurses/2013-10/msg00014.html. Should be fixed with
> http://lists.gnu.org/archive/html/bug-ncurses/2013-10/msg00017.html

New description:

 Python currently fails/is suboptimal on Cygwin because:
 * it does not properly detect readline which is only installed as a shared
 library, patch "2.7.3-dylib.patch" from Cygwin package fixes that;
 * the curses module is not built because of undefined refs, just passing
 -lcurses when linking is not enough, one should add -ltinfo; in fact the
 real problem is that setup.py tries to run ldd on the import library
 (dll.a) which fails to detect what libraries are already linked and anyway
 would decide to discard -ltinfo as its already linked to readline, but on
 Cygwin you have to explicitely pass everything...
 * it segfault at startup when loading the readline module, not sure why.
 It looks exactly as what is reported at
 http://trac.macports.org/ticket/29496 . Rebuilding ncurses with debug info
 (including CFLAGS="-O0 -g" which cannot easily be passed right now) does
 not give much info. The offending line pointed by GCC is "char *result =
 exit_attribute_mode;"; maybe some dark magic going on as reported in
 http://lists.gnu.org/archive/html/bug-ncurses/2006-10/msg00002.html ;
 please not that on Cygwin the stack is small by default but playing a
 little bit with that did not really help. Further info: ncurses 5.7 is
 fine, ncurses 5.8 fails in the same way. Upstream bu report:
 http://lists.gnu.org/archive/html/bug-ncurses/2013-10/msg00014.html.
 Should be fixed with http://lists.gnu.org/archive/html/bug-
 ncurses/2013-10/msg00017.html

 This ticket fixes the Python part.
 The ncurses part is #15617

--

Comment:

 The branch I pushed is cleaner and should be good to go.
 ----
 New commits:
 
||[http://git.sagemath.org/sage.git/commit/?id=79166403ba2f72a9cda9a6641a8914293d3cd2d1
 7916640]||{{{Make sure tinfo is correctly linked in when needed on
 Cygwin.}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=9acea9b4e12e69f433d269e0ff18a390ce56497e
 9acea9b]||{{{Actually add the NTL patch.}}}||

--
Ticket URL: <http://trac.sagemath.org/ticket/15317#comment:17>
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/groups/opt_out.

Reply via email to