brentp / cyvcf2

cython + htslib == fast VCF and BCF processing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cython issue with Python3.7

quattro opened this issue · comments

I tried to install cyvcf2 using pip on my Mac and ran into some issues with cython. It looks like this issue is common as just copy/pasting the cython errors results in a few google hits for other projects. However manually recompiling the cython with a new release code doesn't seem to work either.

Collecting cyvcf2
  Using cached https://files.pythonhosted.org/packages/d8/c8/3134460616b1a73015388786cc0b33abd27827026bccf03dc1a3c6967a44/cyvcf2-0.10.1.tar.gz
Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from cyvcf2) (1.15.4)
Installing collected packages: cyvcf2
  Running setup.py install for cyvcf2 ... error
    Complete output from command /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-1oa7glwo/cyvcf2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/tmp/pip-record-9e_vyw5e/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-3.7
    creating build/lib.macosx-10.9-x86_64-3.7/cyvcf2
    copying cyvcf2/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2
    copying cyvcf2/cli.py -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2
    copying cyvcf2/__main__.py -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2
    creating build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test_reader.py -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test_hemi.py -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test_cli.py -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    running egg_info
    writing cyvcf2.egg-info/PKG-INFO
    writing dependency_links to cyvcf2.egg-info/dependency_links.txt
    writing entry points to cyvcf2.egg-info/entry_points.txt
    writing requirements to cyvcf2.egg-info/requires.txt
    writing top-level names to cyvcf2.egg-info/top_level.txt
    reading manifest file 'cyvcf2.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'cyvcf2.egg-info/SOURCES.txt'
    copying cyvcf2/cyvcf2.c -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2
    copying cyvcf2/cyvcf2.pxd -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2
    copying cyvcf2/cyvcf2.pyx -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2
    copying cyvcf2/helpers.c -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2
    copying cyvcf2/helpers.h -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2
    copying cyvcf2/relatedness.h -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2
    copying cyvcf2/tests/__init__.pyc -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/bug.vcf.gz -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/decomposed.vcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/empty.vcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/issue_44.vcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/o.vcf.gz -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/seg.vcf.gz -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test-alt-repr.vcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test-format-string.vcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test-haploidX.vcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test-hemi.vcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test-multiallelic-homozygous-alt.vcf.gz -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test-multiallelic-homozygous-alt.vcf.gz.tbi -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test-strict-gt-option-flag.vcf.gz -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test-strict-gt-option-flag.vcf.gz.tbi -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test.comp_het.3.vcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test.snpeff.bcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test.snpeff.bcf.csi -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test.snpeff.vcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test.vcf.gz -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test.vcf.gz.tbi -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test_cli.pyc -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test_gt_alt_freqs.vcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test_gt_bases.vcf.gz -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test_hemi.pyc -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test_reader.pyc -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    running build_ext
    skipping 'cyvcf2/cyvcf2.c' Cython extension (up-to-date)
    building 'cyvcf2.cyvcf2' extension
    creating build/temp.macosx-10.9-x86_64-3.7
    creating build/temp.macosx-10.9-x86_64-3.7/cyvcf2
    creating build/temp.macosx-10.9-x86_64-3.7/htslib
    creating build/temp.macosx-10.9-x86_64-3.7/htslib/cram
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c cyvcf2/cyvcf2.c -o build/temp.macosx-10.9-x86_64-3.7/cyvcf2/cyvcf2.o
    In file included from cyvcf2/cyvcf2.c:436:
    In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
    In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18:
    In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1821:
    /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by "          "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
    #warning "Using deprecated NumPy API, disable it by " \
     ^
    In file included from cyvcf2/cyvcf2.c:441:
    htslib/htslib/hfile.h:245:35: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if (fp->limit - fp->begin < nbytes){
                ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~
    cyvcf2/cyvcf2.c:7911:32: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_v_ret = bcf_hdr_append(__pyx_v_self->hdr, __pyx_t_2);
                                   ^~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:443:35: note: passing argument to parameter 'h' here
        int bcf_hdr_append(bcf_hdr_t *h, const char *line);
                                      ^
    cyvcf2/cyvcf2.c:7953:30: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_v_ret = bcf_hdr_sync(__pyx_v_self->hdr);
                                 ^~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:479:33: note: passing argument to parameter 'h' here
        int bcf_hdr_sync(bcf_hdr_t *h);
                                    ^
    cyvcf2/cyvcf2.c:8562:37: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_v_ret = bcf_hdr_set_samples(__pyx_v_self->hdr, ((char const *)__pyx_t_6), 0);
                                        ^~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:315:40: note: passing argument to parameter 'hdr' here
        int bcf_hdr_set_samples(bcf_hdr_t *hdr, const char *samples, int is_file);
                                           ^
    cyvcf2/cyvcf2.c:8829:32: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_v_ret = bcf_hdr_append(__pyx_v_self->hdr, __pyx_t_4);
                                   ^~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:443:35: note: passing argument to parameter 'h' here
        int bcf_hdr_append(bcf_hdr_t *h, const char *line);
                                      ^
    cyvcf2/cyvcf2.c:8882:30: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_v_ret = bcf_hdr_sync(__pyx_v_self->hdr);
                                 ^~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:479:33: note: passing argument to parameter 'h' here
        int bcf_hdr_sync(bcf_hdr_t *h);
                                    ^
    cyvcf2/cyvcf2.c:9088:34: warning: passing 'const bcf_hdr_t *' to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_cur_scope->__pyx_v_itr = bcf_itr_querys(__pyx_cur_scope->__pyx_v_self->hidx, __pyx_cur_scope->__pyx_v_self->hdr, __pyx_t_2);
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:796:102: note: expanded from macro 'bcf_itr_querys'
        #define bcf_itr_querys(idx, hdr, s) hts_itr_querys((idx), (s), (hts_name2id_f)(bcf_hdr_name2id), (hdr), hts_itr_query, bcf_readrec)
                                                                                                         ^~~~~
    htslib/htslib/hts.h:675:97: note: passing argument to parameter 'hdr' here
        hts_itr_t *hts_itr_querys(const hts_idx_t *idx, const char *reg, hts_name2id_f getid, void *hdr, hts_itr_query_func *itr_query, hts_readrec_func *readrec);
                                                                                                    ^
    cyvcf2/cyvcf2.c:10557:134: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        __pyx_t_3 = ((PyObject *)__pyx_f_6cyvcf2_6cyvcf2_newHREC((__pyx_cur_scope->__pyx_v_self->hdr->hrec[__pyx_cur_scope->__pyx_v_i]), __pyx_cur_scope->__pyx_v_self->hdr)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 415, __pyx_L1_error)
                                                                                                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cyvcf2/cyvcf2.c:2575:118: note: passing argument to parameter here
    static CYTHON_INLINE struct __pyx_obj_6cyvcf2_6cyvcf2_HREC *__pyx_f_6cyvcf2_6cyvcf2_newHREC(bcf_hrec_t *, bcf_hdr_t *); /*proto*/
                                                                                                                         ^
    cyvcf2/cyvcf2.c:12226:21: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        bcf_hdr_destroy(__pyx_v_self->hdr);
                        ^~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:261:37: note: passing argument to parameter 'h' here
        void bcf_hdr_destroy(bcf_hdr_t *h);
                                        ^
    cyvcf2/cyvcf2.c:12712:15: warning: 'bcf_hdr_fmt_text' is deprecated: use bcf_hdr_format() instead [-Wdeprecated-declarations]
      __pyx_v_s = bcf_hdr_fmt_text(__pyx_v_self->hdr, 0, (&__pyx_v_hlen));
                  ^
    htslib/htslib/vcf.h:440:9: note: 'bcf_hdr_fmt_text' has been explicitly marked deprecated here
            HTS_DEPRECATED("use bcf_hdr_format() instead");
            ^
    htslib/htslib/hts_defs.h:65:49: note: expanded from macro 'HTS_DEPRECATED'
    #define HTS_DEPRECATED(message) __attribute__ ((__deprecated__ (message)))
                                                    ^
    cyvcf2/cyvcf2.c:12962:18: warning: assigning to 'char **' from 'const char **' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_v_cnames = bcf_hdr_seqnames(__pyx_v_self->hdr, (&__pyx_v_n));
                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cyvcf2/cyvcf2.c:13085:24: warning: passing 'const bcf_hdr_t *' to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
          __pyx_v_cnames = bcf_index_seqnames(__pyx_v_self->hidx, __pyx_v_self->hdr, (&__pyx_v_n));
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:799:111: note: expanded from macro 'bcf_index_seqnames'
        #define bcf_index_seqnames(idx, hdr, nptr) hts_idx_seqnames((idx),(nptr),(hts_id2name_f)(bcf_hdr_id2name),(hdr))
                                                                                                                  ^~~~~
    htslib/htslib/hts.h:677:92: note: passing argument to parameter 'hdr' here
        const char **hts_idx_seqnames(const hts_idx_t *idx, int *n, hts_id2name_f getid, void *hdr); // free only the array, not the values
                                                                                               ^
    cyvcf2/cyvcf2.c:13085:22: warning: assigning to 'char **' from 'const char **' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
          __pyx_v_cnames = bcf_index_seqnames(__pyx_v_self->hidx, __pyx_v_self->hdr, (&__pyx_v_n));
                         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cyvcf2/cyvcf2.c:13318:22: warning: assigning to 'char **' from 'const char **' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
          __pyx_v_cnames = tbx_seqnames(__pyx_v_self->idx, (&__pyx_v_n));
                         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cyvcf2/cyvcf2.c:23278:33: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
      for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_4; __pyx_t_2+=1) {
                          ~~~~~~~~~ ^ ~~~~~~~~~
    cyvcf2/cyvcf2.c:25318:17: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        __pyx_v_key = bcf_hdr_int2id(__pyx_v_self->vcf->hdr, BCF_DT_ID, __pyx_v_fmt.id);
                    ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cyvcf2/cyvcf2.c:33013:33: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
      for (__pyx_t_3 = 1; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
                          ~~~~~~~~~ ^ ~~~~~~~~~
    cyvcf2/cyvcf2.c:33103:33: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
      for (__pyx_t_4 = 1; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
                          ~~~~~~~~~ ^ ~~~~~~~~~
    cyvcf2/cyvcf2.c:33313:33: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
      for (__pyx_t_8 = 1; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
                          ~~~~~~~~~ ^ ~~~~~~~~~
    cyvcf2/cyvcf2.c:33371:29: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'Py_ssize_t' (aka 'long') [-Wsign-compare]
        __pyx_t_2 = ((__pyx_t_3 != __pyx_t_6) != 0);
                      ~~~~~~~~~ ^  ~~~~~~~~~
    cyvcf2/cyvcf2.c:35423:13: warning: assigning to 'bcf_hdr_t *' from 'const bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_v_h = __pyx_t_5;
                ^ ~~~~~~~~~
    cyvcf2/cyvcf2.c:38306:16: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_v_name = bcf_hdr_int2id(__pyx_v_self->hdr, BCF_DT_ID, __pyx_v_info->key);
                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cyvcf2/cyvcf2.c:39174:18: warning: assigning to 'bcf_hdr_t *' from 'const bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_v_i->hdr = __pyx_t_4;
                     ^ ~~~~~~~~~
    cyvcf2/cyvcf2.c:39758:16: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      bcf_hdr_sync(__pyx_v_tmpl->hdr);
                   ^~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:479:33: note: passing argument to parameter 'h' here
        int bcf_hdr_sync(bcf_hdr_t *h);
                                    ^
    cyvcf2/cyvcf2.c:39786:16: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      bcf_hdr_sync(__pyx_v_self->__pyx_base.hdr);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:479:33: note: passing argument to parameter 'h' here
        int bcf_hdr_sync(bcf_hdr_t *h);
                                    ^
    cyvcf2/cyvcf2.c:39852:47: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      bcf_hdr_write(__pyx_v_self->__pyx_base.hts, __pyx_v_self->__pyx_base.hdr);
                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:320:47: note: passing argument to parameter 'h' here
        int bcf_hdr_write(htsFile *fp, bcf_hdr_t *h);
                                                  ^
    cyvcf2/cyvcf2.c:40032:36: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        __pyx_t_1 = ((bcf_hdr_add_hrec(__pyx_v_self->__pyx_base.hdr, __pyx_v_h) < 0) != 0);
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:482:37: note: passing argument to parameter 'hdr' here
        int bcf_hdr_add_hrec(bcf_hdr_t *hdr, bcf_hrec_t *hrec);
                                        ^
    cyvcf2/cyvcf2.c:40075:18: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        bcf_hdr_sync(__pyx_v_self->__pyx_base.hdr);
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:479:33: note: passing argument to parameter 'h' here
        int bcf_hdr_sync(bcf_hdr_t *h);
                                    ^
    cyvcf2/cyvcf2.c:40139:76: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_t_3 = __Pyx_PyInt_From_int(bcf_write(__pyx_v_self->__pyx_base.hts, __pyx_v_self->__pyx_base.hdr, __pyx_v_var->b)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2079, __pyx_L1_error)
                                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:370:43: note: passing argument to parameter 'h' here
        int bcf_write(htsFile *fp, bcf_hdr_t *h, bcf1_t *v);
                                              ^
    cyvcf2/cyvcf2.c:60173:65: error: too many arguments to function call, expected 3, have 4
        return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                     ^~~~
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include/stddef.h:105:16: note: expanded from macro 'NULL'
    #  define NULL ((void*)0)
                   ^~~~~~~~~~
    cyvcf2/cyvcf2.c:61771:24: error: no member named 'exc_type' in 'struct _ts'
        tmp_type = tstate->exc_type;
                   ~~~~~~  ^
    cyvcf2/cyvcf2.c:61772:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tmp_value = tstate->exc_value;
                            ^~~~~~~~~
                            curexc_value
    /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:237:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    cyvcf2/cyvcf2.c:61773:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tmp_tb = tstate->exc_traceback;
                         ^~~~~~~~~~~~~
                         curexc_traceback
    /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:238:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    cyvcf2/cyvcf2.c:61774:13: error: no member named 'exc_type' in 'struct _ts'
        tstate->exc_type = local_type;
        ~~~~~~  ^
    cyvcf2/cyvcf2.c:61775:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tstate->exc_value = local_value;
                ^~~~~~~~~
                curexc_value
    /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:237:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    cyvcf2/cyvcf2.c:61776:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tstate->exc_traceback = local_tb;
                ^~~~~~~~~~~~~
                curexc_traceback
    /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:238:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    cyvcf2/cyvcf2.c:61798:24: error: no member named 'exc_type' in 'struct _ts'
        tmp_type = tstate->exc_type;
                   ~~~~~~  ^
    cyvcf2/cyvcf2.c:61799:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tmp_value = tstate->exc_value;
                            ^~~~~~~~~
                            curexc_value
    /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:237:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    cyvcf2/cyvcf2.c:61800:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tmp_tb = tstate->exc_traceback;
                         ^~~~~~~~~~~~~
                         curexc_traceback
    /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:238:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    cyvcf2/cyvcf2.c:61801:13: error: no member named 'exc_type' in 'struct _ts'
        tstate->exc_type = *type;
        ~~~~~~  ^
    cyvcf2/cyvcf2.c:61802:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tstate->exc_value = *value;
                ^~~~~~~~~
                curexc_value
    /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:237:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    cyvcf2/cyvcf2.c:61803:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tstate->exc_traceback = *tb;
                ^~~~~~~~~~~~~
                curexc_traceback
    /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:238:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    cyvcf2/cyvcf2.c:61822:21: error: no member named 'exc_type' in 'struct _ts'
        *type = tstate->exc_type;
                ~~~~~~  ^
    cyvcf2/cyvcf2.c:61823:22: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        *value = tstate->exc_value;
                         ^~~~~~~~~
                         curexc_value
    /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:237:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    cyvcf2/cyvcf2.c:61824:19: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        *tb = tstate->exc_traceback;
                      ^~~~~~~~~~~~~
                      curexc_traceback
    /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:238:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    cyvcf2/cyvcf2.c:61831:24: error: no member named 'exc_type' in 'struct _ts'
        tmp_type = tstate->exc_type;
                   ~~~~~~  ^
    cyvcf2/cyvcf2.c:61832:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tmp_value = tstate->exc_value;
                            ^~~~~~~~~
                            curexc_value
    /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:237:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    cyvcf2/cyvcf2.c:61833:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tmp_tb = tstate->exc_traceback;
                         ^~~~~~~~~~~~~
                         curexc_traceback
    /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:238:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    30 warnings and 20 errors generated.
    error: command 'gcc' failed with exit status 1
    
    ----------------------------------------

I'm having this exact issue too. cyvcf2.c needs to be re-generated on python3.7 with a newish cython version. Installation does work when I manually regenerate cyvcf2.c with cython version 0.29.1.

cython issues:
cython/cython#1955
cython/cython#1978

thanks for looking into this. does the cyvcf2.c generated on 3.7 with new cython work for < python3.7?

I've done some quick tests and this seems to work with the following versions:

  • python 2.7.15
  • python 3.5.5
  • python 3.6.7

I haven't tested other versions of python < 3.7.

I just uploaded a version 0.10.3 to pypi with python3.7 hopefully that solves this issue. Thanks again for looking into it @sndrtj and others for reporting. I'll leave this open til I have external verification that it's working.

ok. so it's still broken. I'll fix and ping here again.

ok. 0.10.4 should work (tm).

Thanks y'all.

It looks like the cython bug has been fixed, but I'm still getting an error regarding OpenSSL for OSX Mojave. I'll investigate that for a bit and open a separate issue.

Collecting cyvcf2
  Downloading https://files.pythonhosted.org/packages/49/36/4b3c44ebdbc8c4c847cf37d29b2c87f919d6417eb60bf5e4a647227e6f97/cyvcf2-0.10.4.tar.gz (1.1MB)
    100% |████████████████████████████████| 1.1MB 4.9MB/s 
Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from cyvcf2) (1.15.4)
Installing collected packages: cyvcf2
  Running setup.py install for cyvcf2 ... error
    Complete output from command /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-pqu7l5ql/cyvcf2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/tmp/pip-record-ux1zrpfx/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-3.7
    creating build/lib.macosx-10.9-x86_64-3.7/cyvcf2
    copying cyvcf2/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2
    copying cyvcf2/cli.py -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2
    copying cyvcf2/__main__.py -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2
    creating build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test_reader.py -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test_hemi.py -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test_cli.py -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    running egg_info
    writing cyvcf2.egg-info/PKG-INFO
    writing dependency_links to cyvcf2.egg-info/dependency_links.txt
    writing entry points to cyvcf2.egg-info/entry_points.txt
    writing requirements to cyvcf2.egg-info/requires.txt
    writing top-level names to cyvcf2.egg-info/top_level.txt
    reading manifest file 'cyvcf2.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'cyvcf2.egg-info/SOURCES.txt'
    copying cyvcf2/cyvcf2.c -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2
    copying cyvcf2/cyvcf2.pxd -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2
    copying cyvcf2/cyvcf2.pyx -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2
    copying cyvcf2/helpers.c -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2
    copying cyvcf2/helpers.h -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2
    copying cyvcf2/relatedness.h -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2
    copying cyvcf2/tests/__init__.pyc -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/bug.vcf.gz -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/decomposed.vcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/empty.vcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/issue_44.vcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/o.vcf.gz -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/seg.vcf.gz -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test-alt-repr.vcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test-format-string.vcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test-haploidX.vcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test-hemi.vcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test-multiallelic-homozygous-alt.vcf.gz -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test-multiallelic-homozygous-alt.vcf.gz.tbi -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test-strict-gt-option-flag.vcf.gz -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test-strict-gt-option-flag.vcf.gz.tbi -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test.comp_het.3.vcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test.snpeff.bcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test.snpeff.bcf.csi -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test.snpeff.vcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test.vcf.gz -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test.vcf.gz.tbi -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test_cli.pyc -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test_gt_alt_freqs.vcf -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test_gt_bases.vcf.gz -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test_hemi.pyc -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    copying cyvcf2/tests/test_reader.pyc -> build/lib.macosx-10.9-x86_64-3.7/cyvcf2/tests
    running build_ext
    skipping 'cyvcf2/cyvcf2.c' Cython extension (up-to-date)
    building 'cyvcf2.cyvcf2' extension
    creating build/temp.macosx-10.9-x86_64-3.7
    creating build/temp.macosx-10.9-x86_64-3.7/cyvcf2
    creating build/temp.macosx-10.9-x86_64-3.7/htslib
    creating build/temp.macosx-10.9-x86_64-3.7/htslib/cram
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c cyvcf2/cyvcf2.c -o build/temp.macosx-10.9-x86_64-3.7/cyvcf2/cyvcf2.o
    In file included from cyvcf2/cyvcf2.c:614:
    In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
    In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18:
    In file included from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1821:
    /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by "          "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
    #warning "Using deprecated NumPy API, disable it by " \
     ^
    In file included from cyvcf2/cyvcf2.c:619:
    htslib/htslib/hfile.h:245:35: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if (fp->limit - fp->begin < nbytes){
                ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~
    cyvcf2/cyvcf2.c:7926:32: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_v_ret = bcf_hdr_append(__pyx_v_self->hdr, __pyx_t_2);
                                   ^~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:443:35: note: passing argument to parameter 'h' here
        int bcf_hdr_append(bcf_hdr_t *h, const char *line);
                                      ^
    cyvcf2/cyvcf2.c:7968:30: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_v_ret = bcf_hdr_sync(__pyx_v_self->hdr);
                                 ^~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:479:33: note: passing argument to parameter 'h' here
        int bcf_hdr_sync(bcf_hdr_t *h);
                                    ^
    cyvcf2/cyvcf2.c:8484:37: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_v_ret = bcf_hdr_set_samples(__pyx_v_self->hdr, ((char const *)__pyx_t_6), 0);
                                        ^~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:315:40: note: passing argument to parameter 'hdr' here
        int bcf_hdr_set_samples(bcf_hdr_t *hdr, const char *samples, int is_file);
                                           ^
    cyvcf2/cyvcf2.c:8782:32: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_v_ret = bcf_hdr_append(__pyx_v_self->hdr, __pyx_t_4);
                                   ^~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:443:35: note: passing argument to parameter 'h' here
        int bcf_hdr_append(bcf_hdr_t *h, const char *line);
                                      ^
    cyvcf2/cyvcf2.c:8835:30: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_v_ret = bcf_hdr_sync(__pyx_v_self->hdr);
                                 ^~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:479:33: note: passing argument to parameter 'h' here
        int bcf_hdr_sync(bcf_hdr_t *h);
                                    ^
    cyvcf2/cyvcf2.c:9044:34: warning: passing 'const bcf_hdr_t *' to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_cur_scope->__pyx_v_itr = bcf_itr_querys(__pyx_cur_scope->__pyx_v_self->hidx, __pyx_cur_scope->__pyx_v_self->hdr, __pyx_t_2);
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:796:102: note: expanded from macro 'bcf_itr_querys'
        #define bcf_itr_querys(idx, hdr, s) hts_itr_querys((idx), (s), (hts_name2id_f)(bcf_hdr_name2id), (hdr), hts_itr_query, bcf_readrec)
                                                                                                         ^~~~~
    htslib/htslib/hts.h:675:97: note: passing argument to parameter 'hdr' here
        hts_itr_t *hts_itr_querys(const hts_idx_t *idx, const char *reg, hts_name2id_f getid, void *hdr, hts_itr_query_func *itr_query, hts_readrec_func *readrec);
                                                                                                    ^
    cyvcf2/cyvcf2.c:10252:134: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        __pyx_t_4 = ((PyObject *)__pyx_f_6cyvcf2_6cyvcf2_newHREC((__pyx_cur_scope->__pyx_v_self->hdr->hrec[__pyx_cur_scope->__pyx_v_i]), __pyx_cur_scope->__pyx_v_self->hdr)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 407, __pyx_L1_error)
                                                                                                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cyvcf2/cyvcf2.c:2943:118: note: passing argument to parameter here
    static CYTHON_INLINE struct __pyx_obj_6cyvcf2_6cyvcf2_HREC *__pyx_f_6cyvcf2_6cyvcf2_newHREC(bcf_hrec_t *, bcf_hdr_t *); /*proto*/
                                                                                                                         ^
    cyvcf2/cyvcf2.c:11909:21: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        bcf_hdr_destroy(__pyx_v_self->hdr);
                        ^~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:261:37: note: passing argument to parameter 'h' here
        void bcf_hdr_destroy(bcf_hdr_t *h);
                                        ^
    cyvcf2/cyvcf2.c:12390:15: warning: 'bcf_hdr_fmt_text' is deprecated: use bcf_hdr_format() instead [-Wdeprecated-declarations]
      __pyx_v_s = bcf_hdr_fmt_text(__pyx_v_self->hdr, 0, (&__pyx_v_hlen));
                  ^
    htslib/htslib/vcf.h:440:9: note: 'bcf_hdr_fmt_text' has been explicitly marked deprecated here
            HTS_DEPRECATED("use bcf_hdr_format() instead");
            ^
    htslib/htslib/hts_defs.h:65:49: note: expanded from macro 'HTS_DEPRECATED'
    #define HTS_DEPRECATED(message) __attribute__ ((__deprecated__ (message)))
                                                    ^
    cyvcf2/cyvcf2.c:12643:18: warning: assigning to 'char **' from 'const char **' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_v_cnames = bcf_hdr_seqnames(__pyx_v_self->hdr, (&__pyx_v_n));
                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cyvcf2/cyvcf2.c:12752:24: warning: passing 'const bcf_hdr_t *' to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
          __pyx_v_cnames = bcf_index_seqnames(__pyx_v_self->hidx, __pyx_v_self->hdr, (&__pyx_v_n));
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:799:111: note: expanded from macro 'bcf_index_seqnames'
        #define bcf_index_seqnames(idx, hdr, nptr) hts_idx_seqnames((idx),(nptr),(hts_id2name_f)(bcf_hdr_id2name),(hdr))
                                                                                                                  ^~~~~
    htslib/htslib/hts.h:677:92: note: passing argument to parameter 'hdr' here
        const char **hts_idx_seqnames(const hts_idx_t *idx, int *n, hts_id2name_f getid, void *hdr); // free only the array, not the values
                                                                                               ^
    cyvcf2/cyvcf2.c:12752:22: warning: assigning to 'char **' from 'const char **' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
          __pyx_v_cnames = bcf_index_seqnames(__pyx_v_self->hidx, __pyx_v_self->hdr, (&__pyx_v_n));
                         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cyvcf2/cyvcf2.c:12835:22: warning: assigning to 'char **' from 'const char **' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
          __pyx_v_cnames = tbx_seqnames(__pyx_v_self->idx, (&__pyx_v_n));
                         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cyvcf2/cyvcf2.c:22546:33: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
      for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_5; __pyx_t_2+=1) {
                          ~~~~~~~~~ ^ ~~~~~~~~~
    cyvcf2/cyvcf2.c:24593:17: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        __pyx_v_key = bcf_hdr_int2id(__pyx_v_self->vcf->hdr, BCF_DT_ID, __pyx_v_fmt.id);
                    ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cyvcf2/cyvcf2.c:32008:33: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
      for (__pyx_t_4 = 1; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
                          ~~~~~~~~~ ^ ~~~~~~~~~
    cyvcf2/cyvcf2.c:32273:33: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
      for (__pyx_t_5 = 1; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
                          ~~~~~~~~~ ^ ~~~~~~~~~
    cyvcf2/cyvcf2.c:32485:33: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
      for (__pyx_t_9 = 1; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
                          ~~~~~~~~~ ^ ~~~~~~~~~
    cyvcf2/cyvcf2.c:32543:29: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'Py_ssize_t' (aka 'long') [-Wsign-compare]
        __pyx_t_2 = ((__pyx_t_3 != __pyx_t_6) != 0);
                      ~~~~~~~~~ ^  ~~~~~~~~~
    cyvcf2/cyvcf2.c:34655:13: warning: assigning to 'bcf_hdr_t *' from 'const bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_v_h = __pyx_t_6;
                ^ ~~~~~~~~~
    cyvcf2/cyvcf2.c:37698:16: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_v_name = bcf_hdr_int2id(__pyx_v_self->hdr, BCF_DT_ID, __pyx_v_info->key);
                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cyvcf2/cyvcf2.c:38681:18: warning: assigning to 'bcf_hdr_t *' from 'const bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_v_i->hdr = __pyx_t_4;
                     ^ ~~~~~~~~~
    cyvcf2/cyvcf2.c:39335:23: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      (void)(bcf_hdr_sync(__pyx_v_tmpl->hdr));
                          ^~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:479:33: note: passing argument to parameter 'h' here
        int bcf_hdr_sync(bcf_hdr_t *h);
                                    ^
    cyvcf2/cyvcf2.c:39363:23: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      (void)(bcf_hdr_sync(__pyx_v_self->__pyx_base.hdr));
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:479:33: note: passing argument to parameter 'h' here
        int bcf_hdr_sync(bcf_hdr_t *h);
                                    ^
    cyvcf2/cyvcf2.c:39431:54: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      (void)(bcf_hdr_write(__pyx_v_self->__pyx_base.hts, __pyx_v_self->__pyx_base.hdr));
                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:320:47: note: passing argument to parameter 'h' here
        int bcf_hdr_write(htsFile *fp, bcf_hdr_t *h);
                                                  ^
    cyvcf2/cyvcf2.c:39603:36: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        __pyx_t_1 = ((bcf_hdr_add_hrec(__pyx_v_self->__pyx_base.hdr, __pyx_v_h) < 0) != 0);
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:482:37: note: passing argument to parameter 'hdr' here
        int bcf_hdr_add_hrec(bcf_hdr_t *hdr, bcf_hrec_t *hrec);
                                        ^
    cyvcf2/cyvcf2.c:39641:25: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        (void)(bcf_hdr_sync(__pyx_v_self->__pyx_base.hdr));
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:479:33: note: passing argument to parameter 'h' here
        int bcf_hdr_sync(bcf_hdr_t *h);
                                    ^
    cyvcf2/cyvcf2.c:39700:76: warning: passing 'const bcf_hdr_t *' to parameter of type 'bcf_hdr_t *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
      __pyx_t_2 = __Pyx_PyInt_From_int(bcf_write(__pyx_v_self->__pyx_base.hts, __pyx_v_self->__pyx_base.hdr, __pyx_v_var->b)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2088, __pyx_L1_error)
                                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    htslib/htslib/vcf.h:370:43: note: passing argument to parameter 'h' here
        int bcf_write(htsFile *fp, bcf_hdr_t *h, bcf1_t *v);
                                              ^
    cyvcf2/cyvcf2.c:6610:18: warning: unused function '__pyx_f_6cyvcf2_6cyvcf2_xstr' [-Wunused-function]
    static PyObject *__pyx_f_6cyvcf2_6cyvcf2_xstr(PyObject *__pyx_v_s) {
                     ^
    31 warnings generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/faidx.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/faidx.o
    In file included from htslib/faidx.c:40:
    htslib/htslib/hfile.h:245:35: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if (fp->limit - fp->begin < nbytes){
                ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~
    htslib/faidx.c:711:15: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'long' [-Wsign-compare]
        while ( l < end - beg && (c=bgzf_getc(fai->bgzf))>=0 )
                ~ ^ ~~~~~~~~~
    htslib/faidx.c:801:13: warning: comparison of integers of different signs: 'long' and 'uint64_t' (aka 'unsigned long long') [-Wsign-compare]
        if (beg >= val->len) beg = val->len;
            ~~~ ^  ~~~~~~~~
    htslib/faidx.c:802:13: warning: comparison of integers of different signs: 'long' and 'uint64_t' (aka 'unsigned long long') [-Wsign-compare]
        if (end >= val->len) end = val->len;
            ~~~ ^  ~~~~~~~~
    htslib/faidx.c:882:22: warning: comparison of integers of different signs: 'uint64_t' (aka 'unsigned long long') and 'int' [-Wsign-compare]
        else if(val->len <= *p_beg_i)
                ~~~~~~~~ ^  ~~~~~~~~
    htslib/faidx.c:887:22: warning: comparison of integers of different signs: 'uint64_t' (aka 'unsigned long long') and 'int' [-Wsign-compare]
        else if(val->len <= *p_end_i)
                ~~~~~~~~ ^  ~~~~~~~~
    6 warnings generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/vcfutils.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/vcfutils.o
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/regidx.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/regidx.o
    htslib/regidx.c:156:30: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
            if ( idx->start_prev > reg.start || (idx->start_prev==reg.start && idx->end_prev>reg.end) )
                 ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
    htslib/regidx.c:156:61: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
            if ( idx->start_prev > reg.start || (idx->start_prev==reg.start && idx->end_prev>reg.end) )
                                                 ~~~~~~~~~~~~~~~^ ~~~~~~~~~
    htslib/regidx.c:156:89: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
            if ( idx->start_prev > reg.start || (idx->start_prev==reg.start && idx->end_prev>reg.end) )
                                                                               ~~~~~~~~~~~~~^~~~~~~~
    3 warnings generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/hts_os.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/hts_os.o
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/tbx.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/tbx.o
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/probaln.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/probaln.o
    htslib/probaln.c:177:28: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
                if (u < 3 || u >= i_dim - 3) continue;
                             ~ ^  ~~~~~~~~~
    htslib/probaln.c:201:24: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
            if (u < 3 || u >= i_dim - 3) continue;
                         ~ ^  ~~~~~~~~~
    htslib/probaln.c:239:28: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
                if (u < 3 || u >= i_dim - 3) continue;
                             ~ ^  ~~~~~~~~~
    3 warnings generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/kfunc.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/kfunc.o
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/hfile_gcs.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/hfile_gcs.o
    In file included from htslib/hfile_gcs.c:35:
    In file included from htslib/hfile_internal.h:30:
    htslib/htslib/hfile.h:245:35: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if (fp->limit - fp->begin < nbytes){
                ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~
    1 warning generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/errmod.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/errmod.o
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/multipart.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/multipart.o
    In file included from htslib/multipart.c:34:
    In file included from htslib/hfile_internal.h:30:
    htslib/htslib/hfile.h:245:35: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if (fp->limit - fp->begin < nbytes){
                ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~
    1 warning generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/realn.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/realn.o
    htslib/realn.c:47:35: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
        for (i = y = 0, x = c->pos; i < c->n_cigar; ++i) {
                                    ~ ^ ~~~~~~~~~~
    htslib/realn.c:96:24: warning: comparison of integers of different signs: 'const int32_t' (aka 'const int') and 'unsigned long' [-Wsign-compare]
        if (b->core.l_qseq != strlen((const char *) tg + 1)) {
            ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    htslib/realn.c:158:19: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
        for (k = 0; k < c->n_cigar; ++k) {
                    ~ ^ ~~~~~~~~~~
    htslib/realn.c:188:32: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
            if (extend_baq && lref < c->l_qseq)
                              ~~~~ ^ ~~~~~~~~~
    htslib/realn.c:221:46: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
                for (k = 0, x = c->pos, y = 0; k < c->n_cigar; ++k) {
                                               ~ ^ ~~~~~~~~~~
    htslib/realn.c:247:46: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
                for (k = 0, x = c->pos, y = 0; k < c->n_cigar; ++k) {
                                               ~ ^ ~~~~~~~~~~
    6 warnings generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/hfile_net.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/hfile_net.o
    In file included from htslib/hfile_net.c:30:
    In file included from htslib/hfile_internal.h:30:
    htslib/htslib/hfile.h:245:35: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if (fp->limit - fp->begin < nbytes){
                ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~
    1 warning generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/textutils.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/textutils.o
    In file included from htslib/textutils.c:30:
    htslib/htslib/hfile.h:245:35: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if (fp->limit - fp->begin < nbytes){
                ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~
    1 warning generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/hts.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/hts.o
    In file included from htslib/hts.c:41:
    In file included from htslib/cram/cram.h:52:
    htslib/cram/cram_codecs.h:169:20: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
            (blk->byte >= blk->uncomp_size && nbits > 0) ||
             ~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~
    htslib/cram/cram_codecs.h:171:60: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
             (blk->uncomp_size - blk->byte) * 8 + blk->bit - 7 < nbits)) {
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~
    In file included from htslib/hts.c:42:
    htslib/htslib/hfile.h:245:35: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if (fp->limit - fp->begin < nbytes){
                ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~
    htslib/hts.c:1420:34: warning: comparison of integers of different signs: 'khint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare]
                if ( kh_key(bidx, k) < idx->n_bins )
                     ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
    htslib/hts.c:1447:55: warning: comparison of integers of different signs: 'khint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare]
                if (!kh_exist(bidx, k) || kh_key(bidx, k) >= idx->n_bins || kh_key(bidx, k) < start) continue;
                                          ~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
    htslib/hts.c:1472:51: warning: comparison of integers of different signs: 'khint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare]
            if (!kh_exist(bidx, k) || kh_key(bidx, k) >= idx->n_bins) continue;
                                      ~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
    htslib/hts.c:2230:27: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
                    for(j=0; j<curr_reg->count; j++) {
                             ~^~~~~~~~~~~~~~~~
    htslib/hts.c:2341:25: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
                for (j=0; j < curr_reg->count; j++) {
                          ~ ^ ~~~~~~~~~~~~~~~
    htslib/hts.c:2737:17: warning: comparison of integers of different signs: 'int' and 'uint64_t' (aka 'unsigned long long') [-Wsign-compare]
            if (beg >  iter->off[iter->i].max) {
                ~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~
    htslib/hts.c:2741:17: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
            if (beg >  iter->reg_list[cr].max_end)
                ~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~
    htslib/hts.c:2744:24: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
            for (i = ci; i < iter->reg_list[cr].count; i++) {
                         ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~
    htslib/hts.c:2745:21: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
                if (end > iter->reg_list[cr].intervals[i].beg && iter->reg_list[cr].intervals[i].end > beg) {
                    ~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    htslib/hts.c:2745:98: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare]
                if (end > iter->reg_list[cr].intervals[i].beg && iter->reg_list[cr].intervals[i].end > beg) {
                                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~
    htslib/hts.c:2798:45: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
                if (fwrite(buf, 1, l, local_fp) != l) {
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~
    htslib/hts.c:2967:18: warning: comparison of integers of different signs: 'enum htsLogLevel' and 'int' [-Wsign-compare]
        if (severity <= hts_verbose) {
            ~~~~~~~~ ^  ~~~~~~~~~~~
    15 warnings generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/vcf_sweep.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/vcf_sweep.o
    htslib/vcf_sweep.c:164:53: warning: comparison of integers of different signs: 'unsigned long long' and 'int' [-Wsign-compare]
            if ( !sw->nidx || pos - sw->idx[sw->nidx-1] > sw->block_size )
                              ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
    1 warning generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/bcf_sr_sort.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/bcf_sr_sort.o
    htslib/bcf_sr_sort.c:69:16: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        for (i=0; i<dst->n; i++) dst->b[i] |= src->b[i];
                  ~^~~~~~~
    htslib/bcf_sr_sort.c:363:17: warning: comparison of integers of different signs: 'int' and 'khint_t' (aka 'unsigned int') [-Wsign-compare]
        for (k=0; k < kh_end(hash); k++)
                  ~ ^ ~~~~~~~~~~~~
    htslib/bcf_sr_sort.c:366:17: warning: comparison of integers of different signs: 'int' and 'khint_t' (aka 'unsigned int') [-Wsign-compare]
        for (k=0; k < kh_end(hash); k++)
                  ~ ^ ~~~~~~~~~~~~
    3 warnings generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/synced_bcf_reader.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/synced_bcf_reader.o
    htslib/synced_bcf_reader.c:801:20: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
            if ( start < creg->regs[i].start ) max = i - 1;
                 ~~~~~ ^ ~~~~~~~~~~~~~~~~~~~
    htslib/synced_bcf_reader.c:802:25: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
            else if ( start > creg->regs[i].start ) min = i + 1;
                      ~~~~~ ^ ~~~~~~~~~~~~~~~~~~~
    htslib/synced_bcf_reader.c:805:40: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare]
        if ( min>max || creg->regs[i].start!=start || creg->regs[i].end!=end )
                        ~~~~~~~~~~~~~~~~~~~^ ~~~~~
    htslib/synced_bcf_reader.c:805:68: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare]
        if ( min>max || creg->regs[i].start!=start || creg->regs[i].end!=end )
                                                      ~~~~~~~~~~~~~~~~~^ ~~~
    4 warnings generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/sam.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/sam.o
    In file included from htslib/sam.c:37:
    In file included from htslib/cram/cram.h:52:
    htslib/cram/cram_codecs.h:169:20: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int32_t' (aka 'int') [-Wsign-compare]
            (blk->byte >= blk->uncomp_size && nbits > 0) ||
             ~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~
    htslib/cram/cram_codecs.h:171:60: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
             (blk->uncomp_size - blk->byte) * 8 + blk->bit - 7 < nbits)) {
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~
    In file included from htslib/sam.c:39:
    htslib/htslib/hfile.h:245:35: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if (fp->limit - fp->begin < nbytes){
                ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~
    htslib/sam.c:323:40: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare]
        if (new_len > INT32_MAX || new_len < b->l_data) {
                                   ~~~~~~~ ^ ~~~~~~~~~
    htslib/sam.c:1108:67: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
                    if ( hwrite(fp->fp.hfile, fp->line.s, fp->line.l) != fp->line.l ) return -1;
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~
    htslib/sam.c:1143:36: warning: comparison of integers of different signs: 'unsigned long' and 'long' [-Wsign-compare]
                        && strlen(val) == end - beg - 4)
                           ~~~~~~~~~~~ ^  ~~~~~~~~~~~~~
    htslib/sam.c:1262:23: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
            for (i = 0; i < c->n_cigar; ++i, ++q) {
                        ~ ^ ~~~~~~~~~~
    htslib/sam.c:1392:37: warning: comparison of integers of different signs: 'unsigned long' and 'int32_t' (aka 'int') [-Wsign-compare]
                _parse_err(bytes / size != n
                           ~~~~~~~~~~~~ ^  ~
    htslib/sam.c:1202:40: note: expanded from macro '_parse_err'
    #define _parse_err(cond, msg) do { if (cond) { hts_log_error(msg); goto err_ret; } } while (0)
                                           ^~~~
    htslib/sam.c:1495:23: warning: comparison of integers of different signs: 'int' and 'const uint32_t' (aka 'const unsigned int') [-Wsign-compare]
            for (i = 0; i < c->n_cigar; ++i) {
                        ~ ^ ~~~~~~~~~~
    htslib/sam.c:1589:27: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
                for (i = 0; i < n; ++i) { // FIXME: for better performance, put the loop after "if"
                            ~ ^ ~
    htslib/sam.c:1633:59: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if ( hwrite(fp->fp.hfile, fp->line.s, fp->line.l) != fp->line.l ) return -1;
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~
    htslib/sam.c:1695:40: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare]
        if (new_len > INT32_MAX || new_len < b->l_data) goto nomem;
                                   ~~~~~~~ ^ ~~~~~~~~~
    htslib/sam.c:2287:52: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
                for (k = 0, s->x = c->pos, s->y = 0; k < c->n_cigar; ++k) {
                                                     ~ ^ ~~~~~~~~~~
    htslib/sam.c:2309:38: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
                    for (k = s->k + 1; k < c->n_cigar; ++k) {
                                       ~ ^ ~~~~~~~~~~
    htslib/sam.c:2323:45: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
            if (s->x + l - 1 == pos && s->k + 1 < c->n_cigar) { // peek the next operation
                                       ~~~~~~~~ ^ ~~~~~~~~~~
    htslib/sam.c:2328:50: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
                else if (op2 == BAM_CPAD && s->k + 2 < c->n_cigar) { // no working for adjacent padding
                                            ~~~~~~~~ ^ ~~~~~~~~~~
    htslib/sam.c:2330:38: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
                    for (k = s->k + 2; k < c->n_cigar; ++k) {
                                       ~ ^ ~~~~~~~~~~
    17 warnings generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/bgzf.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/bgzf.o
    In file included from htslib/bgzf.c:44:
    htslib/htslib/hfile.h:245:35: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if (fp->limit - fp->begin < nbytes){
                ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~
    htslib/bgzf.c:983:23: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        while (bytes_read < length) {
               ~~~~~~~~~~ ^ ~~~~~~
    htslib/bgzf.c:996:43: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
            copy_length = length - bytes_read < available? length - bytes_read : available;
                          ~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
    htslib/bgzf.c:1107:55: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if (hwrite(fp->fp, j->comp_data, j->comp_len) != j->comp_len) {
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
    htslib/bgzf.c:1594:41: warning: comparison of integers of different signs: 'unsigned long long' and 'int' [-Wsign-compare]
            ublock_size = current_block + 1 < fp->idx->moffs ? fp->idx->offs[current_block+1].uaddr-fp->idx->offs[current_block].uaddr : BGZF_MAX_BLOCK_SIZE;
                          ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
    htslib/bgzf.c:1602:30: warning: comparison of integers of different signs: 'int' and 'uint64_t' (aka 'unsigned long long') [-Wsign-compare]
            if (fp->block_offset == ublock_size) {
                ~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
    htslib/bgzf.c:2049:22: warning: comparison of integers of different signs: 'long' and 'uint64_t' (aka 'unsigned long long') [-Wsign-compare]
            if ( uoffset < fp->idx->offs[i].uaddr ) ihi = i - 1;
                 ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~
    htslib/bgzf.c:2050:27: warning: comparison of integers of different signs: 'long' and 'uint64_t' (aka 'unsigned long long') [-Wsign-compare]
            else if ( uoffset >= fp->idx->offs[i].uaddr ) ilo = i + 1;
                      ~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~
    8 warnings generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/vcf.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/vcf.o
    In file included from htslib/vcf.c:41:
    htslib/htslib/hfile.h:245:35: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if (fp->limit - fp->begin < nbytes){
                ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~
    htslib/vcf.c:149:22: warning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'khint_t' (aka 'unsigned int') [-Wsign-compare]
            if ( h->n[i] < kh_size(d) )
                 ~~~~~~~ ^ ~~~~~~~~~~
    htslib/vcf.c:499:18: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare]
            if (type == -1) {
                ~~~~ ^  ~~
    htslib/vcf.c:504:17: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare]
            if (var == -1) {
                ~~~ ^  ~~
    htslib/vcf.c:917:35: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        if (bgzf_read(fp, htxt, hlen) != hlen) goto fail;
            ~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~
    htslib/vcf.c:948:41: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        if ( bgzf_write(fp, htxt.s, htxt.l) != htxt.l ) return -1;
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~
    htslib/vcf.c:1033:49: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        if (bgzf_read(fp, v->shared.s, v->shared.l) != v->shared.l) return -2;
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
    htslib/vcf.c:1034:47: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        if (bgzf_read(fp, v->indiv.s, v->indiv.l) != v->indiv.l) return -2;
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~
    htslib/vcf.c:1125:19: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        if (end - ptr < bytes) goto bad_shared;
            ~~~~~~~~~ ^ ~~~~~
    htslib/vcf.c:1138:23: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if (end - ptr < bytes) goto bad_shared;
                ~~~~~~~~~ ^ ~~~~~
    htslib/vcf.c:1151:23: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if (end - ptr < bytes) goto bad_shared;
                ~~~~~~~~~ ^ ~~~~~
    htslib/vcf.c:1152:23: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare]
            for (i = 0; i < num; i++) {
                        ~ ^ ~~~
    htslib/vcf.c:1179:23: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if (end - ptr < bytes) goto bad_shared;
                ~~~~~~~~~ ^ ~~~~~
    htslib/vcf.c:1202:23: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if (end - ptr < bytes) goto bad_indiv;
                ~~~~~~~~~ ^ ~~~~~
    htslib/vcf.c:1533:51: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        if ( bgzf_write(fp, v->shared.s, v->shared.l) != v->shared.l ) return -1;
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
    htslib/vcf.c:1534:49: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        if ( bgzf_write(fp, v->indiv.s, v->indiv.l) != v->indiv.l ) return -1;
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~
    htslib/vcf.c:1970:34: warning: comparison of integers of different signs: 'uint64_t' (aka 'unsigned long long') and 'int' [-Wsign-compare]
                    if (fmt[j].max_l < l) fmt[j].max_l = l;
                        ~~~~~~~~~~~~ ^ ~
    htslib/vcf.c:2611:15: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        return ret==line->l ? 0 : -1;
               ~~~^ ~~~~~~~
    htslib/vcf.c:2624:15: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        return ret==fp->line.l ? 0 : -1;
               ~~~^ ~~~~~~~~~~
    htslib/vcf.c:3136:33: warning: comparison of integers of different signs: 'int' and 'khint_t' (aka 'unsigned int') [-Wsign-compare]
            for (k = kh_begin(d); k != kh_end(d); ++k)
                                  ~ ^  ~~~~~~~~~
    20 warnings generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/hfile_libcurl.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/hfile_libcurl.o
    In file included from htslib/hfile_libcurl.c:37:
    In file included from htslib/hfile_internal.h:30:
    htslib/htslib/hfile.h:245:35: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if (fp->limit - fp->begin < nbytes){
                ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~
    1 warning generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/kstring.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/kstring.o
    htslib/kstring.c:156:12: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
            if (l + 1 > s->m - s->l) {
                ~~~~~ ^ ~~~~~~~~~~~
    1 warning generated.
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/md5.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/md5.o
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Ihtslib -Icyvcf2 -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c htslib/hfile_s3.c -o build/temp.macosx-10.9-x86_64-3.7/htslib/hfile_s3.o
    In file included from htslib/hfile_s3.c:33:
    In file included from htslib/hfile_internal.h:30:
    htslib/htslib/hfile.h:245:35: warning: comparison of integers of different signs: 'long' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if (fp->limit - fp->begin < nbytes){
                ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~
    htslib/hfile_s3.c:69:10: fatal error: 'openssl/hmac.h' file not found
    #include <openssl/hmac.h>
             ^~~~~~~~~~~~~~~~
    1 warning and 1 error generated.
    error: command 'gcc' failed with exit status 1

you'll have to get the OSX version of libssl installed on your system.
this is detailed in another issue -- ideally, the setup.py would sniff this stuff out and only use the libs you have available. til then. SSL is required. :(

Thanks. What's strange is that it is installed, but the gcc code doesn't appear to be referencing it with an additional "-I". I updated openssl with brew and had no luck. I'll spend some time trying to fix it with env-vars.

Thanks @brentp for the very quick fix! Works like a charm on a fresh python 3.7 environment! :-).

Did some more tests on fresh python 2.7, python 3.5 and python 3.6 environments, and cyvcf2 0.10.4 installs on all of them! :-)

I also started getting the openssl errors on MacOSX Sierra 10.12.6 even after brew installing openssl.
To fix it I had to follow the steps in the doc message at the end of brew install openssl (which might be different on your system):

For compilers to find openssl you may need to set:
  export LDFLAGS="-L/usr/local/opt/openssl/lib"
  export CPPFLAGS="-I/usr/local/opt/openssl/include"

For pkg-config to find openssl you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"

After that both python -m pip install cyvcf2 and python3 -m pip install cyvcf2 succeeded (for python2.7 and python3.7).

thanks @bw2, I updated the readme with that info.

I had a similar issue while installing cyvcf2 in Python 3.8 on macOS pip install cyvcf2

Collecting cyvcf2
  Using cached https://files.pythonhosted.org/packages/dd/2e/2c80e524e5f98837274bad981a0b5621717283462fc0aca91823b76ab759/cyvcf2-0.11.5.tar.gz
Collecting numpy (from cyvcf2)
  Using cached https://files.pythonhosted.org/packages/a7/06/6d616fb5fb423db595b1502cbd873f3f2025f2fd8509046c771a20c4302a/numpy-1.18.1-cp38-cp38-macosx_10_9_x86_64.whl
Installing collected packages: numpy, cyvcf2
  Running setup.py install for cyvcf2 ... error

...
cyvcf2/cyvcf2.c:61959:266: error: too many arguments to function call, expected 15, have 16
      __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(6, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cyvcf2_cyvcf2_pyx, __pyx_n_s_par_relatedness_2, 34, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 34, __pyx_L1_error)
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
...
cyvcf2/cyvcf2.c:68216:9: error: too many arguments to function call, expected 15, have 16
            __pyx_empty_bytes  /*PyObject *lnotab*/
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 warnings and 7 errors generated.
    error: command 'clang' failed with exit status 1
    ----------------------------------------

Installing from source code works and passed all the tests.

Currently user cannot do conda install python=3.8 cyvcf because the bioconda recipe only includes python3.7. I will try to update it but let me know if you have any other thoughts.

This issue has been resolved by #143