Open ATpoint opened 3 years ago
Hi, is there any fix for this? I encountered the same error message when trying to run 'make' on my macOS 10.14:
metaBigBam.c:489:42: error: read-only variable is not assignable h->cigar_tab[(int)BAM_CIGAR_STR[i]] = i;
I am getting the exact same error. I was able to create a Ubuntu VM on my mac and install in there but not on the host MacOS. Here is my error:
gcc -DHAVE_CONFIG_H -I. -I.. -I.. -Wall -Wformat -Wimplicit -Wreturn-type -Wuninitialized -fno-strict-aliasing -g -O0 -I/Users/kopardevn/SandBox/bwtool/libbeato/include -MT metaBigBam.o -MD -MP -MF .deps/metaBigBam.Tpo -c -o metaBigBam.o metaBigBam.c
metaBigBam.c:485:12: warning: 'cigar_tab' is deprecated: Use bam_cigar_table[] instead
[-Wdeprecated-declarations]
if (h->cigar_tab == 0)
^
/usr/local/include/htslib/sam.h:77:29: note: 'cigar_tab' has been explicitly marked deprecated here
const int8_t *cigar_tab HTS_DEPRECATED("Use bam_cigar_table[] instead");
^
/usr/local/include/htslib/hts_defs.h:75:49: note: expanded from macro 'HTS_DEPRECATED'
#define HTS_DEPRECATED(message) __attribute__ ((__deprecated__ (message)))
^
metaBigBam.c:487:5: warning: 'cigar_tab' is deprecated: Use bam_cigar_table[] instead
[-Wdeprecated-declarations]
h->cigar_tab = (int8_t*)calloc(128, sizeof(int8_t));
^
/usr/local/include/htslib/sam.h:77:29: note: 'cigar_tab' has been explicitly marked deprecated here
const int8_t *cigar_tab HTS_DEPRECATED("Use bam_cigar_table[] instead");
^
/usr/local/include/htslib/hts_defs.h:75:49: note: expanded from macro 'HTS_DEPRECATED'
#define HTS_DEPRECATED(message) __attribute__ ((__deprecated__ (message)))
^
metaBigBam.c:489:9: warning: 'cigar_tab' is deprecated: Use bam_cigar_table[] instead
[-Wdeprecated-declarations]
h->cigar_tab[(int)BAM_CIGAR_STR[i]] = i;
^
/usr/local/include/htslib/sam.h:77:29: note: 'cigar_tab' has been explicitly marked deprecated here
const int8_t *cigar_tab HTS_DEPRECATED("Use bam_cigar_table[] instead");
^
/usr/local/include/htslib/hts_defs.h:75:49: note: expanded from macro 'HTS_DEPRECATED'
#define HTS_DEPRECATED(message) __attribute__ ((__deprecated__ (message)))
^
metaBigBam.c:489:42: error: read-only variable is not assignable
h->cigar_tab[(int)BAM_CIGAR_STR[i]] = i;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
metaBigBam.c:502:35: warning: 'cigar_tab' is deprecated: Use bam_cigar_table[] instead
[-Wdeprecated-declarations]
op = (uint8_t)*q >= 128? -1 : h->cigar_tab[(int)*q];
^
/usr/local/include/htslib/sam.h:77:29: note: 'cigar_tab' has been explicitly marked deprecated here
const int8_t *cigar_tab HTS_DEPRECATED("Use bam_cigar_table[] instead");
^
/usr/local/include/htslib/hts_defs.h:75:49: note: expanded from macro 'HTS_DEPRECATED'
#define HTS_DEPRECATED(message) __attribute__ ((__deprecated__ (message)))
^
4 warnings and 1 error generated.
make[2]: *** [metaBigBam.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Any solution to get it working on Mac??
Any tricks that others may have found??? @cuiping ? @ATpoint ?
Hi, I am on macOS 10.14 and facing issues with the compilation, the error log is here at this Gist following instructions from https://www.biostars.org/p/475853/#475861. I have homebrew installed if that is of interest, because on an older Mac with macOS 10.12 and without homebrew (and basically without any custom software, just the plain OS) on it the tool compiled without error. It is not an urgent issue since I compiled the
bwtool
binary now on that older Mac, would be curious though to know what is happening here.