[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Help needed in gcc-4.7 - cython issue



Hi,

I did run into some trouble with a fresh package which is prepared in
SVN at

   Vcs-Svn: svn://svn.debian.org/debian-med/trunk/packages/python-biom-format/trunk/

You can obtain the source via `uscan --force-download` or
`make -f debian/rules get-orig-source` .

The package builds nicely when leaving out cython as Build-Depends but
upstream recommended strongly to use cython which results in trying to
build a C++ file which unfortunately fails when using gcc-4.7.  I
stripped down the command line which fails to the minimum and here is
the comparison between gcc-4.7 and gcc-4.6

$ gcc-4.7 -I/usr/include/python2.6 -c python-code/support-code/_sparsemat.cpp -std=c++0x
python-code/support-code/_sparsemat.cpp: In function ‘void __Pyx_RaiseArgtupleInvalid(const char*, int, Py_ssize_t, Py_ssize_t, Py_ssize_t)’:
python-code/support-code/_sparsemat.cpp:5164:95: error: unable to find string literal operator ‘operator"" PY_FORMAT_SIZE_T’
python-code/support-code/_sparsemat.cpp: In function ‘void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t)’:
python-code/support-code/_sparsemat.cpp:5424:52: error: unable to find string literal operator ‘operator"" PY_FORMAT_SIZE_T’
python-code/support-code/_sparsemat.cpp: In function ‘void __Pyx_RaiseTooManyValuesError(Py_ssize_t)’:
python-code/support-code/_sparsemat.cpp:5430:73: error: unable to find string literal operator ‘operator"" PY_FORMAT_SIZE_T’
$ gcc-4.6 -I/usr/include/python2.6 -c python-code/support-code/_sparsemat.cpp -std=c++0x

I did some giggling and noticed that the error above occured in some
threads were some solution was promised with cython 0.16.  So I also
tried cython from experimental and can confirm that the problem above
remains identical - so cython 0.16 does not seem to be the solution.

However, in some way I would like to blame cython for the problem anyway
because the problematic lines do seem to be injected by the cython
preprocessing (the file python-code/support-code/_sparsemat.cpp is
automatically created when calling

    python setup.py

... unfortunately I have no idea about cython internals).  In other
words:  The problem might be relevant also for other packages using
cython in connection with gcc-4.7.

Any hint how to fix this would be welcome.

Kind regards

       Andras.

-- 
http://fam-tille.de


Reply to: