I am using conda environment and compliers are installed in custom path.
The error 'ld missing -lz' appeared when running the make command. This is minor but could take some time to fix for those (eg myself) who are not experienced in compiling source c/cpp code.
The solution here dose not suit all cases, but it would give you a hint to solve the error quickly.
Open and edit the Makefile
# custome g++ complierCC=/path/to/g++# custome include library and libCFLAGS=-Wall -O2 -Wno-char-subscripts -fopenmp -I/path/to/your/zlib/include -L/path/to/your/zlib/lib
Hint: To locate your custom zlib include and lib directories, you can run command like
find /path/to/possible/dir '*' | grep zlib
The above settings do not fix the error of compiling bedpe2Matrix because it uses different compile options. To fix this
Open Makefile and find the line $(CC) -Wall -O2 -std=c++0x -o ${BIN}/$@ ${SOURCES}/bedpe2Matrix.cpp ${LDFLAGS}
Add -I /path/to/your/zlib/include -L /path/to/your/zlib/lib before -Wall parameter
I am using conda environment and compliers are installed in custom path.
The error 'ld missing -lz' appeared when running the
make
command. This is minor but could take some time to fix for those (eg myself) who are not experienced in compiling source c/cpp code.The solution here dose not suit all cases, but it would give you a hint to solve the error quickly.
Open and edit the Makefile
# custome g++ complier
CC=/path/to/g++
# custome include library and lib
CFLAGS=-Wall -O2 -Wno-char-subscripts -fopenmp -I/path/to/your/zlib/include -L/path/to/your/zlib/lib
Hint: To locate your custom zlib include and lib directories, you can run command like
find /path/to/possible/dir '*' | grep zlib
The above settings do not fix the error of compiling bedpe2Matrix because it uses different compile options. To fix this
Open Makefile and find the line
$(CC) -Wall -O2 -std=c++0x -o ${BIN}/$@ ${SOURCES}/bedpe2Matrix.cpp ${LDFLAGS}
Add
-I /path/to/your/zlib/include -L /path/to/your/zlib/lib
before-Wall
parameter