Closed flcvlr closed 1 month ago
The error message suggests that qgenlib is not found during build.
Could you confirm if your directory structure looks like this?
--- htslib |-- qgenlib |-- spatula
The build order should be htslib first, qgenlib second, and spatula the last.
If you have this directory structure, I believe that the build should work.
Thanks for the prompt response. cmake output suggests that the libraries are in place and cmake finds them nicely:
cmake .. -- /lustre/home/vflc/ST_raw_data/seqscope/htslib -- /lustre/home/vflc/ST_raw_data/seqscope/htslib/libhts.a -- /lustre/home/vflc/ST_raw_data/seqscope/qgenlib -- /lustre/home/vflc/ST_raw_data/seqscope/qgenlib/lib/libqgen.a -- Configuring done (0.1s) -- Generating done (0.2s) -- Build files have been written to: /lustre/home/vflc/ST_raw_data/seqscope/spatula/build
And the directory structure is corresponding:
seqscope |-htslib |- qgenlib |- spatula
What am I missing here?
I don't know. I tested in multiple systems and it all worked fine, so I suspect that there are some difference in your development environment. It seems clear that libqgen.a is not recognized, or it was built incorrectly.
I would check the following command first, to make sure that the library actually have the function needed.
nm -a qgenlib/lib/libqgen.a | grep catprintf
You should see at least two lines of output if the qgenlib was built correctly.
When running cmake, you can explictly specify the absolute directory of QGEN_LIBRARIES and QGEN_INCLUDE_DIRS like
cmake -DQGEN_INCLUDE_DIRS=/qgenlib_absolute_path/include/ -DQGEN_LIBRARIES=/qgenlib_absolute_path/libqgen/libqgen.a ..
Please let me know if both worked for you. Also showing cat CMakeFiles/spatula.dir/link.txt
would show whether the linking script actually include the correct library path.
@flcvlr - I just restructured the repository so that it self-contains submodules. If you follow at the updated instructions and see if it solved your problem, that would be helpful.
This worked perfectly The automation should have corrected some kind of error I was doing, thanks for the help!
PS, in the readme file, "cd build" is missing, I think it should be there.
## build spatula mkdir build cd build cmake .. make
Thank you for the feedback @flcvlr! I've updated the errors in the installation instruction.
I would like to test the NovaScope pipeline, following the detailed instructions reported on your website. Everything seemed to be OK and spatula had fount all the expected libraries (qgenlib, htslib) However, While installing spatula, right at the end of the process, I got the following error:
[100%] Linking CXX executable /lustre/home/vflc/ST_raw_data/seqscope/spatula/bin/spatula CMakeFiles/spatula.dir/cmd_custom_demux_fastq.cpp.o: In function, std::allocator >, std::allocator<std:: cxx11::basic_string<char, std::char_traits, std::allocator > > >&, char const, char const, unsigned int, bool, bool)'
CMakeFiles/spatula.dir/cmd_draw_sge.cpp.o: In function , std::allocator >, std::allocator<std:: cxx11::basic_string<char, std::char_traits, std::allocator > > >&, char const, std::cxx11::basic_string<char, std::char_traits, std::allocator >&, unsigned int, bool, bool)'
cmd_draw_sge.cpp:(.text+0x336a): undefined reference to `split(std::vector<std:: cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > >&, char const , std::cxx11::basic_string<char, std::char_traits, std::allocator >&, unsigned int, bool, bool)'
cmd_draw_sge.cpp:(.text+0x3a11): undefined reference to `split(std::vector<std:: cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >&, char const*, std:: cxx11::basic_string<char, std::char_traits, std::allocator >&, unsigned int, bool, bool)'
cmd_draw_sge.cpp:(.text+0x4af6): undefined reference to , std::allocator >&, char const, ...)'
cmd_merge_matched_tags.cpp:(.text+0x1e8e): undefined reference to `catprintf(std::__cxx11::basic_string<char, std::char_traits, std::allocator >&, char const , ...)'
CMakeFiles/spatula.dir/cmd_dge2sdge.cpp.o: In function , std::allocator >&, char const*, ...)'
cmd_dge2sdge.cpp:(.text+0x34be): undefined reference to `cat_join_int32(std:: cxx11::basic_string<char, std::char_traits, std::allocator >&, std::vector<int, std::allocator >&, char const)'
cmd_dge2sdge.cpp:(.text+0x34f6): undefined reference to `hprint_str(htsFile, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
cmd_dge2sdge.cpp:(.text+0x35d1): undefined reference to cxx11::basic_string<char, std::char_traits, std::allocator >&, std::vector<int, std::allocator >&, char const)'
cmd_dge2sdge.cpp:(.text+0x38e9): undefined reference to `catprintf(std::__cxx11::basic_string<char, std::char_traits, std::allocator >&, char const , ...)'
cmd_dge2sdge.cpp:(.text+0x38fd): undefined reference to , std::allocator >&, char const, ...)'
cmd_dge2sdge.cpp:(.text+0x3cf8): undefined reference to `catprintf(std::__cxx11::basic_string<char, std::char_traits, std::allocator >&, char const , ...)'
cmd_dge2sdge.cpp:(.text+0x3d09): undefined reference to `cat_join_uint64(std:: cxx11::basic_string<char, std::char_traits, std::allocator >&, std::vector<unsigned long, std::allocator >&, char const)'
cmd_dge2sdge.cpp:(.text+0x3d37): undefined reference to `hprint_str(htsFile, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
cmd_dge2sdge.cpp:(.text+0x3d8b): undefined reference to cxx11::basic_string<char, std::char_traits, std::allocator >&, std::vector<unsigned long, std::allocator >&, char const)'
cmd_dge2sdge.cpp:(.text+0x3e52): undefined reference to `catprintf(std::__cxx11::basic_string<char, std::char_traits, std::allocator >&, char const , ...)'
cmd_dge2sdge.cpp:(.text+0x3e62): undefined reference to , std::allocator >&, char const, ...)'
cmd_dge2sdge.cpp:(.text+0x4044): undefined reference to `hprint_str(htsFile, std:: cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
cmd_dge2sdge.cpp:(.text+0x4200): undefined reference to , std::allocator >&, char const, ...)'
cmd_dge2sdge.cpp:(.text+0x45a7): undefined reference to `catprintf(std::__cxx11::basic_string<char, std::char_traits, std::allocator >&, char const , ...)'
cmd_dge2sdge.cpp:(.text+0x4807): undefined reference to `catprintf(std:: cxx11::basic_string<char, std::char_traits, std::allocator >&, char const, ...)'
cmd_dge2sdge.cpp:(.text+0x4bb7): undefined reference to `catprintf(std::__cxx11::basic_string<char, std::char_traits, std::allocator >&, char const , ...)'
CMakeFiles/spatula.dir/cmd_convert_sge.cpp.o: In function , std::allocator >, std::allocator<std:: cxx11::basic_string<char, std::char_traits, std::allocator > > >&, char const, std::cxx11::basic_string<char, std::char_traits, std::allocator >&, unsigned int, bool, bool)'
cmd_convert_sge.cpp:(.text+0x2b7c): undefined reference to `split(std::vector<std:: cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > >&, char const , std::cxx11::basic_string<char, std::char_traits, std::allocator >&, unsigned int, bool, bool)'
CMakeFiles/spatula.dir/sge.cpp.o: In function cxx11::basic_string<char, std::char_traits, std::allocator >&, std::vector<unsigned long, std::allocator >&, char const)'
CMakeFiles/spatula.dir/sge.cpp.o: In function , std::allocator >&, char const , ...)'
CMakeFiles/spatula.dir/sge.cpp.o: In function , std::allocator >&, std::vector<unsigned long, std::allocator >&, char const)'
CMakeFiles/spatula.dir/sge.cpp.o: In function , std::allocator >&, std::vector<unsigned long, std::allocator >&, char const )'
CMakeFiles/spatula.dir/sge2.cpp.o: In function , std::allocator >&, std::vector<unsigned long, std::allocator >&, char const*)'
CMakeFiles/spatula.dir/sge2.cpp.o: In function cxx11::basic_string<char, std::char_traits, std::allocator >&, char const, ...)'
CMakeFiles/spatula.dir/sge2.cpp.o: In function `sge2_stream_writer::write_ftr(char const, char const, unsigned long, std::vector<unsigned long, std::allocator >&)':
sge2.cpp:(.text+0x1137): undefined reference to `cat_join_uint64(std::__cxx11::basic_string<char, std::char_traits, std::allocator >&, std::vector<unsigned long, std::allocator >&, char const )'
CMakeFiles/spatula.dir/sge2.cpp.o: In function , std::allocator >&, std::vector<unsigned long, std::allocator >&, char const*)'
CMakeFiles/spatula.dir/tiles.cpp.o: In function `tile_writer::write_lane(int, std:: cxx11::basic_string<char, std::char_traits, std::allocator > const&)':
tiles.cpp:(.text+0x28c9): undefined reference to , std::allocator >&, char const, ...)'
tiles.cpp:(.text+0x296e): undefined reference to `hprint_str(htsFile, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
CMakeFiles/spatula.dir/tiles.cpp.o: In function `tile_writer::write_tile(int, int, std:: cxx11::basic_string<char, std::char_traits, std::allocator > const&)':
tiles.cpp:(.text+0x35d3): undefined reference to `hprint_str(htsFile*, std:: cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
tiles.cpp:(.text+0x3653): undefined reference to , std::allocator >&, char const, ...)'
CMakeFiles/spatula.dir/tiles.cpp.o: In function , std::allocator >&, char const , ...)'
tiles.cpp:(.text+0x3ab6): undefined reference to cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
tiles.cpp:(.text+0x3be2): undefined reference to , std::allocator >&, std::vector<int, std::allocator >&, char const*)'
tiles.cpp:(.text+0x3d96): undefined reference to `catprintf(std:: cxx11::basic_string<char, std::char_traits, std::allocator >&, char const, ...)'
tiles.cpp:(.text+0x3daf): undefined reference to `cat_join_int32(std::__cxx11::basic_string<char, std::char_traits, std::allocator >&, std::vector<int, std::allocator >&, char const )'
collect2: error: ld returned 1 exit status
make[2]: ** [/lustre/home/vflc/ST_raw_data/seqscope/spatula/bin/spatula] Error 1
make[1]: [CMakeFiles/spatula.dir/all] Error 2
make: *** [all] Error 2
cmdCustomDemuxFASTQ(int, char**)': cmd_custom_demux_fastq.cpp:(.text+0x1653): undefined reference to
split(std::vector<std::cxx11::basic_string<char, std::char_traitscmdDrawSGE(int, char**)': cmd_draw_sge.cpp:(.text+0x2dd0): undefined reference to
split(std::vector<std::cxx11::basic_string<char, std::char_traitssplit(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int, bool, bool)' CMakeFiles/spatula.dir/cmd_merge_matched_tags.cpp.o: In function
cmdMergeMatchedTags(int, char)': cmd_merge_matched_tags.cpp:(.text+0x19d0): undefined reference tocatprintf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char const*, ...)' cmd_merge_matched_tags.cpp:(.text+0x1c2f): undefined reference to
catprintf(std::cxx11::basic_string<char, std::char_traitscmdDGE2SDGE(int, char**)': cmd_dge2sdge.cpp:(.text+0x34aa): undefined reference to
catprintf(std::__cxx11::basic_string<char, std::char_traitscatprintf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char const*, ...)' cmd_dge2sdge.cpp:(.text+0x35e5): undefined reference to
cat_join_int32(std::cat_join_int32(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::vector<int, std::allocator<int> >&, char const*)' cmd_dge2sdge.cpp:(.text+0x3ce2): undefined reference to
catprintf(std::cxx11::basic_string<char, std::char_traitscatprintf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char const*, ...)' cmd_dge2sdge.cpp:(.text+0x3d9b): undefined reference to
cat_join_uint64(std::cat_join_uint64(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::vector<unsigned long, std::allocator<unsigned long> >&, char const*)' cmd_dge2sdge.cpp:(.text+0x4035): undefined reference to
catprintf(std::cxx11::basic_string<char, std::char_traitscatprintf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char const*, ...)' cmd_dge2sdge.cpp:(.text+0x44f7): undefined reference to
catprintf(std::cxx11::basic_string<char, std::char_traitscmdConvertSGE(int, char**)': cmd_convert_sge.cpp:(.text+0x2b4e): undefined reference to
split(std::vector<std::cxx11::basic_string<char, std::char_traitssge_stream_writer::flush_cur_sbcd()': sge.cpp:(.text+0x283): undefined reference to
cat_join_uint64(std::sge_stream_writer::flush_mtx()': sge.cpp:(.text+0x3ec): undefined reference to
catprintf(std::__cxx11::basic_string<char, std::char_traitssge_stream_writer::write_ftr(char const*, char const*, unsigned long, std::vector<unsigned long, std::allocator<unsigned long> >&)': sge.cpp:(.text+0x11c7): undefined reference to
cat_join_uint64(std::cxx11::basic_string<char, std::char_traitssge_stream_writer::add_mtx(unsigned long, std::vector<unsigned long, std::allocator<unsigned long> >&)': sge.cpp:(.text+0x13bf): undefined reference to
cat_join_uint64(std::__cxx11::basic_string<char, std::char_traitssge2_stream_writer::flush_cur_sbcd()': sge2.cpp:(.text+0x57f): undefined reference to
cat_join_uint64(std::__cxx11::basic_string<char, std::char_traitssge2_stream_writer::flush_mtx()': sge2.cpp:(.text+0x79c): undefined reference to
catprintf(std::sge2_stream_writer::add_mtx(unsigned long, std::vector<unsigned long, std::allocator<unsigned long> >&)': sge2.cpp:(.text+0x161f): undefined reference to
cat_join_uint64(std::cxx11::basic_string<char, std::char_traitscatprintf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char const*, ...)' tiles.cpp:(.text+0x28ee): undefined reference to
catprintf(std::cxx11::basic_string<char, std::char_traitscatprintf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char const*, ...)' tiles.cpp:(.text+0x3678): undefined reference to
catprintf(std::cxx11::basic_string<char, std::char_traitswrite_sbcd(sbcd_sync_reader&, unsigned long, std::vector<int, std::allocator<int> >&, tile_writer&, tile_counter&, int)': tiles.cpp:(.text+0x3a9d): undefined reference to
catprintf(std::__cxx11::basic_string<char, std::char_traitscat_join_int32(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::vector<int, std::allocator<int> >&, char const*)' tiles.cpp:(.text+0x3af4): undefined reference to
hprint_str(htsFile*, std::catprintf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char const*, ...)' tiles.cpp:(.text+0x3bfb): undefined reference to
cat_join_int32(std::cxx11::basic_string<char, std::char_traitsAny help will be greatly appreciated