GMOD / GBrowse-Adaptors

8 stars 6 forks source link

Bio-BigFile - new versions of jksrc.zip are incompatible #17

Closed keiranmraine closed 8 years ago

keiranmraine commented 8 years ago

The new versions of jksrc.zip start to use htslib and result in a failure to load the tbx functions:

Can't load '/nfs/users/nfs_k/kr2/tmp/Bio-BigFile-1.07/t/../blib/arch/auto/Bio/DB/BigFile/BigFile.so' for module Bio::DB::BigFile: /nfs/users/nfs_k/kr2/tmp/Bio-BigFile-1.07/t/../blib/arch/auto/Bio/DB/BigFile/BigFile.so: undefined symbol: tbx_readrec at /software/perl-5.16.3/lib/5.16.3/x86_64-linux-thread-multi/DynaLoader.pm line 190.

This oddity was that building under travis-ci with language set to 'c' works, but language 'perl' doesn't.

v334 of jksrc appears to be the last functioning version. Unfortunately they only keep a limited number of versions (the ones dating back to the release of BioBigFile are no longer present).

tjparnell commented 8 years ago

Confirmed using the kent/src/lib from the simpler userApps source archives that UCSC provides. Versions 310, 329, and 334 all work, but v336 fails the Build tests.

This repo hasn't been touched for quite a while. Is Lincoln still around or should a new maintainer step forward?

keiranmraine commented 8 years ago

I've diagnosed and have a patch for Build.pl with v334 if built on travis with language set to perl. I'll have another go at later versions for the htslib/tbx issue.

Bio::DB::Sam has been replaced with Bio::DB::HTS/Bio-HTS, but I don't know if anyone has tested it within GBrowse (will support both BAM and CRAM).

I can add travis for Bio-BigFile but the download site for jksrc is problematic.

andrewyatz commented 8 years ago

We've seen issues in v337 and it's due to issues with linking in htslib as well as jkweb. @brianrainey has been helping me out with it. Happy to contribute more once I'm back on a laptop.

Also as an aside I've noticed the big file tests are failing due to incompatible floating point numbers.

keiranmraine commented 8 years ago

Floating point issues are reported here: #16 (someone was having issues installing PCAP-core so I had them add the details)

andrewyatz commented 8 years ago

Firstly to compile jkweb now you need to:

  1. Replace CC=gcc with CC=gcc -fPIC in src/inc/common.mk
  2. Replace -DUCSC_CRAM with -DUCSC_CRAM -fPIC in src/htslib/Makefile

You cannot give -fPIC as a make command line directive otherwise htslib compilation does not work. Then in BigFile you need to link against libhts.a like so:

extra_linker_flags => ["$jk_lib/$LibFile", "$jk_include/../htslib/libhts.a", '-lz','-lssl'],

Assuming you are going to link against the version built by jkweb and not another htslib.

keiranmraine commented 8 years ago

I've already put a pull request in for all of this:

https://github.com/GMOD/GBrowse-Adaptors/pull/19

sicotte commented 8 years ago

This fix worked for me (p.s. the linker flag mod goes in the Build.PL file from the package)

I was able to compile and then extract data from a file (I had a bedgraph file to compare the results).