I'm trying to install vcftools, for which the Makefile (in the cpp directory) reads as follows:
# Compiler CPP = g++ # Output executable EXECUTABLE = vcftools # Flag used to turn on compilation of PCA routines ifndef VCFTOOLS_PCA VCFTOOLS_PCA = 0 endif # Compiler flags CPPFLAGS = -O2 -Wall -Wextra -D_FILE_OFFSET_BITS=64 #CPPFLAGS = -g # Included libraries (zlib) #LIB = -lz LIB = -lz -I/usr/local/include/ -L/usr/local/lib/ OBJS = vcftools.o vcf_file.o vcf_entry.o \ vcf_entry_getters.o vcf_entry_setters.o \ vcf_file_filters.o vcf_file_output.o \ vcf_file_format_convert.o \ vcf_file_diff.o parameters.o \ vcf_file_index.o \ output_log.o
I have not been able to get this Makefile to run correctly, but instead get an error that reads:
vcf_file.cpp:(.text+0xe72): undefined reference to `gzbuffer' collect2: ld returned 1 exit status make: *** [vcftools] Error 1 make: Leaving directory `/home/Public/Packages/vcftools_0.1.10/cpp' /bin/sh: 2: cd: can't cd to perl make: *** [install] Error 2
I think part of the problem is that there is an error related to my zlib installation path (and see a related question already posted). However, I've tried to change the -I and -L paths to match my zlib installation (as suggested) and haven't had any luck (there are a lot of folders that seem to contain zlib files and may be trying the wrong folders).
Further, by searching through other forums related to this program (here), it seems that I may need zlib1g-dev. zlib1g-dev is on my computer (it shows up in my ubuntu software center), but doesn't show up when I enter:
root@root:/home/Public/Packages/vcftools_0.1.10/cpp# whereis zlib1g-dev zlib1g-dev: root@root:/home/Public/Packages/vcftools_0.1.10/cpp# which zlib1g-dev
I've considered removing and re-installing zlib, but it looks like several programs are dependent on it. When trying to run an install or remove, I get the following message:
sudo apt-get install zlib-devel
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package zlib-devel
I'm not sure if the problem lies in where zlib is installed on my computer, an error in the installation, or something else entirely over my head. Any suggestions would be greatly appreciated. Thank you.