2020-10-21

当编译ANGSD软件是遇到:SIZE_MAX’ was not declared in this scope报错

在安装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包重头编译一遍解决.

嘻嘻嘻 开心

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值