Closed Abayomi-Olabode closed 6 years ago
Dear @Abayomi-Olabode,
This is a computer configuration issue. @stevenweaver : could you please add a compiler flag to require C++ 14 to CMakeLists.txt?
In the meantime, @Abayomi-Olabode, please edit the following line in CMakeLists.txt
set(DEFAULT_COMPILE_FLAGS "-O3")
to
set(DEFAULT_COMPILE_FLAGS "-O3 -std=c++14")
Then
$rm -rf CMakeCache.txt CMakeFiles
$cmake ./
$make install
Best, Sergei
Thanks so much @spond for your very prompt response. I tried following your instructions however i encountered one error at the end as posted below.
Scanning dependencies of target selectreads [ 89%] Building CXX object CMakeFiles/selectreads.dir/src/trim_reads.cpp.o [ 91%] Building CXX object CMakeFiles/selectreads.dir/src/stringBuffer.cc.o [ 94%] Building CXX object CMakeFiles/selectreads.dir/src/tn93_shared.cc.o [ 97%] Building CXX object CMakeFiles/selectreads.dir/src/argparse_trim.cpp.o [100%] Linking CXX executable selectreads [100%] Built target selectreads Install the project... -- Install configuration: "" -- Installing: /usr/local/bin/tn93 CMake Error at cmake_install.cmake:42 (file): file INSTALL cannot copy file "/home/abayomi/git/tn93/tn93" to "/usr/local/bin/tn93".
Makefile:94: recipe for target 'install' failed make: *** [install] Error 1
I think this is a permissions issue, try running with sudo
Thanks @ArtPoon, that was the problem. I have it installed now.
Thanks once again @spond
Best Wishes, Abayomi
[ 3%] Building CXX object CMakeFiles/ShortestPathTN93.dir/src/ShortestPathTN93.cpp.o [ 6%] Building CXX object CMakeFiles/ShortestPathTN93.dir/src/stringBuffer.cc.o [ 10%] Building CXX object CMakeFiles/ShortestPathTN93.dir/src/tn93_shared.cc.o Linking CXX executable ShortestPathTN93 [ 10%] Built target ShortestPathTN93 Scanning dependencies of target nucfreqsfasta [ 13%] Building CXX object CMakeFiles/nucfreqsfasta.dir/src/nuc_freqs_from_fasta.cpp.o [ 17%] Building CXX object CMakeFiles/nucfreqsfasta.dir/src/stringBuffer.cc.o [ 20%] Building CXX object CMakeFiles/nucfreqsfasta.dir/src/tn93_shared.cc.o Linking CXX executable nucfreqsfasta [ 20%] Built target nucfreqsfasta Scanning dependencies of target readreduce [ 24%] Building CXX object CMakeFiles/readreduce.dir/src/read_reducer.cpp.o [ 27%] Building CXX object CMakeFiles/readreduce.dir/src/stringBuffer.cc.o [ 31%] Building CXX object CMakeFiles/readreduce.dir/src/tn93_shared.cc.o [ 34%] Building CXX object CMakeFiles/readreduce.dir/src/argparse_merge.cpp.o Linking CXX executable readreduce [ 34%] Built target readreduce Scanning dependencies of target selectreads [ 37%] Building CXX object CMakeFiles/selectreads.dir/src/trim_reads.cpp.o [ 41%] Building CXX object CMakeFiles/selectreads.dir/src/stringBuffer.cc.o [ 44%] Building CXX object CMakeFiles/selectreads.dir/src/tn93_shared.cc.o [ 48%] Building CXX object CMakeFiles/selectreads.dir/src/argparse_trim.cpp.o Linking CXX executable selectreads [ 48%] Built target selectreads Scanning dependencies of target seqcoverage [ 51%] Building CXX object CMakeFiles/seqcoverage.dir/src/charfreqs.cpp.o [ 55%] Building CXX object CMakeFiles/seqcoverage.dir/src/stringBuffer.cc.o [ 58%] Building CXX object CMakeFiles/seqcoverage.dir/src/tn93_shared.cc.o [ 62%] Building CXX object CMakeFiles/seqcoverage.dir/src/argparse_cf.cpp.o Linking CXX executable seqcoverage [ 62%] Built target seqcoverage Scanning dependencies of target tn93 [ 65%] Building CXX object CMakeFiles/tn93.dir/src/TN93.cpp.o [ 68%] Building CXX object CMakeFiles/tn93.dir/src/stringBuffer.cc.o [ 72%] Building CXX object CMakeFiles/tn93.dir/src/tn93_shared.cc.o [ 75%] Building CXX object CMakeFiles/tn93.dir/src/argparse.cpp.o Linking CXX executable tn93 [ 75%] Built target tn93 Scanning dependencies of target tn93-cluster [ 79%] Building CXX object CMakeFiles/tn93-cluster.dir/src/cluster.cpp.o /usr/local/biotools/tn93/src/cluster.cpp: In function ‘int main(int, const char)’: /usr/local/biotools/tn93/src/cluster.cpp:241:10: error: ‘outer_iterator’ does not name a type auto outer_iterator = remaining.begin(); ^ /usr/local/biotools/tn93/src/cluster.cpp:243:12: error: ‘outer_iterator’ was not declared in this scope while (outer_iterator != remaining.end()) { ^ /usr/local/biotools/tn93/src/cluster.cpp:253:12: error: ‘inner_iterator’ does not name a type auto inner_iterator = remaining.begin(); ^ /usr/local/biotools/tn93/src/cluster.cpp:255:14: error: ‘inner_iterator’ was not declared in this scope while (inner_iterator != remaining.end()) { ^ /usr/local/biotools/tn93/src/cluster.cpp:314:10: error: ‘outer_iterator’ does not name a type auto outer_iterator = remaining.begin(); ^ /usr/local/biotools/tn93/src/cluster.cpp:325:12: error: ‘outer_iterator’ was not declared in this scope while (outer_iterator != remaining.end()) { ^ /usr/local/biotools/tn93/src/cluster.cpp:366:14: error: ‘cluster_iterator’ does not name a type auto cluster_iterator = join_to.begin(); ^ /usr/local/biotools/tn93/src/cluster.cpp:367:32: error: ‘cluster_iterator’ was not declared in this scope unsigned long first = cluster_iterator; ^ make[2]: [CMakeFiles/tn93-cluster.dir/src/cluster.cpp.o] Error 1 make[1]: [CMakeFiles/tn93-cluster.dir/all] Error 2 make: [all] Error 2
Dear @vagnerfonseca,
You seem to be experiencing the same exact problem as @Abayomi-Olabode
Please see the proposed solution above and patch CMake
configuration files.
Best, Sergei
Scanning dependencies of target ShortestPathTN93 [ 3%] Building CXX object CMakeFiles/ShortestPathTN93.dir/src/ShortestPathTN93.cpp.o c++: error: unrecognized command line option ‘-std=c++14’ make[2]: [CMakeFiles/ShortestPathTN93.dir/src/ShortestPathTN93.cpp.o] Error 1 make[1]: [CMakeFiles/ShortestPathTN93.dir/all] Error 2 make: *** [all] Error 2
Dear @vagnerfonseca,
Please type the following at your terminal prompt
gcc --version
and let me know what you see.
Best, Sergei
gcc (GCC) 7.1.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Dear @vagnerfonseca,
Please update your repository
git pull
rm -rf CMakeFiles CMakeCache.txt
cmake ./
make install
and try again. I pushed what I think should be a fix to your issue.
Best, Sergei
ok i fixed cmake was using gcc 4.8 export CC=/usr/local/bin/gcc export CXX=/usr/local/bin/g++
thank you
Thank you so much @ArtPoon and @spond. I have managed to trouble shoot the issue using your help. Thank you!!
Hi @stevenweaver. I have been trying to install the tn93 package to no avail. The cmake command worked fine and all build files were created. However, the make install command generates a bunch of errors as posted below! I am working on a linux os machine. Please is there anything else i need to do to get it working?
Thanks in advance for your help.
Abayomi
Scanning dependencies of target readreduce [ 2%] Building CXX object CMakeFiles/readreduce.dir/src/read_reducer.cpp.o [ 5%] Building CXX object CMakeFiles/readreduce.dir/src/stringBuffer.cc.o [ 8%] Building CXX object CMakeFiles/readreduce.dir/src/tn93_shared.cc.o [ 10%] Building CXX object CMakeFiles/readreduce.dir/src/argparse_merge.cpp.o [ 13%] Linking CXX executable readreduce [ 13%] Built target readreduce Scanning dependencies of target validate_fasta [ 16%] Building CXX object CMakeFiles/validate_fasta.dir/src/validate_fasta.cpp.o [ 18%] Building CXX object CMakeFiles/validate_fasta.dir/src/stringBuffer.cc.o [ 21%] Building CXX object CMakeFiles/validate_fasta.dir/src/tn93_shared.cc.o [ 24%] Linking CXX executable validate_fasta [ 24%] Built target validate_fasta Scanning dependencies of target seqcoverage [ 27%] Building CXX object CMakeFiles/seqcoverage.dir/src/charfreqs.cpp.o [ 29%] Building CXX object CMakeFiles/seqcoverage.dir/src/stringBuffer.cc.o [ 32%] Building CXX object CMakeFiles/seqcoverage.dir/src/tn93_shared.cc.o [ 35%] Building CXX object CMakeFiles/seqcoverage.dir/src/argparse_cf.cpp.o [ 37%] Linking CXX executable seqcoverage [ 37%] Built target seqcoverage Scanning dependencies of target tn93-cluster [ 40%] Building CXX object CMakeFiles/tn93-cluster.dir/src/cluster.cpp.o /home/abayomi/git/tn93/src/cluster.cpp: In function ‘int main(int, const char)’: /home/abayomi/git/tn93/src/cluster.cpp:241:10: error: ‘outer_iterator’ does not name a type auto outer_iterator = remaining.begin(); ^ /home/abayomi/git/tn93/src/cluster.cpp:243:12: error: ‘outer_iterator’ was not declared in this scope while (outer_iterator != remaining.end()) { ^ /home/abayomi/git/tn93/src/cluster.cpp:253:12: error: ‘inner_iterator’ does not name a type auto inner_iterator = remaining.begin(); ^ /home/abayomi/git/tn93/src/cluster.cpp:255:14: error: ‘inner_iterator’ was not declared in this scope while (inner_iterator != remaining.end()) { ^ /home/abayomi/git/tn93/src/cluster.cpp:314:10: error: ‘outer_iterator’ does not name a type auto outer_iterator = remaining.begin(); ^ /home/abayomi/git/tn93/src/cluster.cpp:325:12: error: ‘outer_iterator’ was not declared in this scope while (outer_iterator != remaining.end()) { ^ /home/abayomi/git/tn93/src/cluster.cpp:366:14: error: ‘cluster_iterator’ does not name a type auto cluster_iterator = join_to.begin(); ^ /home/abayomi/git/tn93/src/cluster.cpp:367:32: error: ‘cluster_iterator’ was not declared in this scope unsigned long first = cluster_iterator; ^ CMakeFiles/tn93-cluster.dir/build.make:62: recipe for target 'CMakeFiles/tn93-cluster.dir/src/cluster.cpp.o' failed make[2]: [CMakeFiles/tn93-cluster.dir/src/cluster.cpp.o] Error 1 CMakeFiles/Makefile2:178: recipe for target 'CMakeFiles/tn93-cluster.dir/all' failed make[1]: [CMakeFiles/tn93-cluster.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: [all] Error 2