在安装ANGSD软件时进行编译make HTSSRC=../htslib这一步时报错SIZE_MAX’ was not declared in this scope导致编译不成功
[c@mu01 angsd-master]$ make HTSSRC=../htslib-develop HTSSRC defined g++ -c -I/202009/ANgsd/htslib-develop -O3 vcfReader.cpp In file included from /202009/ANgsd/htslib-develop/htslib/hts.h:37:0, from argStruct.h:5, from shared.h:9, from analysisFunction.h:9, from vcfReader.cpp:7: /202009/ANgsd/htslib-develop/htslib/kstring.h: In function ‘int ks_resize(kstring_t*, size_t)’ : /202009/ANgsd/htslib-develop/htslib/kstring.h:149:22: error: ‘SIZE_MAX’ was not declared in this scope size = (size > (SIZE_MAX>>2)) ? size : size + (size >> 1); ^ make: *** [vcfReader.o] Error 1
这个提示是指在/202009/ANgsd/htslib-develop/htslib/kstring.h这个文件中缺少SIZE_MAX 的定义,需要我们在kstring.h这个文件中的#include <stdint.h> 下一行中加入
#if ! defined SIZE_MAX #define SIZE_MAX (4294967295U) #endif
该解决方法参考了https://blog.csdn.net/chwshuang/article/details/77192146的解决方法
加入后将htslib-develop包和angsd包重头编译一遍解决.
嘻嘻嘻 开心