Open elpequeno opened 11 months ago
Hi André,
I didn't see this error before. Are you using GCC 11 (or -std=c++17) or higher? This is very likely because of the header dependency changes in GCC 11.
Header dependency changes
Some C++ Standard Library headers have been changed to no longer include other headers that were being used internally by the library. As such, C++ programs that used standard library components without including the right headers will no longer compile.
The following headers are used less widely in libstdc++ and may need to be included explicitly when compiled with GCC 11:
<limits> (for std::numeric_limits)
<memory> (for std::unique_ptr, std::shared_ptr etc.)
<utility> (for std::pair, std::tuple_size, std::index_sequence etc.)
<thread> (for members of namespace std::this_thread.)
https://www.gnu.org/software/gcc/gcc-11/porting_to.html At the time the program was implemented, GCC 11 hasn't been released yet.
A quick fix to this problem is to explicitly add "#include \<limits>" to the corresponding files, e.g., MinCollector.cpp. Hope this can solve the problem.
Hi Christina,
thank you, that helped me get pass that error.
I was trying to make and run it onside a fresh Ubuntu docker. After installing all the needed libraries, I get the following error:
[100%] Linking CXX executable psirc-quant
/usr/bin/ld: ../../src/../ext/htslib/libhts.a(cram_io.o): in function `cram_compress_by_method':
/psirc/psirc-quant/ext/htslib/cram/cram_io.c:1030: undefined reference to `BZ2_bzBuffToBuffCompress'
/usr/bin/ld: ../../src/../ext/htslib/libhts.a(cram_io.o): in function `lzma_mem_deflate':
/psirc/psirc-quant/ext/htslib/cram/cram_io.c:669: undefined reference to `lzma_stream_buffer_bound'
/usr/bin/ld: /psirc/psirc-quant/ext/htslib/cram/cram_io.c:675: undefined reference to `lzma_easy_buffer_encode'
/usr/bin/ld: ../../src/../ext/htslib/libhts.a(cram_io.o): in function `lzma_mem_inflate':
/psirc/psirc-quant/ext/htslib/cram/cram_io.c:691: undefined reference to `lzma_easy_decoder_memusage'
/usr/bin/ld: /psirc/psirc-quant/ext/htslib/cram/cram_io.c:691: undefined reference to `lzma_stream_decoder'
/usr/bin/ld: /psirc/psirc-quant/ext/htslib/cram/cram_io.c:706: undefined reference to `lzma_code'
/usr/bin/ld: ../../src/../ext/htslib/libhts.a(cram_io.o): in function `cram_uncompress_block':
/psirc/psirc-quant/ext/htslib/cram/cram_io.c:954: undefined reference to `BZ2_bzBuffToBuffDecompress'
/usr/bin/ld: ../../src/../ext/htslib/libhts.a(cram_io.o): in function `lzma_mem_inflate':
/psirc/psirc-quant/ext/htslib/cram/cram_io.c:719: undefined reference to `lzma_code'
/usr/bin/ld: /psirc/psirc-quant/ext/htslib/cram/cram_io.c:728: undefined reference to `lzma_end'
/usr/bin/ld: ../../src/../ext/htslib/libhts.a(cram_io.o): in function `lzma_mem_deflate':
/psirc/psirc-quant/ext/htslib/cram/cram_io.c:669: undefined reference to `lzma_stream_buffer_bound'
/usr/bin/ld: /psirc/psirc-quant/ext/htslib/cram/cram_io.c:675: undefined reference to `lzma_easy_buffer_encode'
collect2: error: ld returned 1 exit status
make[3]: *** [src/CMakeFiles/psirc-quant.dir/build.make:107: src/psirc-quant] Error 1
make[2]: *** [CMakeFiles/Makefile2:154: src/CMakeFiles/psirc-quant.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:161: src/CMakeFiles/psirc-quant.dir/rule] Error 2
make: *** [Makefile:195: psirc-quant] Error 2
Do you have any idea how to proceed?
Also: You mentioned this software was written with GCC < 11. Are you still actively developing it? And if not, do you know from other users that use it with a more recent version of GCC or OS in general.
Thank you again for your help!
Hi André,
The error messages starting with "undefined reference" suggest that the libraries ("BZ2" and "lzma") were not found. Could you check whether they are installed? If they are installed on the system's non-default folders, you need to add the corresponding library path to LD_LIBRARY_PATH to make it visible to the CXX linker. https://stackoverflow.com/questions/7148036/what-is-ld-library-path-and-how-to-use-it
Hello Christina,
I was trying to install your repo on our HPC cluster and I run into the following error in the
make psirc-quant
step:Have you seen this error before? Any suggestions. htslib and hdf5 are both available on our system.
Thank you, André