I am trying to install bcftools on the Mac for the handling of VCF files, but I have some problems when performing a correct installation of this, specifically when doing 'make'.
The instructions for the installation of bfctools appear in the following link, I try to follow the steps but doing 'make' is where the problem arises.
Also installing samstools and HTSlib the same problems arise.
Other links for installation are the following:
This is what happens when trying to install
MacBook-Pro-de-Carlos:bcftools carlosvasquezguerra$ make
echo '#define BCFTOOLS_VERSION "1.9-117-g9e81e92"' > version.h
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o main.o main.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o vcfindex.o vcfindex.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o tabix.o tabix.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o vcfstats.o vcfstats.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o vcfisec.o vcfisec.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o vcfmerge.o vcfmerge.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o vcfquery.o vcfquery.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o vcffilter.o vcffilter.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o filter.o filter.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o vcfsom.o vcfsom.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o vcfnorm.o vcfnorm.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o vcfgtcheck.o vcfgtcheck.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o vcfview.o vcfview.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o vcfannotate.o vcfannotate.c
vcfannotate.c: In function ‘setter_info_str’:
vcfannotate.c:854:59: warning: request for implicit conversion from ‘void *’ to ‘struct kh_str2int_t *’ not permitted in C++ [-Wc++-compat]
if ( !col->mm_str_hash ) col->mm_str_hash = khash_str2int_init();
^
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o vcfroh.o vcfroh.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o vcfconcat.o vcfconcat.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o vcfcall.o vcfcall.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o mcall.o mcall.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o vcmp.o vcmp.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o gvcf.o gvcf.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o reheader.o reheader.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o convert.o convert.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o vcfconvert.o vcfconvert.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o tsv2vcf.o tsv2vcf.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o vcfcnv.o vcfcnv.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o HMM.o HMM.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -DPLUGINPATH='"/usr/local/libexec/bcftools"' -c -o vcfplugin.o vcfplugin.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o consensus.o consensus.c
gcc -g -Wall -Wc++-compat -O2 -I. -I../htslib -c -o ploidy.o ploidy.c
In file included from /usr/include/Availability.h:232:0,
from /usr/include/stdlib.h:61,
from ../htslib/htslib/khash.h:128,
from ../htslib/htslib/khash_str2int.h:28,
from ploidy.c:25:
/usr/include/AvailabilityInternal.h:33:18: error: missing binary operator before token "("
#if __has_include(<AvailabilityInternalPrivate.h>)
^
In file included from /usr/include/stdlib.h:61:0,
from ../htslib/htslib/khash.h:128,
from ../htslib/htslib/khash_str2int.h:28,
from ploidy.c:25:
/usr/include/Availability.h:493:18: error: missing binary operator before token "("
#if __has_include(<AvailabilityProhibitedInternal.h>)
^
make: *** [ploidy.o] Error 1
I attach the dependencies that I have installed with brew:
MacBook-Pro-de-Carlos:bcftools carlosvasquezguerra$ brew list
atk icu4c
autoconf isl
automake jpeg
cairo libepoxy
fontconfig libffi
freetype libmpc
fribidi libpng
gdbm libtiff
gdk-pixbuf mpfr
gettext ncurses
git-flow-avh openssl
glib pango
gmp pcre
gnu-getopt pixman
graphite2 pkg-config
gsettings-desktop-schemas python
gtk+ readline
gtk+3 sqlite
harfbuzz xz
hicolor-icon-theme zlib
I was already consulting with some friends and do not have this problem with the same version of MAC: Mojave: 10.14.3
.
- Note: Xcode version:
Xcode-select version 2354
My last option is to install a virtual machine but, I repeat, some users with similar characteristics have already installed bcftools
Try reinstalling the latest macOS, as it looks like this is a problem in one of the Apple headers, not htslib (Availability.h is an Apple header)