CGATOxford/cgat

compilation error after lastest pull

Closed this issue · 6 comments

Hi,

When trying to update extensions after the latest pull, I get the following error:

cythoning scripts/_bam2stats.pyx to scripts/_bam2stats.c

Error compiling Cython file:
------------------------------------------------------------
...
    cdef int x
    cdef int lflags = len(FLAGS)
    cdef int f

    # detailed counting
    cdef PersistentFastqProxy fq
        ^
------------------------------------------------------------

scripts/_bam2stats.pyx:91:9: 'PersistentFastqProxy' is not a type identifier
building 'CGAT._bam2stats' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE= -I/home/mb1ims/.conda/envs/mb1ims/lib/python2.7/site-packages/numpy/core/include -I/home/mb1ims/.conda/envs/mb1ims/lib/python2.7/site-packages/pysam -I/home/mb1ims/.conda/envs/mb1ims/lib/python2.7/site-packages/pysam/include/htslib -I/home/mb1ims/.conda/envs/mb1ims/lib/python2.7/site-packages/pysam/include/samtools -I/home/mb1ims/.conda/envs/mb1ims/include/python2.7 -c scripts/_bam2stats.c -o build/temp.linux-x86_64-2.7/scripts/_bam2stats.o
scripts/_bam2stats.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

I think this looks like a pysam error.
pysam is version 0.8.3 via the cgat conda channel.

Cheers,

Ian

Hi Ian,

Try adding the bioconda channel and updating your conda installation:

conda config --add channels https://conda.anaconda.org/bioconda
conda update --all

Best regards,
Sebastian

Thanks sebastian. Should I be using bioconda instead of cgat? Is all the cgat stuff now in bioconda? I noicte when I do this that I'm getting cgat's r-lite rather than r from bioconda for example.

Hi Ian,

Thanks for your feedback.

Please use both of them. I have to think about how to split conda packages between those repositories.

Regarding R, I am now using the R specific channel as well:
https://conda.anaconda.org/r

and that is where future CGAT packages will be pointing to.

Best regards,
Sebastian.

Hi @sebastian-luna-valero ,

I thought you might like to know that doing a conda update --all updates bx-python. This bx-python update requires a new numpy version, but for some reason, this isn't installed. You get this error when you build the cgat extensions:

File "/home/travis/build/CGATOxford/cgat/scripts/gtf2table.py", line 483, in <module>
    import bx.bbi.bigwig_file
  File "bx/bbi/bigwig_file.pyx", line 1, in init bx.bbi.bigwig_file (lib/bx/bbi/bigwig_file.c:7691)
  File "__init__.pxd", line 155, in init bx.bbi.bbi_file (lib/bx/bbi/bbi_file.c:12824)
ValueError: numpy.dtype has the wrong size, try recompiling

You get this from any script that uses bx.

If you uninstall bx-python and reinstall it, the new version of numpy is installed.

I'm letting you know this, mostly because this is the reason your build on Travis is currently failing.

Ian

Hi Ian,

Thank you very much. I was working on this earlier this week but got distracted with other important issues.

You are certainly right. I had to update the ggplot package which was built with numpy 1.9 and that was causing the problem. The tests passed locally and I am now rebuilding on Travis to check.

Best regards,
Sebastian.

Thanks again, that fixed it.

Best regards,
Sebastian.