#20437: Misinstallation of Python in Cygwin
-------------------------+-------------------------------------------------
   Reporter:  embray     |            Owner:
       Type:  defect     |           Status:  new
   Priority:  major      |        Milestone:  sage-7.2
  Component:  porting:   |         Keywords:
  Cygwin                 |          Authors:
  Merged in:             |  Report Upstream:  Not yet reported upstream;
  Reviewers:             |  Will do shortly.
Work issues:             |           Branch:
     Commit:             |     Dependencies:
   Stopgaps:             |
-------------------------+-------------------------------------------------
 I've encountered yet another problem in my quest to get sage building on
 Cygwin.  I'm surprised this hasn't come up before though which makes me
 wonder if I'm doing something wrong.

 The DLL loader library, libpython2.7.dll.a, gets installed to
 `$(SAGE_LOCAL)/lib/python2.7/config/` which is not normally on the ld
 search path (similar on Python 3 I think).

 This means that when building extension modules `-lpython2.7` is actually
 linking against my system Python (in this case the Python that came with
 cygwin--also Python 2.7.10).  This is of course wrong, but isn't a problem
 for the majority of modules, including sage itself (at least it wasn't a
 problem for compiling).  It was actually PIL(low) where this fell apart
 because it used some `PyUnicode_` functions that were not found in my
 system libpython because it was compiled with `--enable-unicode=ucs2`,
 whereas Sage builds Python with `--enable-unicode=ucs4`.

 When installing Python, Sage should be making a symlink to
 `$(SAGE_LOCAL)/lib/python2.7/config/libpython2.7.dll.a` in
 `$(SAGE_LOCAL)/lib`.

 I'm leaning toward calling this an upstream bug--I don't understand why
 this isn't done automatically by Python's Makefile.  The relevant portion
 begins [https://hg.python.org/cpython/file/v2.7.10/Makefile.pre.in#l916
 here].  It seems that if a DLL is built it ''does not'' install a symlink
 to the loader library in lib/.

 For reference, Cygwin's own system package for Python installs this
 symlink manually...

--
Ticket URL: <http://trac.sagemath.org/ticket/20437>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to