#18825: cython() command does not find ginac_wrap.h
----------------------------------+------------------------
       Reporter:  jdemeyer        |        Owner:
           Type:  defect          |       Status:  new
       Priority:  major           |    Milestone:  sage-6.8
      Component:  cython          |   Resolution:
       Keywords:                  |    Merged in:
        Authors:  Jeroen Demeyer  |    Reviewers:
Report Upstream:  N/A             |  Work issues:
         Branch:                  |       Commit:
   Dependencies:                  |     Stopgaps:
----------------------------------+------------------------

Comment (by jdemeyer):

 There is a different unrelated issue:
 {{{
 sage: cython("from sage.symbolic.expression cimport Expression")
 ...
 RuntimeError: Error compiling
 /home/jdemeyer/.sage/temp/tamiyo/26723/tmp_OFqylF.spyx:
 running build
 running build_ext
 building '_home_jdemeyer__sage_temp_tamiyo_26723_tmp_OFqylF_spyx_0'
 extension
 creating build
 creating build/temp.linux-x86_64-2.7
 gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC
 -I/usr/local/src/sage-git/local/include -I/usr/local/src/sage-
 git/local/include/python2.7 -I/usr/local/src/sage-git/local/lib/python2.7
 /site-packages/numpy/core/include -I/usr/local/src/sage-
 git/local/lib/python2.7/site-packages -I/usr/local/src/sage-
 git/local/lib/python2.7/site-packages/sage/ext
 -I/home/jdemeyer/.sage/temp/tamiyo/26723 -I/usr/local/src/sage-
 git/local/include/python2.7 -c
 _home_jdemeyer__sage_temp_tamiyo_26723_tmp_OFqylF_spyx_0.c -o build/temp
 .linux-
 x86_64-2.7/_home_jdemeyer__sage_temp_tamiyo_26723_tmp_OFqylF_spyx_0.o -w
 -O2

 In file included from /usr/local/src/sage-
 git/local/include/pynac/ginac.h:26:0,
                  from /usr/local/src/sage-git/local/lib/python2.7/site-
 packages/sage/symbolic/ginac_wrap.h:11,
                  from
 _home_jdemeyer__sage_temp_tamiyo_26723_tmp_OFqylF_spyx_0.c:257:
 /usr/local/src/sage-git/local/include/pynac/version.h:31:1: error: unknown
 type name ‘namespace’
  namespace GiNaC {
  ^
 /usr/local/src/sage-git/local/include/pynac/version.h:31:17: error:
 expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
  namespace GiNaC {
                  ^
 In file included from /usr/local/src/sage-
 git/local/include/pynac/ginac.h:28:0,
                  from /usr/local/src/sage-git/local/lib/python2.7/site-
 packages/sage/symbolic/ginac_wrap.h:11,
                  from
 _home_jdemeyer__sage_temp_tamiyo_26723_tmp_OFqylF_spyx_0.c:257:
 /usr/local/src/sage-git/local/include/pynac/basic.h:28:33: fatal error:
 cstddef: No such file or directory
  #include <cstddef> // for size_t
                                  ^
 compilation terminated.
 error: command 'gcc' failed with exit status 1
 }}}
 This C++ code is compiled as C because the `cython()` command ignores the
 `# distutils: language=c++` on top of `ginac.pxd`

 Maybe we should use distutils to implement `cython()`?

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