Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could not load: libhts.so, but in LD_LIBRARY_PATH #1

Open
wdecoster opened this issue Nov 15, 2017 · 12 comments
Open

could not load: libhts.so, but in LD_LIBRARY_PATH #1

wdecoster opened this issue Nov 15, 2017 · 12 comments

Comments

@wdecoster
Copy link

Hi,

My usual CentOS6 server has an outdated libc.so.6 so I have to use a more recent OS. Sysadmin told me this cannot be updated, unfortunately. Anyway, on the other server (CentOS7) I downloaded the binary and installed the libhts.so using conda install htslib.

Since find ~ -name libhts.so returns

/home/wdecoster/anaconda3/pkgs/htslib-1.6-0/lib/libhts.so
/home/wdecoster/anaconda3/lib/libhts.so

I changed the LD_LIBRARY_PATH to
/home/wdecoster/anaconda3/lib/:/home/wdecoster/anaconda3/pkgs/htslib-1.6-0/lib/

Yet, when executing ./indelope -h I get:

could not load: libhts.so
compile with -d:nimDebugDlOpen for more information

Did I mess up somewhere?
I can install nim and try compiling with the suggested -d:nimDebugDlOpen flag, or what do you suggest?

Installation on my Ubuntu17.10 desktop does work.

Cheers,
Wouter

@brentp
Copy link
Owner

brentp commented Nov 15, 2017

you need to do: export LD_LIBRARY_PATH=/home/wdecoster/anaconda3/pkgs/htslib-1.6-0/lib/

not just set it.

@wdecoster
Copy link
Author

wdecoster commented Nov 15, 2017

That's what I did, more specifically, I added the following line in my ~/.bashrc (and sourced the file afterwards)

export LD_LIBRARY_PATH="/home/wdecoster/anaconda3/lib/:/home/wdecoster/anaconda3/pkgs/htslib-1.6-0/lib/"

Trying again, explicitly as you suggested:

export LD_LIBRARY_PATH=/home/wdecoster/anaconda3/pkgs/htslib-1.6-0/lib/
echo $LD_LIBRARY_PATH
/home/wdecoster/anaconda3/pkgs/htslib-1.6-0/lib/


./indelope 
could not load: libhts.so
compile with -d:nimDebugDlOpen for more information

@brentp
Copy link
Owner

brentp commented Nov 15, 2017

what does ls -lh $LD_LIBRARY_PATH show?

@wdecoster
Copy link
Author

The libhts.so files turn out to link to libhts.so.1.6

$ ls -lh $LD_LIBRARY_PATH
total 1.9M
-rw-rw-r-- 2 wdecoster wdecoster 1.1M Oct 25 07:49 libhts.a
lrwxrwxrwx 1 wdecoster wdecoster   13 Nov 15 15:48 libhts.so -> libhts.so.1.6
-rw-rw-r-- 2 wdecoster wdecoster 838K Oct 25 07:49 libhts.so.1.6
lrwxrwxrwx 1 wdecoster wdecoster   13 Nov 15 15:48 libhts.so.2 -> libhts.so.1.6
drwxrwxr-x 2 wdecoster wdecoster   23 Nov 15 15:47 pkgconfig

Does that look as expected? Should I try installing htslib without conda?

@brentp
Copy link
Owner

brentp commented Nov 15, 2017

yes. I would try that. it's easy enough to build and then you just set LD_LIBRARY_PATH to the directory.

@wdecoster
Copy link
Author

wdecoster commented Nov 15, 2017

Thanks, that seems to do the trick:

wget https://github.com/samtools/htslib/releases/download/1.6/htslib-1.6.tar.bz2
tar xjf htslib-1.6.tar.bz2
cd htslib-1.6
./configure ~/bin/
make
export LD_LIBRARY_PATH=/home/wdecoster/htslib-1.6/libhts.so



./indelope -h
indelope 0.0.1

  Usage: indelope [options] <reference> <BAM-or-CRAM>

Arguments:

  <reference>     reference fasta file.
  <BAM-or-CRAM>   call variants in this file.

Options:

  -m --min-reads <INT>        minimum number of reads to send for alignment [default: 3]
  -c --min-contig-len <INT>   minimum contig length to send for alignment [default: 73]
  -e --min-event-len <INT>    minimum size of indel to report [default: 4]
  -t --threads <INT>          number of cram/bam decompression threads [default: 1]
  -h --help                   show help

Would there be an "easy" way to solve the outdated libc.so.6 issue on the other server? If not I'll have to talk to our sysadmin about fixing mounts etc to give me access to the data on the recent server...

To be more specific, this is the error on the older server:

$ indelope 
indelope: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by indelope)

@brentp
Copy link
Owner

brentp commented Nov 15, 2017

so your troubles have highlighted the need for a binary for older systems. I am also fixing some severe (but shallow) bugs. How about you wait until next week and I'll make a binary for the older systems as well. I'd rather you use it successfully and report on substantial issues/features rather than test your patience with annoying issues like these.

@wdecoster
Copy link
Author

That sounds great.

@brentp
Copy link
Owner

brentp commented Dec 2, 2017

sorry for the delay. See my response here: #4 (comment)

I'll be working on indelope again this week and hope to make good progress on accuracy and then I'll work on improving distribution/install.

@wdecoster
Copy link
Author

Thanks for the update, I'll keep an eye on this repository.

@fatcc
Copy link

fatcc commented Mar 20, 2018

Hi,
I tried to install mosdepth in a new created env with "conda install mosdepth", but the same error repeated appear as below.

$ mosdepth -h
could not load: libhts.so
compile with -d:nimDebugDlOpen for more information

I tried to install libhts.so manually and set the LD_LIBRARY_PATH for all found libhts.so seperately, however, it didn't work.

$ find / -name "libhts.so"
/root/miniconda2/lib/libhts.so
/root/miniconda2/envs/env_mosdepth/lib/libhts.so
/root/miniconda2/pkgs/htslib-1.7-0/lib/libhts.so
/root/cc/biosoft/htslib-1.7/libhts.so
/root/cc/biosoft/htslib-1.6/libhts.so

ex.

$ LD_LIBRARY_PATH=/root/cc/biosoft/htslib-1.7/ mosdepth -h
could not load: libhts.so
compile with -d:nimDebugDlOpen for more information

Is there any else method to solve it?

Thanks in advance.

Sincerely,
cc

@brentp
Copy link
Owner

brentp commented Mar 20, 2018

Hmm. Are you sure that libhts.so is still there? What does ls $LD_LIBRARY_PATH/libhts.so show?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants