lmrodriguezr / nonpareil

Estimate metagenomic coverage and sequence diversity
http://enve-omics.ce.gatech.edu/nonpareil/
Other
44 stars 11 forks source link

Unable to locally compile 3.5.0 following instructions on website #65

Closed jfy133 closed 3 months ago

jfy133 commented 3 months ago

Following the instrutions here, both locally on my laptop and on the attempted bioconda recipe udptae, I get the following error(s)

make[1]: Leaving directory '/workspace/lmrodriguezr-nonpareil-9d7365e/enveomics'
g++ nonpareil.cpp enveomics/universal.o -lz enveomics/multinode.o enveomics/sequence.o enveomics/SeqReader.o  enveomics/KmerCounter.o enveomics/References.o enveomics/Hash.o enveomics/nonpareil_mating.o enveomics/nonpareil_sampling.o -lpthread -Wall -std=c++11 -o nonpareil
/usr/bin/ld: enveomics/sequence.o: in function `gunz_file(char const*, char const*)':
sequence.cpp:(.text+0x1f2c): undefined reference to `gzopen'
/usr/bin/ld: sequence.cpp:(.text+0x1f6f): undefined reference to `gzrewind'
/usr/bin/ld: sequence.cpp:(.text+0x1f8f): undefined reference to `gzread'
/usr/bin/ld: sequence.cpp:(.text+0x1fb7): undefined reference to `gzeof'
/usr/bin/ld: sequence.cpp:(.text+0x1fde): undefined reference to `gzclose'
collect2: error: ld returned 1 exit status
make: *** [Makefile:34: nonpareil] Error 1

Do you have any idea what is happening or what I am missing?

jfy133 commented 3 months ago

@lmrodriguezr just FYI here is the bioconda recipe update I also tried on...

https://github.com/bioconda/bioconda-recipes/pull/48672

And the bioconda build log: https://dev.azure.com/bioconda/bioconda-recipes/_build/results?buildId=61979&view=logs&jobId=e14e69ff-a0ae-55c4-b71d-229b239cfb2f&j=e14e69ff-a0ae-55c4-b71d-229b239cfb2f&t=7df82132-b284-504b-53d6-7d3e63519572

lmrodriguezr commented 3 months ago

Thank you @jfy133 ! It looks like I'm missing the -lz in the linking section of the command to compile (seems to right after universal.o instead). I'll fix it now and push a new release very soon. What puzzles me is why it compiled for me without issues in two different machines.

jianshu93 commented 3 months ago

Hello Both,

I can also confirmed that without the -lz, it also worked for me on MacOS 14.5 and RHEL 7.9. the otool -L and ldd both confirmed that the libz was linked to the binary.

Jianshu

lmrodriguezr commented 3 months ago

Thank you @jianshu93 ! In any case, I just moved it after the objects, and introduced a few additional improvements.

@jfy133 Please take a look and feel free to reopen this issue if the problem persists.

jfy133 commented 3 months ago

Compiled both local linux and on bioconda thank you :D