GuoliangLi-HZAU / BatMeth2

BS-seq analysis pipeline
38 stars 12 forks source link

Install error: collect2: error: ld returned 1 exit status #23

Open yplee614 opened 3 years ago

yplee614 commented 3 years ago

Dear GuoliangLi, I am getting error while installing BatMeth2 on ubuntu. Please let me know if I am missing any dependencies.

make all-recursive make[1]: Entering directory '/home/ubuntu/software/BatMeth2-BatMeth2-v2.1' Making all in src make[2]: Entering directory '/home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src' g++ -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -lz -lm -pthread -g -O2 -o penguin print.o filters.o utils.o batlib.o rqindex.o penguin.o map.o bfix.o BWT.o MiscUtilities.o MemManager.o TextConverter.o r250.o QSufSort.o ssw.o command.o swroutines.o iniparser.o inistrlib.o dictionary.o DNACount.o Timing.o Socket.o HSP.o HSPstatistic.o karlin.o fastsw.o /usr/bin/ld: batlib.o: in function Analyze_File(INFILE&, LEN&)': /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/batlib.cpp:94: undefined reference togzgets' /usr/bin/ld: /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/batlib.cpp:121: undefined reference to gzrewind' /usr/bin/ld: /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/batlib.cpp:113: undefined reference togzgets' /usr/bin/ld: /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/batlib.cpp:99: undefined reference to gzgets' /usr/bin/ld: batlib.o: in functionRead_Tag_gz(void*, char, READ&)': /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/batlib.cpp:461: undefined reference to gzgets' /usr/bin/ld: /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/batlib.cpp:465: undefined reference togzgets' /usr/bin/ld: /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/batlib.cpp:469: undefined reference to gzgets' /usr/bin/ld: batlib.o:/home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/batlib.cpp:471: more undefined references togzgets' follow /usr/bin/ld: penguin.o: in function main': /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/penguin.cpp:368: undefined reference togzopen' /usr/bin/ld: /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/penguin.cpp:369: undefined reference to gzopen' /usr/bin/ld: /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/penguin.cpp:471: undefined reference togzrewind' /usr/bin/ld: /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/penguin.cpp:475: undefined reference to `gzrewind' collect2: error: ld returned 1 exit status make[2]: [Makefile:362: penguin] Error 1 make[2]: Leaving directory '/home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src' make[1]: [Makefile:255: all-recursive] Error 1 make[1]: Leaving directory '/home/ubuntu/software/BatMeth2-BatMeth2-v2.1' make: *** [Makefile:193: all] Error 2

Kindly let me know the issues.

Thank you,

Best, Yongping

gill0110 commented 3 years ago

Installing Batmenth2I have a similar problem during make. Have you solved it? Thanks. penguin.o: In function main': /home/jiao/biosoft/Batmeth2/src/penguin.cpp:368: undefined reference togzopen' /home/jiao/biosoft/Batmeth2/src/penguin.cpp:471: undefined reference to gzrewind' /home/jiao/biosoft/Batmeth2/src/penguin.cpp:369: undefined reference togzopen' /home/jiao/biosoft/Batmeth2/src/penguin.cpp:475: undefined reference to gzrewind' batlib.o: In functionAnalyze_File(INFILE&, LEN&)': /home/jiao/biosoft/Batmeth2/src/batlib.cpp:94: undefined reference to gzgets' /home/jiao/biosoft/Batmeth2/src/batlib.cpp:99: undefined reference togzgets' /home/jiao/biosoft/Batmeth2/src/batlib.cpp:121: undefined reference to gzrewind' /home/jiao/biosoft/Batmeth2/src/batlib.cpp:113: undefined reference togzgets' batlib.o: In function Read_Tag_gz(void*, char, READ&)': /home/jiao/biosoft/Batmeth2/src/batlib.cpp:461: undefined reference togzgets' /home/jiao/biosoft/Batmeth2/src/batlib.cpp:465: undefined reference to gzgets' /home/jiao/biosoft/Batmeth2/src/batlib.cpp:469: undefined reference togzgets' /home/jiao/biosoft/Batmeth2/src/batlib.cpp:471: undefined reference to gzgets' batlib.o:/home/jiao/biosoft/Batmeth2/src/batlib.cpp:585: more undefined references togzgets' follow collect2: error: ld returned 1 exit status Makefile:361: recipe for target 'penguin' failed make[2]: [penguin] Error 1 make[2]: Leaving directory '/home/jiao/biosoft/Batmeth2/src' Makefile:255: recipe for target 'all-recursive' failed make[1]: [all-recursive] Error 1 make[1]: Leaving directory '/home/jiao/biosoft/Batmeth2' Makefile:193: recipe for target 'all' failed make: *** [all] Error 2

ZhouQiangwei commented 3 years ago

please download Zlib library and install

wget https://www.dna-asmdb.com/tools/zlib-1.2.11.zip
unzip zlib-1.2.11.zip
cd zlib-1.2.11/
pwd  #get location

./configure --prefix=/disk1/glli/tools/zlib-1.2.11/
make
make install

Add environment variables to ~/.bashrc

export C_INCLUDE_PATH=$C_INCLUDE_PATH:/disk1/glli/tools/zlib-1.2.11/include
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/disk1/glli/tools/zlib-1.2.11/include
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH::/disk1/glli/tools/zlib-1.2.11/lib
export LIBRARY_PATH=$LIBRARY_PATH::/disk1/glli/tools/zlib-1.2.11/lib

And then:

$ source ~/.bash

It is recommended to log out and log in to the server again to ensure that the environment variables take effect.