#19868: interpreters build fails on cygwin
-------------------------------------+-------------------------------------
       Reporter:  gouezel            |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.0
      Component:  porting: Cygwin    |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Sebastien Gouezel  |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/gouezel/DL_IMPORT                |  149e52928ffb5ef70599661e5f2d7e0fa6e6cda7
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by {'newvalue': u'Sebastien Gouezel', 'oldvalue': ''}):

 * status:  new => needs_review
 * commit:   => 149e52928ffb5ef70599661e5f2d7e0fa6e6cda7
 * branch:   => u/gouezel/DL_IMPORT
 * author:   => Sebastien Gouezel


Comment:

 Not sure it is really a bug, more like an intrinsic limitation: Cython
 tries to guess if some declaration will be done in a DLL or not, gets it
 right most of the time, sometimes not, and it seems there is no keyword to
 force one behavior or the other (and no heuristics can always succeed).

 Anyway, in this case it can be fixed as in the attached branch. There were
 two problems:
 - cython adds `DL_IMPORT` in .h files it generates (which is rather
 sensible in general, but not in this use case). Solution: do not import
 the auto-generated header, declare directly `extern` functions, just as in
 #13336.
 - with `cdef extern:`, cython also adds `DL_IMPORT`. It does not if the
 declaration is coming from a header, since then the black magic should be
 done in the header (also looks rather sensible to me). So, replace `cdef
 extern:` with `cdef extern from *:` so that cython thinks the function is
 declared in some header.
 ----
 New commits:
 
||[http://git.sagemath.org/sage.git/commit/?id=149e52928ffb5ef70599661e5f2d7e0fa6e6cda7
 149e529]||{{{ #19868: remove DL_IMPORT cython statements}}}||

--
Ticket URL: <http://trac.sagemath.org/ticket/19868#comment:10>
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