samstat: error while loading shared libraries: libhts.so.3: cannot open shared object file: No such file or directory
Closed this issue · 3 comments
osilander commented
after installing and invoking samstat I can't seem to get past this error:
samstat: error while loading shared libraries: libhts.so.3: cannot open shared object file: No such file or directory
During install I see:
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
But I don't think this is the issue.
I also see
[ 5%] No update step for 'htslib'
[ 6%] No patch step for 'htslib'
[ 8%] Performing configure step for 'htslib'
and later
[ 10%] Performing build step for 'htslib'
[ 11%] No install step for 'htslib'
[ 13%] Completed 'htslib'
[ 13%] Built target htslib
I get one warning:
/home/olin/software/samstat/src/tld/tests/utests/unit_timing.c: In function ‘main’:
/home/olin/software/samstat/src/tld/tests/utests/unit_timing.c:21:1: warning: label ‘ERROR’ defined but not used [-Wunused-label]
21 | ERROR:
| ^~~~~
But nothing else appears to go wrong (see below for full message).
(samtools) olin@agnes:/home/olin/software/samstat$ mkdir build && cd build && cmake ..
-- The C compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Submodule update
Submodule 'src/tld' (https://github.com/timolassmann/tld.git) registered for path 'tld'
Cloning into '/home/olin/software/samstat/src/tld'...
Submodule path 'tld': checked out '6edfacaf69c31cbce89d24095335a2b4cd49dd68'
-- Found HDF5: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.10.4") found components: C HL
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- pthreads is enabled.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/olin/software/samstat/build
(samtools) olin@agnes:/home/olin/software/samstat/build$ make
Scanning dependencies of target htslib
[ 1%] Creating directories for 'htslib'
[ 3%] Performing download step (verify and extract) for 'htslib'
-- verifying file...
file='/home/olin/software/samstat/thirdparty/htslib-1.16.tar.bz2'
-- verifying file... done
-- extracting...
src='/home/olin/software/samstat/thirdparty/htslib-1.16.tar.bz2'
dst='/home/olin/software/samstat/build/htslib/src/htslib'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[ 5%] No update step for 'htslib'
[ 6%] No patch step for 'htslib'
[ 8%] Performing configure step for 'htslib'
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for ranlib... ranlib
checking for grep that handles long lines and -e... /bin/grep
checking for C compiler warning flags... -Wall
checking whether C compiler accepts -mssse3 -mpopcnt -msse4.1... yes
checking whether C compiler accepts -mavx2... yes
checking whether C compiler accepts -mavx512f... yes
checking whether C compiler supports ARM Neon... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking shared library type for unknown-Linux... plain .so
checking whether the compiler accepts -fvisibility=hidden... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking for gmtime_r... yes
checking for fsync... yes
checking for drand48... yes
checking for srand48_deterministic... no
checking whether fdatasync is declared... yes
checking for fdatasync... yes
checking for library containing log... -lm
checking for zlib.h... yes
checking for inflate in -lz... yes
checking for library containing recv... none required
checking whether htscodecs files are present... yes
checking for libdeflate.h... no
checking for libdeflate_deflate_compress in -ldeflate... no
configure: WARNING: GCS support not enabled: requires libcurl support
checking for library containing regcomp... none required
checking whether PTHREAD_MUTEX_RECURSIVE is declared... yes
configure: creating ./config.status
config.status: creating config.mk
config.status: creating htslib.pc.tmp
config.status: creating config.h
config.status: linking htscodecs_bundled.mk to htscodecs.mk
[ 10%] Performing build step for 'htslib'
[ 11%] No install step for 'htslib'
[ 13%] Completed 'htslib'
[ 13%] Built target htslib
Scanning dependencies of target boot
[ 15%] Building C object src/tld/src/CMakeFiles/boot.dir/tld.c.o
[ 16%] Linking C static library libboot.a
[ 16%] Built target boot
Scanning dependencies of target gentable
[ 18%] Building C object src/tld/src/CMakeFiles/gentable.dir/gentables.c.o
[ 20%] Linking C executable gentable
[ 20%] Built target gentable
[ 21%] Generating tld-seq-tables.h
Scanning dependencies of target tld-dev
[ 23%] Building C object src/tld/src/CMakeFiles/tld-dev.dir/tld.c.o
[ 25%] Linking C static library libtld-dev.a
[ 25%] Built target tld-dev
Scanning dependencies of target converttablegen
[ 26%] Building C object src/CMakeFiles/converttablegen.dir/convert_tables.c.o
[ 28%] Linking C executable converttablegen
[ 28%] Built target converttablegen
Scanning dependencies of target module_plot
[ 30%] Building C object src/plot/CMakeFiles/module_plot.dir/plot.c.o
[ 31%] Building C object src/plot/CMakeFiles/module_plot.dir/plot_interval.c.o
[ 33%] Building C object src/plot/CMakeFiles/module_plot.dir/plot_group.c.o
[ 35%] Linking C static library libmodule_plot.a
[ 35%] Built target module_plot
[ 36%] Generating convert_tables.h
Scanning dependencies of target samstat
[ 38%] Building C object src/CMakeFiles/samstat.dir/samstat.c.o
[ 40%] Building C object src/CMakeFiles/samstat.dir/htsinterface/htsglue.c.o
[ 41%] Building C object src/CMakeFiles/samstat.dir/sambamparse/sam_bam_parse.c.o
[ 43%] Building C object src/CMakeFiles/samstat.dir/param/param.c.o
[ 45%] Building C object src/CMakeFiles/samstat.dir/collect/collect.c.o
[ 46%] Building C object src/CMakeFiles/samstat.dir/report/stat_report.c.o
[ 48%] Building C object src/CMakeFiles/samstat.dir/report/lst.c.o
[ 50%] Building C object src/CMakeFiles/samstat.dir/tools/tools.c.o
[ 51%] Building C object src/CMakeFiles/samstat.dir/thread/thread_data.c.o
[ 53%] Linking C executable samstat
[ 53%] Built target samstat
Scanning dependencies of target unit-seq
[ 55%] Building C object src/tld/tests/CMakeFiles/unit-seq.dir/utests/unit_seq.c.o
[ 56%] Linking C executable unit-seq
[ 56%] Built target unit-seq
Scanning dependencies of target unit-logsum
[ 58%] Building C object src/tld/tests/CMakeFiles/unit-logsum.dir/utests/unit_logsum.c.o
[ 60%] Linking C executable unit-logsum
[ 60%] Built target unit-logsum
Scanning dependencies of target unit-timing
[ 61%] Building C object src/tld/tests/CMakeFiles/unit-timing.dir/utests/unit_timing.c.o
/home/olin/software/samstat/src/tld/tests/utests/unit_timing.c: In function ‘main’:
/home/olin/software/samstat/src/tld/tests/utests/unit_timing.c:21:1: warning: label ‘ERROR’ defined but not used [-Wunused-label]
21 | ERROR:
| ^~~~~
[ 63%] Linking C executable unit-timing
[ 63%] Built target unit-timing
Scanning dependencies of target unit-seq-rev
[ 65%] Building C object src/tld/tests/CMakeFiles/unit-seq-rev.dir/utests/unit_seq_rev.c.o
[ 66%] Linking C executable unit-seq-rev
[ 66%] Built target unit-seq-rev
Scanning dependencies of target int-noise
[ 68%] Building C object src/tld/tests/CMakeFiles/int-noise.dir/itests/noise.c.o
[ 70%] Linking C executable int-noise
[ 70%] Built target int-noise
Scanning dependencies of target unit-rng
[ 71%] Building C object src/tld/tests/CMakeFiles/unit-rng.dir/utests/unit_rng.c.o
[ 73%] Linking C executable unit-rng
[ 73%] Built target unit-rng
Scanning dependencies of target kde_itest
[ 75%] Building C object src/tld/tests/CMakeFiles/kde_itest.dir/itests/kde_itest.c.o
[ 76%] Linking C executable kde_itest
[ 76%] Built target kde_itest
Scanning dependencies of target seq_shannon
[ 78%] Building C object src/tld/tests/CMakeFiles/seq_shannon.dir/itests/seq_shannon.c.o
[ 80%] Linking C executable seq_shannon
[ 80%] Built target seq_shannon
Scanning dependencies of target unit-hdf5
[ 81%] Building C object src/tld/tests/CMakeFiles/unit-hdf5.dir/utests/unit_hdf5.c.o
[ 83%] Linking C executable unit-hdf5
[ 83%] Built target unit-hdf5
Scanning dependencies of target unit-str
[ 85%] Building C object src/tld/tests/CMakeFiles/unit-str.dir/utests/unit_str.c.o
[ 86%] Linking C executable unit-str
[ 86%] Built target unit-str
Scanning dependencies of target unit-stats
[ 88%] Building C object src/tld/tests/CMakeFiles/unit-stats.dir/utests/unit_stats.c.o
[ 90%] Linking C executable unit-stats
[ 90%] Built target unit-stats
Scanning dependencies of target unit-alpha
[ 91%] Building C object src/tld/tests/CMakeFiles/unit-alpha.dir/utests/unit_alphabet.c.o
[ 93%] Linking C executable unit-alpha
[ 93%] Built target unit-alpha
Scanning dependencies of target unit-test-suite
[ 95%] Building C object src/tld/tests/CMakeFiles/unit-test-suite.dir/utests/unit_tests.c.o
[ 96%] Linking C executable unit-test-suite
[ 96%] Built target unit-test-suite
Scanning dependencies of target unit-plot
[ 98%] Building C object src/plot/CMakeFiles/unit-plot.dir/plot_test.c.o
[100%] Linking C executable unit-plot
[100%] Built target unit-plot
(samtools) olin@agnes:/home/olin/software/samstat/build$ sudo make install
[sudo] password for olin:
[ 13%] Built target htslib
[ 16%] Built target boot
[ 20%] Built target gentable
[ 25%] Built target tld-dev
[ 28%] Built target converttablegen
[ 35%] Built target module_plot
[ 53%] Built target samstat
[ 56%] Built target unit-seq
[ 60%] Built target unit-logsum
[ 63%] Built target unit-timing
[ 66%] Built target unit-seq-rev
[ 70%] Built target int-noise
[ 73%] Built target unit-rng
[ 76%] Built target kde_itest
[ 80%] Built target seq_shannon
[ 83%] Built target unit-hdf5
[ 86%] Built target unit-str
[ 90%] Built target unit-stats
[ 93%] Built target unit-alpha
[ 96%] Built target unit-test-suite
[100%] Built target unit-plot
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/bin/samstat
-- Set runtime path of "/usr/local/bin/samstat" to ""
TimoLassmann commented
Thanks for reporting!
It seems there was a mistake my cmake files which should be fixed now. Can you git the latest version and try again?
osilander commented
Yup that worked! Thanks!
TimoLassmann commented
Great.