jgaetel / cutadapt

Automatically exported from code.google.com/p/cutadapt
0 stars 0 forks source link

Compilation fails under CentOS 6.5 #73

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Compilation cutadapt 1.4.1 fails under CentOS 6.5.

Cython version is:
Cython-0.14.1-3.el6.x86_64

Error produced is:
$ python setup.py build
running build
running build_py
running build_ext
skipping 'cutadapt/_align.c' Cython extension (up-to-date)
skipping 'cutadapt/_qualtrim.c' Cython extension (up-to-date)
cythoning cutadapt/_seqio.pyx to cutadapt/_seqio.c

Error compiling Cython file:
------------------------------------------------------------
...
# kate: syntax Python;
# cython: profile=False
from __future__ import print_function, division, absolute_import
                                                ^
------------------------------------------------------------

cutadapt/_seqio.pyx:3:49: future feature absolute_import is not defined
building 'cutadapt._seqio' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic 
-D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic 
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.6 -c cutadapt/_seqio.c 
-o build/temp.linux-x86_64-2.6/cutadapt/_seqio.o
cutadapt/_seqio.c:1:2: error: #error Do not use this file, it is the result of 
a failed Cython compilation.
error: command 'gcc' failed with exit status 1

Version 1.3 compiles with no iusses.
Regards
-- 
Gennaro Oliva

Original issue reported on code.google.com by gennaro....@gmail.com on 25 Mar 2014 at 3:29

GoogleCodeExporter commented 9 years ago
Your Cython version is quite old, but that is fine. Could you please edit the 
file cutadapt/_seqio.pyx and retry? Change the third line from
from __future__ import print_function, division, absolute_import
to
from __future__ import print_function, division

The absolute_import directive is not necessary at all here. If that fixes the 
problem, I will make the change in the next cutadapt release.

Original comment by marcel.m...@tu-dortmund.de on 25 Mar 2014 at 3:53

GoogleCodeExporter commented 9 years ago
Thanks for your quick answer, if I modify the code as you suggested I get 
another error:

$ python setup.py build
running build
running build_py
running build_ext
skipping 'cutadapt/_align.c' Cython extension (up-to-date)
skipping 'cutadapt/_qualtrim.c' Cython extension (up-to-date)
cythoning cutadapt/_seqio.pyx to cutadapt/_seqio.c

Error compiling Cython file:
------------------------------------------------------------
...
# kate: syntax Python;
# cython: profile=False
from __future__ import print_function, division

from .xopen import xopen
    ^
------------------------------------------------------------

cutadapt/_seqio.pyx:5:5: Expected an identifier
building 'cutadapt._seqio' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic 
-D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic 
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.6 -c cutadapt/_seqio.c 
-o build/temp.linux-x86_64-2.6/cutadapt/_seqio.o
cutadapt/_seqio.c:1:2: error: #error Do not use this file, it is the result of 
a failed Cython compilation.
error: command 'gcc' failed with exit status 1

Original comment by gennaro....@gmail.com on 25 Mar 2014 at 5:57

GoogleCodeExporter commented 9 years ago
Ok, the Cython version you have is really too old. That is intended not to be a 
problem since I've included pre-compiled C sources in the cutadapt tarball so 
Cython isn't necessary at all. However, the setup script detects that cython is 
available and therefore tries to use it.

Please try this fix: Replace the line where it says "USE_CYTHON = True" with 
"USE_CYTHON = False". You need to re-unpack the cutadapt-1.4.1.tar.gz file for 
that since the C files have now been overwritten by the old Cython.

I've fixed the problem in cutadapt now: At installation time, it will not only 
detect whether Cython is installed, but also whether the Cython version is 
recent enough (0.15 is sufficient).

Original comment by marcel.m...@tu-dortmund.de on 26 Mar 2014 at 8:25

GoogleCodeExporter commented 9 years ago
Now I get:

$ python setup.py build
Cython is not installed and pre-compiled C sources
are also not available. You need to install Cython to continue.

Thanks for your support.

Original comment by gennaro....@gmail.com on 26 Mar 2014 at 12:22

GoogleCodeExporter commented 9 years ago
Ok, I seem to have forgotten to include a file in the cutadapt distribution. 
Please get cutadapt 1.4.2 and try again. Sorry this is taking so long ...
https://pypi.python.org/packages/source/c/cutadapt/cutadapt-1.4.2.tar.gz

Original comment by marcel.m...@tu-dortmund.de on 26 Mar 2014 at 12:57

GoogleCodeExporter commented 9 years ago
This version worked fine!
Thank you very much for your help and your time.

Original comment by gennaro....@gmail.com on 26 Mar 2014 at 2:12

GoogleCodeExporter commented 9 years ago
Great, finally ;-). Glad I could help!

Original comment by marcel.m...@tu-dortmund.de on 26 Mar 2014 at 2:21