Ensembl / Bio-DB-HTS

Git repo for Bio::DB::HTS module on CPAN, providing Perl links into HTSlib
Apache License 2.0
24 stars 16 forks source link

Log Wording Ambiguous #91

Closed DarioS closed 1 day ago

DarioS commented 4 years ago

I get an error such as

Configuring Bio-DB-HTS-3.01 ... N/A
! Configure failed for Bio-DB-HTS-3.01. See /users/stgrad/dario/.cpanm/work/1585179865.8235/build.log for details.

I use cpanm to install it. When I look at the log file it's not clear what the error is

Running Build.PL

This module requires HTSlib (http://htslib.org/)
Install it if you have not done so already.

This script will attempt to locate HTSlib by looking for htslib/hts.h
and libhts.a / libhts.so in:

  1. --htslib command line argument
  2. HTSLIB_DIR environment variable
  3. --prefix command line argument (which also sets installation location)
  4. Alien::HTSlib dependency resolver
  5. pkg-config (extra directories can be set in PKG_CONFIG_PATH environment variable)
  6. common library locations: /usr /usr/local, /usr/share, /opt/local

-> N/A
-> FAIL Configure failed for Bio-DB-HTS-3.01. See /users/stgrad/dario/.cpanm/work/1585179865.8235/build.log for details.

"This script will attempt to locate HTSlib ..." doesn't explain whether the script successfully found HTSlib or not for my particular instance. Also, the end of the log file advises "See /users/stgrad/dario/.cpanm/work/1585179865.8235/build.log for details." But, I am already viewing that file, so the user should not be instructed to re-open the log file they already opened.

I'm baffled why this script can't detect HTSlib on the server I'm using:

~$ dpkg --list | grep hts
ii  libhts-dev:amd64    1.9-11    amd64    development files for the HTSlib
ii  libhts2:amd64    1.9-11    amd64    C library for high-throughput sequencing data formats
ii  python-htseq    0.11.2-1    amd64    Python high-throughput genome sequencing read analysis utilities
dboehmer commented 2 years ago

I have the same Issue on the recent Debian Bullseye (11).

$ dpkg --list | grep hts
ii  libhts-dev:amd64                              1.11-4                          amd64        development files for the HTSlib
ii  libhts3:amd64                                 1.11-4                          amd64        C library for high-throughput sequencing data formats
$ find /usr/ -name hts.h -or -name libhts.so
/usr/lib/x86_64-linux-gnu/libhts.so
/usr/include/htslib/hts.h

I tried these without success:

The log message See .../build.log for details comes from cpan/cpanm, I think, and is not specific to this CPAN distribution.

@DarioS Could you install this dist eventually? If so, how?

sgiorgetti commented 2 years ago

@dboehmer I could reproduce the error on Ubuntu 21.10 (Impish Indri), using HTSLIB_DIR as per your message above. I did not find a way around it.

However, I can give you 2 ways to install Bio-DB-HTS.

Pre-compiled libraries - somewhat easier

htslib Git repo - less easy one

Final comments

sgiorgetti commented 1 day ago

Closing because of aging. Please, re-open this if you feel it's still current