CoREse / lrsim

lrsim: ultrafast and authentic long-read simulator
0 stars 1 forks source link

make error #1

Closed rl4940 closed 4 months ago

rl4940 commented 5 months ago

Hi team! Thank you for developing this ONT reads simulator tool I do encounter an error when compiling:

ln -sf libhts.so libhts.so.3
make[1]: 离开目录“/data/renqgli/softwares/packs/lrsim/htslib”
g++  --std=c++17 -O3 -fopenmp  -c -o lrsim.o lrsim.cpp
lrsim.cpp: 在函数‘void sim(std::vector<const char*>&, double, double, std::string, std::string, std::string, int, int)’中:
lrsim.cpp:321:132: 警告:narrowing conversion of ‘DSize’ from ‘unsigned int’ to ‘int’ [-Wnarrowing]
  321 |             RunSimArgs *A=new RunSimArgs{&Ref, &RefNames, TotalLength, &RefAccL, ErrorRate, EachBases, &RegionErrorFloat, Seed, i, DSize, DistLengths, DistFormers};
      |                                                                                                                                    ^~~~~
lrsim.cpp: 在函数‘int getRefInd(const std::vector<long long unsigned int>&, long long unsigned int&)’中:
lrsim.cpp:111:1: 警告:在有返回值的函数中,控制流程到达函数尾 [-Wreturn-type]
  111 | }
      | ^
g++ lrsim.o -o lrsim -fopenmp htslib/libhts.a -lz -lm -lbz2 -llzma -lcurl -lpthread -lcrypto -ldeflate optutils/opthelper.a --std=c++17
/usr/bin/ld: 找不到 -ldeflate
collect2: 错误:ld 返回 1
make: *** [lrsim] 错误 1

I applogize for my CentOS which was installed in Chinese language, kinda weired. I ll try my best to translate those Chinese characters inside from top to bottom:

离开目录: exit the dir
警告:warning
警告:在有返回值的函数中,控制流程到达函数尾:  Warning: control reaches end of non-void function
找不到: can not find
错误: error
返回: return 

Thanks R. L.

rl4940 commented 5 months ago

Below is the superlong compiling log:

[renqgli02@Linux02 lrsim]$ make 
make -C optutils
make[1]: 进入目录“/data/renqgli/softwares/packs/lrsim/optutils”
g++  -Wall -O3 -std=c++11 -fPIE  -c -o OptHelper.o OptHelper.cpp
OptHelper.cpp: 在函数‘option* get_long_opts(const std::vector<OptEntry>&)’中:
OptHelper.cpp:75:14: 警告:unused variable ‘count’ [-Wunused-variable]
   75 |     unsigned count = 0;
      |              ^~~~~
OptHelper.cpp: 在成员函数‘int OptHelper::getOpts(int, const char**)’中:
OptHelper.cpp:108:19: 警告:comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<OptEntry>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  108 |     for (int i=0;i<Opts.size();++i)
      |                  ~^~~~~~~~~~~~
OptHelper.cpp:111:32: 警告:数组下标类型为‘char’ [-Wchar-subscripts]
  111 |             ShortIndex[Opts[i].ShortOpt]=i;
OptHelper.cpp: 在成员函数‘void OptHelper::showhelp(FILE*)’中:
OptHelper.cpp:348:9: 警告:this ‘if’ clause does not guard... [-Wmisleading-indentation]
  348 |         if (Opts[i].HelpDescription != NULL)
      |         ^~
OptHelper.cpp:350:13: 附注:...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  350 |             if (Opts[i].DefaultValue!="") fprintf(file, " (%s).",Opts[i].DefaultValue.c_str());
      |             ^~
OptHelper.cpp: 在成员函数‘void OptHelper::initData()’中:
OptHelper.cpp:382:19: 警告:comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<OptEntry>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  382 |     for (int i=0;i<Opts.size();++i)
      |                  ~^~~~~~~~~~~~
ar -rc opthelper.a OptHelper.o
make[1]: 离开目录“/data/renqgli/softwares/packs/lrsim/optutils”
cd htslib && autoreconf -i && ./configure
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... /usr/bin/grep
checking for C compiler warning flags... -Wall
checking how to run the C preprocessor... gcc -E
checking for egrep... /usr/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 whether _XOPEN_SOURCE is declared... no
checking C compiler flags needed for sse4.1... -msse4.1 -mssse3 -mpopcnt
checking C compiler flags needed for avx2... -mavx2 -mpopcnt
checking C compiler flags needed for avx512f... -mavx512f -mpopcnt
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 linker supports versioned symbols... yes
checking whether the compiler accepts -fvisibility=hidden... 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 for bzlib.h... yes
checking for BZ2_bzBuffToBuffCompress in -lbz2... yes
checking for lzma.h... yes
checking for lzma_easy_buffer_encode in -llzma... yes
checking whether htscodecs files are present... yes
checking for libdeflate.h... no
checking for libdeflate_deflate_compress in -ldeflate... no
checking for curl/curl.h... yes
checking for curl_easy_pause in -lcurl... yes
checking for CCHmac... no
checking for library containing HMAC... -lcrypto
checking for library containing regcomp... none required
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
make -C htslib -j 
make[1]: 进入目录“/data/renqgli/softwares/packs/lrsim/htslib”
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o kfunc.o kfunc.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o kstring.o kstring.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o bcf_sr_sort.o bcf_sr_sort.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o bgzf.o bgzf.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o errmod.o errmod.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o faidx.o faidx.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o header.o header.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o hfile.o hfile.c
echo '#define HTS_VERSION_TEXT "1.20"' > version.h
printf '#define HTS_CC "%s"\n#define HTS_CPPFLAGS "%s"\n#define HTS_CFLAGS "%s"\n#define HTS_LDFLAGS "%s"\n#define HTS_LIBS "%s"\n' \
'gcc' \
'' \
'-Wall -g -O2 -fvisibility=hidden' \
'-fvisibility=hidden ' \
'-llzma -lbz2 -lz -lm   -lcurl -lcrypto' > config_vars.h
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o hts_expr.o hts_expr.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o hts_os.o hts_os.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o md5.o md5.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o multipart.o multipart.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o probaln.o probaln.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o realn.o realn.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o regidx.o regidx.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o region.o region.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o sam.o sam.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o sam_mods.o sam_mods.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o synced_bcf_reader.o synced_bcf_reader.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o vcf_sweep.o vcf_sweep.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o tbx.o tbx.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o textutils.o textutils.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o thread_pool.o thread_pool.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o vcf.o vcf.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o vcfutils.o vcfutils.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o cram/cram_codecs.o cram/cram_codecs.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o cram/cram_decode.o cram/cram_decode.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o cram/cram_encode.o cram/cram_encode.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o cram/cram_external.o cram/cram_external.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o cram/cram_index.o cram/cram_index.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o cram/cram_io.o cram/cram_io.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o cram/cram_stats.o cram/cram_stats.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o cram/mFILE.o cram/mFILE.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o cram/open_trace_file.o cram/open_trace_file.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o cram/pooled_alloc.o cram/pooled_alloc.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o cram/string_alloc.o cram/string_alloc.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o htscodecs/htscodecs/arith_dynamic.o htscodecs/htscodecs/arith_dynamic.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o htscodecs/htscodecs/fqzcomp_qual.o htscodecs/htscodecs/fqzcomp_qual.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o htscodecs/htscodecs/htscodecs.o htscodecs/htscodecs/htscodecs.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o htscodecs/htscodecs/pack.o htscodecs/htscodecs/pack.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o htscodecs/htscodecs/rANS_static4x16pr.o htscodecs/htscodecs/rANS_static4x16pr.c
gcc -Wall -g -O2 -fvisibility=hidden -mavx2 -mpopcnt -I.  -c -o htscodecs/htscodecs/rANS_static32x16pr_avx2.o htscodecs/htscodecs/rANS_static32x16pr_avx2.c
gcc -Wall -g -O2 -fvisibility=hidden -mavx512f -mpopcnt -I.  -c -o htscodecs/htscodecs/rANS_static32x16pr_avx512.o htscodecs/htscodecs/rANS_static32x16pr_avx512.c
gcc -Wall -g -O2 -fvisibility=hidden -msse4.1 -mssse3 -mpopcnt -I.  -c -o htscodecs/htscodecs/rANS_static32x16pr_sse4.o htscodecs/htscodecs/rANS_static32x16pr_sse4.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o htscodecs/htscodecs/rANS_static32x16pr_neon.o htscodecs/htscodecs/rANS_static32x16pr_neon.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o htscodecs/htscodecs/rANS_static32x16pr.o htscodecs/htscodecs/rANS_static32x16pr.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o htscodecs/htscodecs/rANS_static.o htscodecs/htscodecs/rANS_static.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o htscodecs/htscodecs/rle.o htscodecs/htscodecs/rle.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o htscodecs/htscodecs/tokenise_name3.o htscodecs/htscodecs/tokenise_name3.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o htscodecs/htscodecs/utils.o htscodecs/htscodecs/utils.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o hfile_libcurl.o hfile_libcurl.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o hfile_gcs.o hfile_gcs.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o hfile_s3.o hfile_s3.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o hfile_s3_write.o hfile_s3_write.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o kfunc.pico kfunc.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o kstring.pico kstring.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o bcf_sr_sort.pico bcf_sr_sort.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o bgzf.pico bgzf.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o errmod.pico errmod.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o faidx.pico faidx.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o header.pico header.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o hfile.pico hfile.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o hts.pico hts.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o hts_expr.pico hts_expr.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o hts_os.pico hts_os.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o md5.pico md5.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o multipart.pico multipart.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o probaln.pico probaln.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o realn.pico realn.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o regidx.pico regidx.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o region.pico region.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o sam.pico sam.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o sam_mods.pico sam_mods.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o synced_bcf_reader.pico synced_bcf_reader.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o vcf_sweep.pico vcf_sweep.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o tbx.pico tbx.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o textutils.pico textutils.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o thread_pool.pico thread_pool.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o vcf.pico vcf.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o vcfutils.pico vcfutils.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o cram/cram_codecs.pico cram/cram_codecs.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o cram/cram_decode.pico cram/cram_decode.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o cram/cram_encode.pico cram/cram_encode.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o cram/cram_external.pico cram/cram_external.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o cram/cram_index.pico cram/cram_index.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o cram/cram_io.pico cram/cram_io.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o cram/cram_stats.pico cram/cram_stats.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o cram/mFILE.pico cram/mFILE.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o cram/open_trace_file.pico cram/open_trace_file.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o cram/pooled_alloc.pico cram/pooled_alloc.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o cram/string_alloc.pico cram/string_alloc.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o htscodecs/htscodecs/arith_dynamic.pico htscodecs/htscodecs/arith_dynamic.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o htscodecs/htscodecs/fqzcomp_qual.pico htscodecs/htscodecs/fqzcomp_qual.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o htscodecs/htscodecs/htscodecs.pico htscodecs/htscodecs/htscodecs.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o htscodecs/htscodecs/pack.pico htscodecs/htscodecs/pack.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o htscodecs/htscodecs/rANS_static4x16pr.pico htscodecs/htscodecs/rANS_static4x16pr.c
gcc -Wall -g -O2 -fvisibility=hidden -mavx2 -mpopcnt -I.  -fpic -c -o htscodecs/htscodecs/rANS_static32x16pr_avx2.pico htscodecs/htscodecs/rANS_static32x16pr_avx2.c
gcc -Wall -g -O2 -fvisibility=hidden -mavx512f -mpopcnt -I.  -fpic -c -o htscodecs/htscodecs/rANS_static32x16pr_avx512.pico htscodecs/htscodecs/rANS_static32x16pr_avx512.c
gcc -Wall -g -O2 -fvisibility=hidden -msse4.1 -mssse3 -mpopcnt -I.  -fpic -c -o htscodecs/htscodecs/rANS_static32x16pr_sse4.pico htscodecs/htscodecs/rANS_static32x16pr_sse4.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o htscodecs/htscodecs/rANS_static32x16pr_neon.pico htscodecs/htscodecs/rANS_static32x16pr_neon.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o htscodecs/htscodecs/rANS_static32x16pr.pico htscodecs/htscodecs/rANS_static32x16pr.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o htscodecs/htscodecs/rANS_static.pico htscodecs/htscodecs/rANS_static.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o htscodecs/htscodecs/rle.pico htscodecs/htscodecs/rle.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o htscodecs/htscodecs/tokenise_name3.pico htscodecs/htscodecs/tokenise_name3.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o htscodecs/htscodecs/utils.pico htscodecs/htscodecs/utils.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o hfile_libcurl.pico hfile_libcurl.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o hfile_gcs.pico hfile_gcs.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o hfile_s3.pico hfile_s3.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -fpic -c -o hfile_s3_write.pico hfile_s3_write.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o annot-tsv.o annot-tsv.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o bgzip.o bgzip.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o htsfile.o htsfile.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o tabix.o tabix.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/hts_endian.o test/hts_endian.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/fieldarith.o test/fieldarith.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/hfile.o test/hfile.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/pileup.o test/pileup.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/pileup_mod.o test/pileup_mod.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/plugins-dlhts.o test/plugins-dlhts.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/sam.o test/sam.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/test_bgzf.o test/test_bgzf.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/test_expr.o test/test_expr.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/test_faidx.o test/test_faidx.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/test_kfunc.o test/test_kfunc.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/test_kstring.o test/test_kstring.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/test_mod.o test/test_mod.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/test_realn.o test/test_realn.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/test-regidx.o test/test-regidx.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/test_str2int.o test/test_str2int.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/test_time_funcs.o test/test_time_funcs.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/test_view.o test/test_view.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/test_index.o test/test_index.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/test-vcf-api.o test/test-vcf-api.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/test-vcf-sweep.o test/test-vcf-sweep.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/test-bcf-sr.o test/test-bcf-sr.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/fuzz/hts_open_fuzzer.o test/fuzz/hts_open_fuzzer.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/test-bcf-translate.o test/test-bcf-translate.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/test-parse-reg.o test/test-parse-reg.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/test_introspection.o test/test_introspection.c
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o test/test-bcf_set_variant_type.o test/test-bcf_set_variant_type.c
sed -n '/^static_libs=/s/[^=]*=/HTSLIB_static_LIBS = /p;/^static_ldflags=/s/[^=]*=/HTSLIB_static_LDFLAGS = /p' htslib.pc.tmp > htslib_static.mk
sed -e 's#@-includedir@#'`pwd`'#g;s#@-libdir@#'`pwd`'#g' htslib.pc.tmp > htslib-uninstalled.pc
gcc -Wall -g -O2 -fvisibility=hidden  -I.  -c -o hts.o hts.c
gcc -fvisibility=hidden  -o test/plugins-dlhts test/plugins-dlhts.o -llzma -lbz2 -lz -lm   -lcurl -lcrypto
gcc -fvisibility=hidden  -o test/test_time_funcs test/test_time_funcs.o
gcc -fvisibility=hidden  -o test/hts_endian test/hts_endian.o -llzma -lbz2 -lz -lm   -lcurl -lcrypto
gcc -shared -Wl,-soname,libhts.so.3 -Wl,-version-script,htslib.map -fvisibility=hidden  -o libhts.so kfunc.pico kstring.pico bcf_sr_sort.pico bgzf.pico errmod.pico faidx.pico header.pico hfile.pico hts.pico hts_expr.pico hts_os.pico md5.pico multipart.pico probaln.pico realn.pico regidx.pico region.pico sam.pico sam_mods.pico synced_bcf_reader.pico vcf_sweep.pico tbx.pico textutils.pico thread_pool.pico vcf.pico vcfutils.pico cram/cram_codecs.pico cram/cram_decode.pico cram/cram_encode.pico cram/cram_external.pico cram/cram_index.pico cram/cram_io.pico cram/cram_stats.pico cram/mFILE.pico cram/open_trace_file.pico cram/pooled_alloc.pico cram/string_alloc.pico htscodecs/htscodecs/arith_dynamic.pico htscodecs/htscodecs/fqzcomp_qual.pico htscodecs/htscodecs/htscodecs.pico htscodecs/htscodecs/pack.pico htscodecs/htscodecs/rANS_static4x16pr.pico htscodecs/htscodecs/rANS_static32x16pr_avx2.pico htscodecs/htscodecs/rANS_static32x16pr_avx512.pico htscodecs/htscodecs/rANS_static32x16pr_sse4.pico htscodecs/htscodecs/rANS_static32x16pr_neon.pico htscodecs/htscodecs/rANS_static32x16pr.pico htscodecs/htscodecs/rANS_static.pico htscodecs/htscodecs/rle.pico htscodecs/htscodecs/tokenise_name3.pico htscodecs/htscodecs/utils.pico hfile_libcurl.pico hfile_gcs.pico hfile_s3.pico hfile_s3_write.pico -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
ar -rc libhts.a kfunc.o kstring.o bcf_sr_sort.o bgzf.o errmod.o faidx.o header.o hfile.o hts.o hts_expr.o hts_os.o md5.o multipart.o probaln.o realn.o regidx.o region.o sam.o sam_mods.o synced_bcf_reader.o vcf_sweep.o tbx.o textutils.o thread_pool.o vcf.o vcfutils.o cram/cram_codecs.o cram/cram_decode.o cram/cram_encode.o cram/cram_external.o cram/cram_index.o cram/cram_io.o cram/cram_stats.o cram/mFILE.o cram/open_trace_file.o cram/pooled_alloc.o cram/string_alloc.o htscodecs/htscodecs/arith_dynamic.o htscodecs/htscodecs/fqzcomp_qual.o htscodecs/htscodecs/htscodecs.o htscodecs/htscodecs/pack.o htscodecs/htscodecs/rANS_static4x16pr.o htscodecs/htscodecs/rANS_static32x16pr_avx2.o htscodecs/htscodecs/rANS_static32x16pr_avx512.o htscodecs/htscodecs/rANS_static32x16pr_sse4.o htscodecs/htscodecs/rANS_static32x16pr_neon.o htscodecs/htscodecs/rANS_static32x16pr.o htscodecs/htscodecs/rANS_static.o htscodecs/htscodecs/rle.o htscodecs/htscodecs/tokenise_name3.o htscodecs/htscodecs/utils.o   hfile_libcurl.o hfile_gcs.o hfile_s3.o hfile_s3_write.o
ranlib libhts.a
gcc -fvisibility=hidden  -o annot-tsv annot-tsv.o libhts.a -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o bgzip bgzip.o libhts.a -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o htsfile htsfile.o libhts.a -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o tabix tabix.o libhts.a -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/fieldarith test/fieldarith.o libhts.a -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/hfile test/hfile.o libhts.a -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/pileup test/pileup.o libhts.a -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/pileup_mod test/pileup_mod.o libhts.a -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/sam test/sam.o libhts.a -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/test_bgzf test/test_bgzf.o libhts.a -lz -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/test_expr test/test_expr.o libhts.a -lz -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/test_faidx test/test_faidx.o libhts.a -lz -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/test_kfunc test/test_kfunc.o libhts.a -lz -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/test_kstring test/test_kstring.o libhts.a -lz -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/test_mod test/test_mod.o libhts.a -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/test_realn test/test_realn.o libhts.a -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/test-regidx test/test-regidx.o libhts.a -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/test_str2int test/test_str2int.o libhts.a -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/test_view test/test_view.o libhts.a -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/test_index test/test_index.o libhts.a -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/test-vcf-api test/test-vcf-api.o libhts.a -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/test-vcf-sweep test/test-vcf-sweep.o libhts.a -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/test-bcf-sr test/test-bcf-sr.o libhts.a -lz -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/test-bcf-translate test/test-bcf-translate.o libhts.a -lz -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/test-parse-reg test/test-parse-reg.o libhts.a -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/test_introspection test/test_introspection.o libhts.a -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
gcc -fvisibility=hidden  -o test/test-bcf_set_variant_type test/test-bcf_set_variant_type.o libhts.a -llzma -lbz2 -lz -lm   -lcurl -lcrypto -lpthread
ln -sf libhts.so libhts.so.3
make[1]: 离开目录“/data/renqgli/softwares/packs/lrsim/htslib”
g++  --std=c++17 -O3 -fopenmp  -c -o lrsim.o lrsim.cpp
lrsim.cpp: 在函数‘void sim(std::vector<const char*>&, double, double, std::string, std::string, std::string, int, int)’中:
lrsim.cpp:321:132: 警告:narrowing conversion of ‘DSize’ from ‘unsigned int’ to ‘int’ [-Wnarrowing]
  321 |             RunSimArgs *A=new RunSimArgs{&Ref, &RefNames, TotalLength, &RefAccL, ErrorRate, EachBases, &RegionErrorFloat, Seed, i, DSize, DistLengths, DistFormers};
      |                                                                                                                                    ^~~~~
lrsim.cpp: 在函数‘int getRefInd(const std::vector<long long unsigned int>&, long long unsigned int&)’中:
lrsim.cpp:111:1: 警告:在有返回值的函数中,控制流程到达函数尾 [-Wreturn-type]
  111 | }
      | ^
g++ lrsim.o -o lrsim -fopenmp htslib/libhts.a -lz -lm -lbz2 -llzma -lcurl -lpthread -lcrypto -ldeflate optutils/opthelper.a --std=c++17
/usr/bin/ld: 找不到 -ldeflate
collect2: 错误:ld 返回 1
make: *** [lrsim] 错误 1
rl4940 commented 5 months ago

Btw, I downloaded the zipped source code, then

unzip lrsim-master
mv lrsim-master lrsim

The htslib dir is empty, so I went to the htslib.org and downloaded the htslib-1.20.tar.bz2

tar -xvjf htslib-1.20.tar.bz2

Then rename it into "htslib" and cp it into (lrsim dir) And make it, the error shows above.

CoREse commented 5 months ago

Hi R. L., thanks for using my tool, it seems like a dependency problem. Please first clone the repository and then follow the make instruction to use git submodules to get the htslib. And if the problem persists, contact me again.

git clone https://github.com/CoREse/lrsim
cd lrsim
git submodule update --init --recursive
make
CoREse commented 5 months ago

I checked your htslib make information, you need to install libdeflate into your environment. If you have the root privilege, you can install it system wide. If you don't, you can either install it by making from source and install to your specific location, or install it from conda:

conda install libdeflate -c conda-forge

Feel free to contact me if you have any further questions.

rl4940 commented 4 months ago

@CoREse Hi CoREse! Thank you so much for your immediate help. My advisor has the root privilege and we have successfully installed the libdeflate through our CentOS7. Now the lrsim is up and running smoothly!

Thank you so much! R. L.

PS: just a minor question, if I use the conda installation, which means I'll have to conda create an env to download libdeflate. In such a case, where does this libdeflate go? And should I activate the conda env every time I am using lrsim?
Sorry for the dumb question, just curious about the conda compatibility with C make/compilation.

CoREse commented 4 months ago

@CoREse Hi CoREse! Thank you so much for your immediate help. My advisor has the root privilege and we have successfully installed the libdeflate through our CentOS7. Now the lrsim is up and running smoothly!

Thank you so much! R. L.

PS: just a minor question, if I use the conda installation, which means I'll have to conda create an env to download libdeflate. In such a case, where does this libdeflate go? And should I activate the conda env every time I am using lrsim? Sorry for the dumb question, just curious about the conda compatibility with C make/compilation.

Hi R. L.:

My pleasure.

-In such a case, where does this libdeflate go? If you use conda, the libdeflate will be installed into your conda environment directory, normally under the "lib" subdirectory in that environment directory.

-And should I activate the conda env every time I am using lrsim? First of all, the libdeflate is installed as a dynamic (link) library (compared to a static library), you can search for the differences between them. Thus, the binary of the library resides in your system rather than integrated into lrsim, every time you run lrsim, the system finds that binary and search for functions needed. But normally you don't need to activate that environment every time you run lrsim, since the linker would write the path of the library into the executable. For the situations that the system can't find the library in that location, it will search locations in $LD_LIBRARY_PATH for dynamic libraries. If that happens, you can put the location that contains libdeflate binary (something like libdeflate.so*) into $LD_LIBRARY_PATH environment variable to ensure the system finds the library.

BTW, I am curious, how did you know about lrsim? Thanks.

CRE