smarco / WFA2-lib

WFA-lib: Wavefront alignment algorithm library v2
Other
162 stars 36 forks source link

Adding -lrt in case "librt.so.1: error adding symbols: DSO missing from command line" #33

Closed ksahlin closed 1 year ago

ksahlin commented 2 years ago

In case anyone stumbles upon the same installation error, I fixed it by adding -lrt to line 48 in the Makefile as

all: CC_FLAGS+=-O3 -march=native -lrt #-flto -ffat-lto-objects

Compilers

(base) [kris@rackham3 WFA2-lib]$ echo $CC
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc
(base) [kris@rackham3 WFA2-lib]$ /proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc --version
x86_64-conda_cos6-linux-gnu-cc (crosstool-NG 1.23.0.449-a04d0) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(base) [kris@rackham3 WFA2-lib]$ echo $CXX
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-g++
(base) [kris@rackham3 WFA2-lib]$ /proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-g++ --version
x86_64-conda_cos6-linux-gnu-g++ (crosstool-NG 1.23.0.449-a04d0) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Installation error message below (missing -lrt)

(base) [kris@rackham3 WFA2-lib]$ make clean all
rm -rf bin build lib 2> /dev/null
make --directory=tools/align_benchmark clean
make[1]: Entering directory `/domus/h1/kris/source/WFA2-lib/tools/align_benchmark'
rm -rf ./build
make[1]: Leaving directory `/domus/h1/kris/source/WFA2-lib/tools/align_benchmark'
make --directory=examples clean
make[1]: Entering directory `/domus/h1/kris/source/WFA2-lib/examples'
rm -rf bin
make[1]: Leaving directory `/domus/h1/kris/source/WFA2-lib/examples'
rm -rf tests/*.alg tests/*.log* 2> /dev/null
make --directory=alignment all
make[1]: Entering directory `/domus/h1/kris/source/WFA2-lib/alignment'
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -c affine_penalties.c -o ../build/affine_penalties.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -c affine2p_penalties.c -o ../build/affine2p_penalties.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -c cigar.c -o ../build/cigar.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -c score_matrix.c -o ../build/score_matrix.o
make[1]: Leaving directory `/domus/h1/kris/source/WFA2-lib/alignment'
make --directory=bindings/cpp all
make[1]: Entering directory `/domus/h1/kris/source/WFA2-lib/bindings/cpp'
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-g++ -Wall -g -O3 -march=native  -I../.. -c WFAligner.cpp -o ../../build/cpp/WFAligner.o
make[1]: Leaving directory `/domus/h1/kris/source/WFA2-lib/bindings/cpp'
make --directory=system all
make[1]: Entering directory `/domus/h1/kris/source/WFA2-lib/system'
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -c mm_allocator.c -o ../build/mm_allocator.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -c mm_stack.c -o ../build/mm_stack.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -c profiler_counter.c -o ../build/profiler_counter.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -c profiler_timer.c -o ../build/profiler_timer.o
make[1]: Leaving directory `/domus/h1/kris/source/WFA2-lib/system'
make --directory=utils all
make[1]: Entering directory `/domus/h1/kris/source/WFA2-lib/utils'
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -c bitmap.c -o ../build/bitmap.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -c commons.c -o ../build/commons.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -c dna_text.c -o ../build/dna_text.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -c heatmap.c -o ../build/heatmap.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -c sequence_buffer.c -o ../build/sequence_buffer.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -c string_padded.c -o ../build/string_padded.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -c vector.c -o ../build/vector.o
make[1]: Leaving directory `/domus/h1/kris/source/WFA2-lib/utils'
make --directory=wavefront all
make[1]: Entering directory `/domus/h1/kris/source/WFA2-lib/wavefront'
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_align.c -o ../build/wavefront_align.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_aligner.c -o ../build/wavefront_aligner.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_attributes.c -o ../build/wavefront_attributes.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_backtrace_buffer.c -o ../build/wavefront_backtrace_buffer.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_backtrace_offload.c -o ../build/wavefront_backtrace_offload.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_backtrace.c -o ../build/wavefront_backtrace.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_bialign.c -o ../build/wavefront_bialign.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_bialigner.c -o ../build/wavefront_bialigner.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_components.c -o ../build/wavefront_components.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_compute_affine.c -o ../build/wavefront_compute_affine.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_compute_affine2p.c -o ../build/wavefront_compute_affine2p.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_compute_edit.c -o ../build/wavefront_compute_edit.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_compute_linear.c -o ../build/wavefront_compute_linear.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_compute.c -o ../build/wavefront_compute.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_debug.c -o ../build/wavefront_debug.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_display.c -o ../build/wavefront_display.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_extend.c -o ../build/wavefront_extend.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_heuristic.c -o ../build/wavefront_heuristic.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_pcigar.c -o ../build/wavefront_pcigar.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_penalties.c -o ../build/wavefront_penalties.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_plot.c -o ../build/wavefront_plot.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_slab.c -o ../build/wavefront_slab.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront_unialign.c -o ../build/wavefront_unialign.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -DWFA_PARALLEL -fopenmp -I.. -c wavefront.c -o ../build/wavefront.o
make[1]: Leaving directory `/domus/h1/kris/source/WFA2-lib/wavefront'
ar -rsc lib/libwfa.a build/*.o 2> /dev/null
ar -rsc lib/libwfacpp.a build/*.o build/cpp/*.o 2> /dev/null
make --directory=tools/generate_dataset all
make[1]: Entering directory `/domus/h1/kris/source/WFA2-lib/tools/generate_dataset'
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  generate_dataset.c -o ../../bin/generate_dataset  -lm
make[1]: Leaving directory `/domus/h1/kris/source/WFA2-lib/tools/generate_dataset'
make --directory=tools/align_benchmark all
make[1]: Entering directory `/domus/h1/kris/source/WFA2-lib/tools/align_benchmark'
make --directory=benchmark all
make[2]: Entering directory `/domus/h1/kris/source/WFA2-lib/tools/align_benchmark/benchmark'
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -I../../.. -c benchmark_check.c -o ../build/benchmark_check.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -I../../.. -c benchmark_edit.c -o ../build/benchmark_edit.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -I../../.. -c benchmark_gap_affine.c -o ../build/benchmark_gap_affine.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -I../../.. -c benchmark_gap_affine2p.c -o ../build/benchmark_gap_affine2p.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -I../../.. -c benchmark_gap_linear.c -o ../build/benchmark_gap_linear.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -I../../.. -c benchmark_indel.c -o ../build/benchmark_indel.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -I../../.. -c benchmark_utils.c -o ../build/benchmark_utils.o
make[2]: Leaving directory `/domus/h1/kris/source/WFA2-lib/tools/align_benchmark/benchmark'
make --directory=edit all
make[2]: Entering directory `/domus/h1/kris/source/WFA2-lib/tools/align_benchmark/edit'
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -I../../.. -c edit_bpm.c -o ../build/edit_bpm.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -I../../.. -c edit_dp.c -o ../build/edit_dp.o
make[2]: Leaving directory `/domus/h1/kris/source/WFA2-lib/tools/align_benchmark/edit'
make --directory=gap_affine all
make[2]: Entering directory `/domus/h1/kris/source/WFA2-lib/tools/align_benchmark/gap_affine'
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -I../../.. -c affine_matrix.c -o ../build/affine_matrix.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -I../../.. -c swg.c -o ../build/swg.o
make[2]: Leaving directory `/domus/h1/kris/source/WFA2-lib/tools/align_benchmark/gap_affine'
make --directory=gap_affine2p all
make[2]: Entering directory `/domus/h1/kris/source/WFA2-lib/tools/align_benchmark/gap_affine2p'
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -I../../.. -c affine2p_dp.c -o ../build/affine2p_dp.o
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -I../../.. -c affine2p_matrix.c -o ../build/affine2p_matrix.o
make[2]: Leaving directory `/domus/h1/kris/source/WFA2-lib/tools/align_benchmark/gap_affine2p'
make --directory=gap_linear all
make[2]: Entering directory `/domus/h1/kris/source/WFA2-lib/tools/align_benchmark/gap_linear'
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -I../../.. -c nw.c -o ../build/nw.o
make[2]: Leaving directory `/domus/h1/kris/source/WFA2-lib/tools/align_benchmark/gap_linear'
make --directory=indel all
make[2]: Entering directory `/domus/h1/kris/source/WFA2-lib/tools/align_benchmark/indel'
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -I.. -I../../.. -c indel_dp.c -o ../build/indel_dp.o
make[2]: Leaving directory `/domus/h1/kris/source/WFA2-lib/tools/align_benchmark/indel'
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -L../../lib -I../.. -I../../.. -I. ./build/*.o align_benchmark_params.c align_benchmark.c -o ../../bin/align_benchmark -lrt  -lwfa -lm -fopenmp
make[1]: Leaving directory `/domus/h1/kris/source/WFA2-lib/tools/align_benchmark'
make --directory=examples all
make[1]: Entering directory `/domus/h1/kris/source/WFA2-lib/examples'
/proj/snic2020-15-201/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wall -g -O3 -march=native  -L../lib -I.. wfa_basic.c -o bin/wfa_basic -lwfa -fopenmp -lm
/crex/proj/snic2020-15-201/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: ../lib/libwfa.a(profiler_timer.o): undefined reference to symbol 'clock_gettime@@GLIBC_2.2.5'
/crex/proj/snic2020-15-201/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /crex/proj/snic2020-15-201/anaconda3/bin/../x86_64-conda_cos6-linux-gnu/sysroot/lib/librt.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: *** [examples_c] Error 1
make[1]: Leaving directory `/domus/h1/kris/source/WFA2-lib/examples'
make: *** [examples] Error 2
smarco commented 1 year ago

Thank you very much for the information. I really appreciate the feedback.

Best,