DaehwanKimLab / centrifuge

Classifier for metagenomic sequences
GNU General Public License v3.0
235 stars 73 forks source link

Unable to use sudo make install prefix=/usr/local #251

Open JBriel1 opened 1 year ago

JBriel1 commented 1 year ago

Trying to install centrifuge using the quick install guide. I am using WSL with Ubuntu 22.04 - each time I try to use it it just provides the following output: dirname: missing operand Try 'dirname --help' for more information. dirname: missing operand Try 'dirname --help' for more information. /g++ -O3 -m64 -msse2 -funroll-loops -g3 -std=c++11 -DCOMPILER_OPTIONS="\"-O3 -m64 -msse2 -funroll-loops -g3 -std=c++11 -DPOPCNT_CAPABILITY\"" -DPOPCNT_CAPABILITY \ -fno-strict-aliasing -DCENTRIFUGE_VERSION="\"1.0.4\"" -DBUILD_HOST="\"hostname\"" -DBUILD_TIME="\"date\"" -DCOMPILER_VERSION="\"/g++ -v 2>&1 | tail -1\"" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DBOWTIE_MM -DCENTRIFUGE -DBOWTIE2 -DBOWTIE_64BIT_INDEX -DNDEBUG -Wall \ -I third_party \ -o centrifuge-build-bin centrifuge_build.cpp \ ccnt_lut.cpp ref_read.cpp alphabet.cpp shmem.cpp edit.cpp bt2_idx.cpp reference.cpp ds.cpp limit.cpp random_source.cpp tinythread.cpp diff_sample.cpp centrifuge_build_main.cpp \ -lpthread /bin/sh: 1: /g++: not found make: *** [Makefile:281: centrifuge-build-bin] Error 127

mourisl commented 1 year ago

Could you please run "which g++" to make sure gcc is installed on your system?

JBriel1 commented 1 year ago

jbriel@GBGITJB-L:~/centrifuge$ which g++ /usr/bin/g++

I'm now present with this error:

-fno-strict-aliasing -DCENTRIFUGE_VERSION="\"1.0.4\"" -DBUILD_HOST="\"hostname\"" -DBUILD_TIME="\"date\"" -DCOMPILER_VERSION="\"/usr/bin/g++ -v 2>&1 | tail -1\"" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DBOWTIE_MM -DCENTRIFUGE -DBOWTIE2 -DBOWTIE_64BIT_INDEX -DNDEBUG -Wall \ -I third_party \ -o centrifuge-class centrifuge.cpp \ ccnt_lut.cpp ref_read.cpp alphabet.cpp shmem.cpp edit.cpp bt2_idx.cpp reference.cpp ds.cpp limit.cpp random_source.cpp tinythread.cpp qual.cpp pat.cpp read_qseq.cpp ref_coord.cpp mask.cpp pe.cpp aligner_seed_policy.cpp scoring.cpp presets.cpp simple_func.cpp random_util.cpp outq.cpp centrifuge_main.cpp \ -lpthread centrifuge.cpp: In function ‘void driver(const char, const string&, const string&)’: centrifuge.cpp:3090:25: warning: ‘template class std::auto_ptr’ is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations] 3090 | auto_ptr refs; | ^~~~ In file included from /usr/include/c++/11/memory:76, from bt2_idx.h:28, from centrifuge.cpp:34: /usr/include/c++/11/bits/unique_ptr.h:57:28: note: declared here 57 | template class auto_ptr; | ^~~~ In file included from centrifuge.cpp:47: classifier.h: In instantiation of ‘int Classifier<index_t, local_index_t>::go(const Scoring&, const Ebwt&, const Ebwt&, const BitPairReference&, WalkMetrics&, PerReadMetrics&, HIMetrics&, SpeciesMetrics&, RandomSource&, AlnSinkWrap&) [with index_t = long unsigned int; local_index_t = short unsigned int]’: centrifuge.cpp:2693:34: required from here classifier.h:432:49: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 432 | if(_hitMap[i]._rank + 1 >= _hitMap[i].path.size()) { | ~~~~~^~~~~~~~~ classifier.h:442:55: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 442 | uint64_t parent_taxID = (rank + 1 >= _hitMap[i].path.size() ? 1 : _hitMap[i].path[rank + 1]); | ~~~^~~~~~~ classifier.h:475:63: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 475 | uint64_t cur_parent_taxID = (rank + 1 >= _hitMap[i].path.size() ? 1 : _hitMap[i].path[rank + 1]); | ~~~^~~~~~~ centrifuge.cpp: In instantiation of ‘void driver(const char, const string&, const string&) [with TStr = SString; std::string = std::__cxx11::basic_string]’: centrifuge.cpp:3469:26: required from here centrifuge.cpp:3027:30: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 3027 | if ( fileIdx < mates1.size() ) | ~~^~~~~ centrifuge.cpp:3033:35: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 3033 | else if ( fileIdx < mates1.size() + queries.size() ) | ~~^~~~~~~~~~ In file included from centrifuge.cpp:47: classifier.h: In instantiation of ‘void Classifier<index_t, local_index_t>::searchForwardAndReverse(index_t, const Ebwt&, const Scoring&, RandomSource&, const ReportingParams&, index_t) [with index_t = long unsigned int; local_index_t = short unsigned int]’: classifier.h:238:13: required from ‘int Classifier<index_t, local_index_t>::go(const Scoring&, const Ebwt&, const Ebwt&, const BitPairReference&, WalkMetrics&, PerReadMetrics&, HIMetrics&, SpeciesMetrics&, RandomSource&, AlnSinkWrap&) [with index_t = long unsigned int; local_index_t = short unsigned int]’ centrifuge.cpp:2693:34: required from here classifier.h:864:50: warning: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘const THitInt’ {aka ‘const long int’} [-Wsign-compare] 864 | hit.size() + rchit.size() > rp.ihits) { | ~~~~~~^~~~~~ /usr/bin/g++ -O3 -m64 -msse2 -funroll-loops -g3 -std=c++11 \ -DCOMPILER_OPTIONS="\"-O3 -m64 -msse2 -funroll-loops -g3 -std=c++11 -DPOPCNT_CAPABILITY\"" -DPOPCNT_CAPABILITY \ -fno-strict-aliasing -DCENTRIFUGE_VERSION="\"1.0.4\"" -DBUILD_HOST="\"hostname\"" -DBUILD_TIME="\"date\"" -DCOMPILER_VERSION="\"/usr/bin/g++ -v 2>&1 | tail -1\"" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DBOWTIE_MM -DCENTRIFUGE -DBOWTIE2 -DBOWTIE_64BIT_INDEX -Wall \ -I third_party -I . \ -o centrifuge-inspect-bin centrifuge_inspect.cpp \ ccnt_lut.cpp ref_read.cpp alphabet.cpp shmem.cpp edit.cpp bt2_idx.cpp reference.cpp ds.cpp limit.cpp random_source.cpp tinythread.cpp \ -lpthread mkdir -p /usr/local/bin mkdir -p /usr/local/share/centrifuge/indices mkdir: cannot create directory ‘/usr/local/share/centrifuge’: Permission denied make: *** [Makefile:417: install] Error 1

mourisl commented 1 year ago

This feels like a sudo issue. Could you please manually run "sudo mkdir -p /usr/local/share/centrifuge/indices" to see whether it is feasible?

JBriel1 commented 1 year ago

It made the directory. However, it is completely empty.