Closed yuanw-18 closed 3 years ago
Hi,
maybe gcc 4.8.5 does not support c++14, which is used in kmc_tools
. In fact gcc 4.8.5 is quite old and I would strongly recommend using a newer version.
Anyway, if you only need KMC and not KMC tools you may use
make kmc
What a pity!I want to use smudge_pairs program.
Well, maybe it would be possible to use just c++11, but probably some workarounds would be needed. GCC 4.8.5 is 5 years old now (https://gcc.gnu.org/releases.html) so it is pretty old.
Why don't you just use precompiled release version: https://github.com/refresh-bio/KMC/releases/tag/v3.1.1
I use the new gcc version 10.2.0 (GCC), but still has error.
mkdir -p bin
g++ -lm -O3 -lpthread -std=c++14 -o bin/kmc_tools kmc_tools/kmc_header.o kmc_tools/kmc_tools.o kmc_to ols/nc_utils.o kmc_tools/parameters_parser.o kmc_tools/parser.o kmc_tools/tokenizer.o kmc_tools/fastq _filter.o kmc_tools/fastq_reader.o kmc_tools/fastq_writer.o kmc_tools/percent_progress.o kmc_api/mmer .o kmc_api/kmc_file.o kmc_api/kmer_api.o kmc_tools/libs/libz.a kmc_tools/libs/libbz2.a
kmc_tools/kmc_tools.o: In function CTools<8u>::Process() [clone .isra.0]': kmc_tools.cpp:(.text+0x114f): undefined reference to
CKMCFile::OpenForRA(std::cxx11::basic_string< char, std::char_traitsCTools<7u>::Process() [clone .isra.0]': kmc_tools.cpp:(.text+0x2def): undefined reference to
CKMCFile::OpenForRA(std::__cxx11::basic_string< char, std::char_traitsCTools<6u>::Process() [clone .isra.0]': kmc_tools.cpp:(.text+0x4a9f): undefined reference to
CKMCFile::OpenForRA(std::CTools<5u>::Process() [clone .isra.0]': kmc_tools.cpp:(.text+0x66ff): undefined reference to
CKMCFile::OpenForRA(std::cxx11::basic_string< char, std::char_traitsCTools<4u>::Process() [clone .isra.0]': kmc_tools.cpp:(.text+0x831f): undefined reference to
CKMCFile::OpenForRA(std::__cxx11::basic_string< char, std::char_traitsCParametersParser::validate_input_dbs()': parameters_parser.cpp:(.text+0x3605): undefined reference to
CKMC_header::CKMC_header(std::cxx11:: basic_string<char, std::char_traitsCKMC_header::CKMC_header(std::__cxx11:: basic_string<char, std::char_traits<char>, std::allocator<char> >)' kmc_tools/fastq_filter.o: In function
CFastqFilter::FilterRead()':
fastq_filter.cpp:(.text+0x231): undefined reference to `CKMCFile::GetCountersForRead(std::CFastqFilter::FilterReadTrim()': fastq_filter.cpp:(.text+0x3c5): undefined reference to
CKMCFile::GetCountersForRead(std::cxx11::ba sic_string<char, std::char_traitsCFastqFilter::HardMask()': fastq_filter.cpp:(.text+0x48b): undefined reference to
CKMCFile::GetCountersForRead(std::__cxx11::ba sic_string<char, std::char_traitsvoid CFastqFilter::ProcessImpl<CFastqFilter::TrimFastaToFastaH elper>()': fastq_filter.cpp:(.text._ZN12CFastqFilter11ProcessImplINS_22TrimFastaToFastaHelperEEEvv[_ZN12CFastqFi lter11ProcessImplINS_22TrimFastaToFastaHelperEEEvv]+0x175): undefined reference to
CKMCFile::GetCoun tersForRead(std::void CFastqFilter::ProcessImpl<CFastqFilter::TrimFastqToFastaH elper>()': fastq_filter.cpp:(.text._ZN12CFastqFilter11ProcessImplINS_22TrimFastqToFastaHelperEEEvv[_ZN12CFastqFi lter11ProcessImplINS_22TrimFastqToFastaHelperEEEvv]+0x175): undefined reference to
CKMCFile::GetCoun tersForRead(std::__cxx11::basic_string<char, std::char_traits
Hi, not good. Are you using modifies makefile? I mean without -static and -Wl? I have just tried on my machine with gcc 10.2.0 and it compiles Maybe try first
make clean
and then
make kmc kmc_tools
I'm really sorry to bother you again. I use make clean and make,and there is no error. But
$ ./smudge_pairs
./smudge_pairs: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by ./smudge_pairs) ./smudge_pairs: /lib64/libstdc++.so.6: version
CXXABI_1.3.8' not found (required by ./smudge_pairs)
./smudge_pairs: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./smudge_pairs)
Maybe my GCC has some errors?
I think it may be indeed related to GCC or to your installation process. Have you try to google this error or maybe ask smudge_pairs author. It seems the problem is not KMC related. Maybe try to rebuild smudge_pairs with your new GCC?
Thank you for your enthusiastic help! I solved the problem of gcc, and now it can run successfully. You are the most patient software developer I have ever met. Thanks again for your help.
:) Glad I could help.
I feel I owe here some explanations. @tbenavi1 modified @marekkokot's KMC to create a program to search all unique kmer pairs with one SNP between them - smudge_pairs: The repository is https://github.com/tbenavi1/KMC as a matter of fact, it's still a fork and it does not have Issues (@tbenavi1 is there a way to allow them? Or perhaps we could write in the forked README to post them on the smudgeplot repo). So, if you do the same steps with our fork, you should also get the smudge_pairs program.
And since I am here, I would like to second @WangYuan20190517. Thank you very much for your work @marekkokot!
Hi!
I use make . But I meet error flowing: /usr/bin/ld: cannot find -lpthread /usr/bin/ld: cannot find -lstdc++ /usr/bin/ld: cannot find -lm /usr/bin/ld: cannot find -lc collect2: error: ld returned 1 exit status make: *** [makefile:92: kmc] Error 1
I then use the method #79 to replace some parts of makefile:
But I meet the other error: g++: error: unrecognized command line option ‘-std=c++14’ make: *** [makefile:78: kmc_tools/kmc_tools.o] Error 1
My gcc is gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)