This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Vcf Tools Installation Error

Hi all,

I'm trying to install the latest version of vcf-tools but i'm facing with this error:

g++ -O2 -Wall -Wextra vcftools.cpp vcffile.cpp vcfentry.cpp vcfentrygetters.cpp vcfentrysetters.cpp vcffilefilters.cpp vcffileoutput.cpp vcffileformatconvert.cpp vcffilediff.cpp parameters.cpp vcffileindex.cpp outputlog.cpp -o vcftools -lz /tmp/ccvTYIPP.o: In function vcf_file::output_as_LDhat_unphased(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': vcf_file_format_convert.cpp:(.text+0x18d3): warning: the use oftmpnam' is dangerous, better use mkstemp' /tmp/cccloweC.o: In functionvcffile::open()': vcffile.cpp:(.text+0xed2): undefined reference to gzbuffer' collect2: ld returned 1 exit status make[1]: *** [vcftools] Error 1 make[1]: Leaving directory/opt/NGS/VCFTOOLS/vcftools_latest/cpp' cd: 2: can't cd to perl make: * [install] Error 2

How can solve it? Any suggestions?

Matteo

vcftools installation

1 answer

Your zlib development library is missing or is not installed properly.

This, if it is installed then you make need to set your the LDFLAGS to include -L <path to=""/>

edit: In the newest version of vcf-tools in cpp/Makefile on line 18:

17 LIB = -lz                                                                                                                                                                                                 
18 #LIB = -lz -I/opt/local/include/ -L/opt/local/lib/

You may need to comment out line 17 and uncomment line 18, fixing the paths for the -I and -L flags to point to where ever they are on your system.

Thanks a lot! This solve the issue.

" fixing the paths for the -I and -L flags to point to where ever they are on your system", what do you mean by "they", zlib ? or those directories ? I do not have either of them !

search for: how to install the zlib library (for your linux system)

Log in to answer this question.