GuoliangLi-HZAU / BatMeth2

BS-seq analysis pipeline
38 stars 12 forks source link

Make install error #26

Open max1c opened 2 years ago

max1c commented 2 years ago

Tried with a couple different versions of gcc and gsl all fail with the same error. Looks like a problem with the source.

BatMeth2$ make install
g++ -I/apps/gcc/5.2.0/gsl/2.1/include ./src/calmeth.cpp -o ./src/calmeth -m64 -I./src/samtools-0.1.18/ -L./src/samtools-0.1.18/ -lbam -lz
g++ -I/apps/gcc/5.2.0/gsl/2.1/include ./src/splitSam.cpp -o ./src/splitSam -m64 -I./src/samtools-0.1.18/ -L./src/samtools-0.1.18/ -lbam -lz -pthread
if [ -d "bin" ]; then echo bin exists; else mkdir bin; fi
bin exists
cp scripts/batmeth2_to_bigwig.py bin
cp scripts/bedGraphToBigWig bin
cp scripts/bedSort bin
g++ -o ./scripts/BatMeth2 ./scripts/BatMeth2.cpp -lpthread
./scripts/BatMeth2.cpp:40:1: error: expected ‘,’ or ‘;’ before ‘float’
 float step = 0.01;
 ^
./scripts/BatMeth2.cpp: In function ‘void printparamter2(std::__cxx11::string, std::__cxx11::string)’:
./scripts/BatMeth2.cpp:247:393: error: ‘step’ was not declared in this scope
 ge\t%d\nmaxCoverage\t%d\nbinCoverage\t%d\nchromStep\t%d\nmethyGff\t----\nGene bins step\t%.3f\nDistance of upstream and downstream\t%d  ", threads, Qual, redup, region, sammeth, coverage, maxcoverage, binCover, chromstep, step, dista
                                                                                                                                                                                                                               ^
./scripts/BatMeth2.cpp: In function ‘int main(int, char**)’:
./scripts/BatMeth2.cpp:394:13: error: ‘step’ was not declared in this scope
             step = atof(argv[++i]);
             ^
./scripts/BatMeth2.cpp: In function ‘void annotation(std::__cxx11::string, std::__cxx11::string)’:
./scripts/BatMeth2.cpp:971:178: error: no match for ‘operator+’ (operand types are ‘std::__cxx11::basic_string<char>’ and ‘float’)
             cmd = abspath + "methyGff" + " -o " + outputdir + output_prefix + " -G " + genome_index + " -gtf " + gfffile + " -m " + methratio + " -B -P --TSS --TTS --GENE -hs " + hs;
                                                                                                                                                                                  ^
In file included from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/vector:65:0,
                 from ./scripts/BatMeth2.cpp:9:
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/stl_bvector.h:387:3: note: candidate: std::_Bit_const_iterator std::operator+(std::ptrdiff_t, const std::_Bit_const_iterator&)
   operator+(ptrdiff_t __n, const _Bit_const_iterator& __x)
   ^
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/stl_bvector.h:387:3: note:   no known conversion for argument 1 from ‘std::__cxx11::basic_string<char>’ to ‘std::ptrdiff_t {aka long int}’
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/stl_bvector.h:297:3: note: candidate: std::_Bit_iterator std::operator+(std::ptrdiff_t, const std::_Bit_iterator&)
   operator+(ptrdiff_t __n, const _Bit_iterator& __x)
   ^
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/stl_bvector.h:297:3: note:   no known conversion for argument 1 from ‘std::__cxx11::basic_string<char>’ to ‘std::ptrdiff_t {aka long int}’
In file included from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/string:52:0,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/locale_classes.h:40,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/ios_base.h:41,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/ios:42,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/ostream:38,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/iostream:39,
                 from ./scripts/BatMeth2.cpp:1:
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/basic_string.h:4834:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, _CharT)
     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/basic_string.h:4834:5: note:   template argument deduction/substitution failed:
./scripts/BatMeth2.cpp:971:180: note:   deduced conflicting types for parameter ‘_CharT’ (‘char’ and ‘float’)
             cmd = abspath + "methyGff" + " -o " + outputdir + output_prefix + " -G " + genome_index + " -gtf " + gfffile + " -m " + methratio + " -B -P --TSS --TTS --GENE -hs " + hs;
                                                                                                                                                                                    ^
In file included from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/string:52:0,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/locale_classes.h:40,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/ios_base.h:41,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/ios:42,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/ostream:38,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/iostream:39,
                 from ./scripts/BatMeth2.cpp:1:
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/basic_string.h:4818:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)   
     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/basic_string.h:4818:5: note:   template argument deduction/substitution failed:
./scripts/BatMeth2.cpp:971:180: note:   mismatched types ‘const _CharT*’ and ‘float’
             cmd = abspath + "methyGff" + " -o " + outputdir + output_prefix + " -G " + genome_index + " -gtf " + gfffile + " -m " + methratio + " -B -P --TSS --TTS --GENE -hs " + hs;
                                                                                                                                                                                    ^
In file included from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/string:53:0,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/locale_classes.h:40,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/ios_base.h:41,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/ios:42,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/ostream:38,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/iostream:39,
                 from ./scripts/BatMeth2.cpp:1:
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/basic_string.tcc:1167:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(_CharT, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
     operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs)
     ^
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/basic_string.tcc:1167:5: note:   template argument deduction/substitution failed:
./scripts/BatMeth2.cpp:971:180: note:   mismatched types ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘float’
             cmd = abspath + "methyGff" + " -o " + outputdir + output_prefix + " -G " + genome_index + " -gtf " + gfffile + " -m " + methratio + " -B -P --TSS --TTS --GENE -hs " + hs;
                                                                                                                                                                                    ^
In file included from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/string:53:0,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/locale_classes.h:40,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/ios_base.h:41,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/ios:42,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/ostream:38,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/iostream:39,
                 from ./scripts/BatMeth2.cpp:1:
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/basic_string.tcc:1151:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) 
     operator+(const _CharT* __lhs,
johnbullard-uf commented 2 years ago

This was introduced by commit 3e96aed3a374ffc8cdf2db6a49ade05740442fe9

In addition to the missing semicolon, the code is attempting to concatenate the float "hs" to the "cmd" string. This prevents the build from succeeding.

zwl8620 commented 2 years ago

I'm having the same problem with make install, is this problem fixed? Thanks a lot!

max1c commented 2 years ago

I'm having the same problem with make install, is this problem fixed? Thanks a lot!

It's not as far as I can tell. You should probably just stick to using the pre-built binary: https://github.com/GuoliangLi-HZAU/BatMeth2/blob/master/scripts/BatMeth2