Coder Social home page Coder Social logo

undefined symbol: gzopen64 about checkm HOT 5 CLOSED

ecogenomics avatar ecogenomics commented on July 17, 2024
undefined symbol: gzopen64

from checkm.

Comments (5)

donovan-h-parks avatar donovan-h-parks commented on July 17, 2024

Hello,

I haven't come across this before. Searching around, it appears this is an issue with the zlib libraries and some Ubuntu-specific method renaming. To start, I would suggest making sure you have the latest version of pysam (you can see the it is calling libchtslib.so) which in turn requires gzopen64. You could also try installing the latest version of gzip. Please let me know if this doesn't work and I will follow up with the authors of pysam.

Cheers,
Donovan

from checkm.

wwhsiao avatar wwhsiao commented on July 17, 2024

Hi Donovan,

Thanks for the quick response. I believe that I have the latest pysam (again using pip to install; and pip install update to confirm). It does appear to be an issue with the zlib. I have the latest available packages available through Redhat 6.2, and it's not clear to me whether this version is compatible with the latest pysam.

yum list zlib
Installed Packages
zlib.i686 1.2.3-29.el6 @rhel-6-server-rpms
zlib.x86_64 1.2.3-29.el6 @rhel-6-server-rpms

It seems that there is also a newer version in /usr/local/lib (libz.so.1.2.8)

As pysam wraps Samtools 1.3, I also tried to installed the latest Samtools and encountered similar error messages:

gcc -pthread -rdynamic -o samtools bam_index.o bam_plcmd.o sam_view.o bam_cat.o bam_md.o bam_reheader.o bam_sort.o bedidx.o kprobaln.o bam_rmdup.o bam_rmdupse.o bam_mate.o bam_stat.o bam_color.o bamtk.o bam2bcf.o bam2bcf_indel.o errmod.o sample.o sam_opts.o cut_target.o phase.o bam2depth.o padding.o bedcov.o bamshuf.o faidx.o dict.o stats.o stats_isize.o bam_flags.o bam_split.o bam_tview.o bam_tview_curses.o bam_tview_html.o bam_lpileup.o bam_quickcheck.o bam_addrprg.o libbam.a htslib-1.3/libhts.a -lcurses -lm -lz -ldl
bedidx.o: In function bed_read': /usr/local/packages/samtools/samtools-1.3/bedidx.c:170: undefined reference togzopen64'
phase.o: In function loadpos': /usr/local/packages/samtools/samtools-1.3/phase.c:506: undefined reference togzopen64'
bedcov.o: In function main_bedcov': /usr/local/packages/samtools/samtools-1.3/bedcov.c:118: undefined reference togzopen64'
dict.o: In function write_dict': /usr/local/packages/samtools/samtools-1.3/dict.c:50: undefined reference togzopen64'
collect2: ld returned 1 exit status
make: *** [samtools] Error 1

It's not clear to me which library defiines gzopen64 and how to satisfy that dependency. I found this old thread about gzope64 and samtools but adding "CFLAGS= -g -Wall -O2 -L /usr/local/lib (This is where my zlib libraries are located)" to the samtools Makefile didn't fix the problem. I might take the question to samtools forum too. Thanks.

http://seqanswers.com/forums/showthread.php?t=9708

from checkm.

donovan-h-parks avatar donovan-h-parks commented on July 17, 2024

Best I can tell, this is an issue with zlib. It appears that under Ubuntu gzopen() in the zlib library was renamed gzopen64(). I'm not sure why this was done. My best guess is that some combination of pysam, htslib, or samtools was compiled under Ubuntu and thus expects the function to be called gzopen64. It is certainly worth asking about this on the samtools or htslib forum. Note that the error does seem specified to htslib:

ImportError: /usr/local/lib/python2.7/site-packages/pysam/libchtslib.so: undefined symbol: gzopen64

from checkm.

donovan-h-parks avatar donovan-h-parks commented on July 17, 2024

Closed due to inactivity.

from checkm.

mattsmithau avatar mattsmithau commented on July 17, 2024

Was getting this error trying to build a program called LRSIM. Here is what I had to do to make it build:

It didn't want to use our custom samtools but had its own to build against. It didn't want to use our zlib properly. Had to go into the Makefiles in the src folder and change the line to point directly at our zlib in the CFLAGS line:

pwd
/tools/lrsim-1/DWGSIMSrc

cd into DWGSIMSrc
ls
dwgsim dwgsim_eval INSTALL LICENSE Makefile README samtools scripts src
cd into samtools
modified this line in the Makefile:
CFLAGS= -g -Wall $(VERSION) -O2 -L /tools/hpclib/zlib-1.2.8/lib
make and it built this samtools
cd ..
went into that Makefile and did the same thing
make and it built the binaries: dwgsim dwgsim_eval
cd ..
ls
4M-with-alts-february-2016.txt clean.sh DWGSIMSrc extractReads.cpp _Inline LICENSE msort README.md simulateLinkedReads.pl SURVIVORSrc
clean dwgsim extractReads faFilter.pl lib make.sh msortSrc samtools SURVIVOR test

Then ran the: sh make.sh and it built proper

This was for this program on a centos 6.6 machine.

https://github.com/aquaskyline/LRSIM

Hope that helps someone.

from checkm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.