我对Linux环境很陌生,并试图安装一个生物信息学包(vcftools - https://vcftools.github.io/examples.html)。出于某种原因,我可以在Cygwin环境中进行编译,其他同事已经安装了这个包,但如果我试图在同一台计算机上的VirtualBox中编译Ubuntu环境,则会得到一个错误(如下所示)。我得到以下错误。有人对如何解决这个错误有建议吗?
$make安装
输出
Installing VCF tools
make[1]: Entering directory '/home/wde/selt/selectionTools/vcftools_0.1.11/cpp'
g++ -c -O2 -D_FILE_OFFSET_BITS=64 vcftools.cpp -o vcftools.o
g++ -MM -O2 -D_FILE_OFFSET_BITS=64 vcftools.cpp > vcftools.d
g++ -c -O2 -D_FILE_OFFSET_BITS=64 bcf_file.cpp -o bcf_file.o
g++ -MM -O2 -D_FILE_OFFSET_BITS=64 bcf_file.cpp > bcf_file.d
g++ -c -O2 -D_FILE_OFFSET_BITS=64 vcf_file.cpp -o vcf_file.o
vcf_file.cpp: In constructor ‘vcf_file::vcf_file()’:
**vcf_file.cpp:25:13: **error: cannot convert ‘bool’** to ‘gzFile {aka gzFile_s*}’ in assignment**
gzvcf_in = false;
^~~~~
Makefile:53: recipe for target 'vcf_file.o' failed
make[1]: *** [vcf_file.o] Error 1
make[1]: Leaving directory '/home/wde/selt/selectionTools/vcftools_0.1.11/cpp'
/bin/sh: 2: cd: can't cd to perl
Makefile:24: recipe for target 'install' failed
make: *** [install] Error 2
error with make发布于 2017-02-28 14:41:57
makefile所做的基本上是自动化对编译器的调用。因此,makefile的输出类似于通常的编译错误,从命令行中编译源文件。上面错误日志中的重要一行是:
vcf_file.cpp:在构造函数‘vcf_file::vcf_file()’中: **vcf_file.cpp:25:13:**error:无法在赋值** gzvcf_in =false中将‘bool’**转换为‘gzFile {aka gzFile_s*}’;
gzvcf_in是pointer to gzFile_s型的。将bool变量分配给指针类型将不会编译。因此,错误消息。将vcf_file.cpp中的false替换为指针文本std::nullptr或宏NULL,然后重新运行makefile。
顺便说一句。我从vcf中检查了github中的file.cpp文件。它们不包含导致上述错误的行。您可能有一个过时的/修改的版本,引入编译器错误。
https://stackoverflow.com/questions/42511519
复制相似问题