lemene / PECAT

PECAT, a phased error correct and assembly tool
BSD 2-Clause "Simplified" License
39 stars 1 forks source link

Installation error #2

Open kishwarshafin opened 2 years ago

kishwarshafin commented 2 years ago

Hello,

Installation of PECAT from github is throwing this error:

g++ -std=c++11 -Wall -O3 -D_FILE_OFFSET_BITS=64 -I.  -I ../thirdparty/edlib/edlib/include -I ../thirdparty/ksw2 -c -MMD -MP -MF "../build/obj/./prog/fsa_kmer_bin.d" -MT "../build/obj/./prog/fsa_kmer_bin.o" -o "../build/obj/./prog/fsa_kmer_bin.o" "prog/fsa_kmer_bin.cpp"
g++ -std=c++11 -Wall -O3 -D_FILE_OFFSET_BITS=64 -I.  -I ../thirdparty/edlib/edlib/include -I ../thirdparty/ksw2 -c -MMD -MP -MF "../build/obj/./kmer/kmer_bin.d" -MT "../build/obj/./kmer/kmer_bin.o" -o "../build/obj/./kmer/kmer_bin.o" "kmer/kmer_bin.cpp"
ar -r ../build/bin/libfsa.a ../build/obj/./utils/argument_parser.o ../build/obj/./utils/logger.o ../build/obj/overlap.o ../build/obj/read_store.o ../build/obj/sequence.o ../build/obj/utility.o ../build/obj/file_io.o ../build/obj/seq_io.o ../build/obj/overlap_store.o ../build/obj/graph.o ../build/obj/assemble/overlap_assemble.o ../build/obj/simple_align.o ../build/obj/assemble/string_graph.o ../build/obj/assemble/read_variants.o ../build/obj/assemble/string_node.o ../build/obj/assemble/string_edge.o ../build/obj/assemble/asm_dataset.o ../build/obj/assemble/asm_options.o ../build/obj/assemble/stat_readinfo.o ../build/obj/../thirdparty/edlib/edlib/src/edlib.o ../build/obj/correct/aligner.o ../build/obj/./correct/dw.o ../build/obj/./correct/diff.o ../build/obj/./correct/align/edlib_aligner.o ../build/obj/./correct/align/ksw2_aligner.o ../build/obj/./utils/string_pool.o ../build/obj/./utils/pair_file.o ../build/obj/./utils/misc.o ../build/obj/./phase/phase_info.o ../build/obj/./phase/contig_phaser.o ../build/obj/assemble/simplify/simplifier.o ../build/obj/./assemble/simplify/spur.o ../build/obj/./assemble/simplify/bridge.o ../build/obj/./assemble/simplify/transitive.o ../build/obj/./assemble/simplify/cross.o ../build/obj/./assemble/simplify/low_quality.o ../build/obj/./assemble/simplify/unreliable.o ../build/obj/./assemble/simplify/loop.o ../build/obj/./assemble/simplify/bubble.o ../build/obj/./assemble/simplify/best.o ../build/obj/./assemble/simplify/semi_bubble.o ../build/obj/./assemble/simplify/repeat.o ../build/obj/./assemble/simplify/phase.o ../build/obj/./assemble/simplify/pbridge.o ../build/obj/./assemble/simplify/pspur.o ../build/obj/./correct/align/alignment.o ../build/obj/./correct/align/alignment_cache.o ../build/obj/./correct/align/diff_aligner.o ../build/obj/./correct/align/tool_aligner.o
ar: creating ../build/bin/libfsa.a
g++ ../build/obj/./prog/fsa_ol_assemble.o ../build/bin/libfsa.a -o ../build/bin/fsa_ol_assemble -pthread -lz ../build/bin/libksw2.a $
g++: error: $: No such file or directory
make[1]: *** [makefile:109: ../build/bin/fsa_ol_assemble] Error 1
make[1]: *** Waiting for unfinished jobs....
kmer/kmer_bin.cpp: In lambda function:
kmer/kmer_bin.cpp:63:35: warning: unused variable ‘rate’ [-Wunused-variable]
   63 |             std::array<double, 2> rate { count[0]*1.0/ patkmers.Size(), count[1]*1.0/ matkmers.Size()};
      |                                   ^~~~
kmer/kmer_bin.cpp:56:22: warning: unused variable ‘block_size’ [-Wunused-variable]
   56 |         const size_t block_size = 10000;
      |                      ^~~~~~~~~~
kmer/kmer_bin.cpp: In member function ‘size_t fsa::KmerBin::CountLines(const string&)’:
kmer/kmer_bin.cpp:235:1: warning: no return statement in function returning non-void [-Wreturn-type]
  235 | }
      | ^
make[1]: Leaving directory '/home/shafin/software/PECAT/src'
make: *** [makefile:15: src] Error 2

I believe libksw2 is not being compiled. Any solution to this?

lemene commented 2 years ago

Hi, kishwarshafin

You're right. libksw2 is not compiled. It was an installation error in the version (6091393). It was fixed in the later version. The following commands are used to compile kws2. It can fix the error.

cd thirdparty/ksw2/ && make && ar -r libksw2.a *.o && cd -
cp thirdparty/ksw2/libksw2.a build/bin
make
oushujun commented 1 year ago

Line 75 of src/makefile shows an extra $: LDFLAGS = -pthread -lz $(BUILD_BIN_DIR)/libksw2.a $

This led to the following error:

g++ ../build/obj/./prog/fsa_ol_assemble.o ../build/bin/libfsa.a -o ../build/bin/fsa_ol_assemble -pthread -lz ../build/bin/libksw2.a $ g++: error: $: No such file or directory make: *** [makefile:109: ../build/bin/fsa_ol_assemble] Error 1

Removing the extra $ solve the error. Is this correct?

Thanks, Shujun

lemene commented 1 year ago

@oushujun You are right. It causes the installation error.