simonwhelan / Divvier

A program for divvying or partially filtering multiple sequence alignments
GNU General Public License v3.0
22 stars 0 forks source link

Compilation error in installation #5

Closed xieduo7 closed 5 years ago

xieduo7 commented 5 years ago

Hi,

Unfortunately I'm getting this error when I try to compile with GCC(gcc-4.9.4):

$make
g++ -O3 -std=c++14 -Wall -Wmissing-prototypes -Wshadow -fmessage-length=0 -msse2 -mfpmath=sse -I/usr/local/include -c Cluster.cpp
cc1plus: warning: command line option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++
In file included from Cluster.h:16:0,
                 from Cluster.cpp:6:
Tree.h: In member function ‘int CTree::BraLink(int, int)’:
Tree.h:167:35: warning: declaration of ‘B’ shadows a member of 'this' [-Wshadow]
  inline int BraLink(int B, int L) { return m_vBraLinks[B][L]; }      // Get the L link for branch B
                                   ^
Tree.h: In member function ‘void CTree::ReplaceBraLink(int, int, int)’:
Tree.h:168:50: warning: declaration of ‘B’ shadows a member of 'this' [-Wshadow]
  inline void ReplaceBraLink(int B,int L,int Val) { m_vBraLinks[B][L]=Val;};   // Set the L link for branch B to Val; returns Val;
                                                  ^
Tree.h: In member function ‘int CTree::NodeBra(int, int)’:
Tree.h:176:28: warning: declaration of ‘B’ shadows a member of 'this' [-Wshadow]
  int NodeBra(int N, int B) { return m_Node[N]->m_viBranch[B]; } // Returns Branchlink B of Node N
                            ^
Cluster.cpp: In member function ‘void CCluster::MakePairs(std::vector<std::basic_string<char> >&)’:
Cluster.cpp:84:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i = 0; i < distSet.size(); i++) {
                    ^
Cluster.cpp:91:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    if(pairs2add.size() >= _approxNumber) { break; } // Finish when we have the full list
                        ^
Cluster.cpp: In member function ‘void CCluster::DoValidate(std::vector<std::basic_string<char> >&, std::vector<std::vector<int> >&, SSplit&, std::vector<double>&)’:
Cluster.cpp:127:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int pos = 0; pos < seqs[0].size(); pos++) {
                       ^
In file included from Cluster.h:16:0,
                 from Cluster.cpp:6:
Tree.h:27:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define my_min(a,b) ((a)<(b)?(a):(b))
                         ^
Cluster.cpp:163:22: note: in expansion of macro ‘my_min’
   for(int i = 0; i < my_min(_approxNumber - count,newPairs.size()); i++) { pairs2add.push_back(get<0>(newPairs[i])); }
                      ^
Cluster.cpp:163:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i = 0; i < my_min(_approxNumber - count,newPairs.size()); i++) { pairs2add.push_back(get<0>(newPairs[i])); }
                    ^
Cluster.cpp: In function ‘double Coverage(std::string&, std::string&)’:
Cluster.cpp:173:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0 ; i < seq1.size(); i++) {
                    ^
Cluster.cpp: In function ‘std::vector<std::tuple<int, int, double> > CoverageMatrix(std::vector<std::basic_string<char> >&)’:
Cluster.cpp:183:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0; i < seq.size() ; i++) {
                   ^
Cluster.cpp:184:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int j = i + 1; j < seq.size(); j++) {
                        ^
Cluster.cpp: In member function ‘std::vector<std::vector<int> > CCluster::PairsToCalculate()’:
Cluster.cpp:224:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0 ; i < retVec.size() - 1; i++) {
                    ^
Cluster.cpp: In member function ‘void CCluster::SmartDivisive(std::vector<std::vector<int> >&, std::vector<double>&, std::string, double)’:
Cluster.cpp:254:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i = 0; i < _splitPairs.size(); i++) {
                    ^
Cluster.cpp:263:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i = 0; i < _splitPairs.size(); i++) {
                    ^
Cluster.cpp: In member function ‘double CCluster::ScoreSplit(std::tuple<SSplit, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > >, std::vector<std::vector<int> >&, std::string, std::vector<double>&)’:
Cluster.cpp:359:68: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if(activePPs.size() >= activeSplit.size() - 1 || activePPs.size() > _approxNumber/3) {
                                                                    ^
g++ -O3 -std=c++14 -Wall -Wmissing-prototypes -Wshadow -fmessage-length=0 -msse2 -mfpmath=sse -I/usr/local/include -c Tree.cpp
cc1plus: warning: command line option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++
In file included from Tree.cpp:8:0:
Tree.h: In member function ‘int CTree::BraLink(int, int)’:
Tree.h:167:35: warning: declaration of ‘B’ shadows a member of 'this' [-Wshadow]
  inline int BraLink(int B, int L) { return m_vBraLinks[B][L]; }      // Get the L link for branch B
                                   ^
Tree.h: In member function ‘void CTree::ReplaceBraLink(int, int, int)’:
Tree.h:168:50: warning: declaration of ‘B’ shadows a member of 'this' [-Wshadow]
  inline void ReplaceBraLink(int B,int L,int Val) { m_vBraLinks[B][L]=Val;};   // Set the L link for branch B to Val; returns Val;
                                                  ^
Tree.h: In member function ‘int CTree::NodeBra(int, int)’:
Tree.h:176:28: warning: declaration of ‘B’ shadows a member of 'this' [-Wshadow]
  int NodeBra(int N, int B) { return m_Node[N]->m_viBranch[B]; } // Returns Branchlink B of Node N
                            ^
Tree.cpp: In constructor ‘CTree::CTree(std::string, std::vector<std::basic_string<char> >, bool, bool)’:
Tree.cpp:166:83: warning: declaration of ‘Names’ shadows a member of 'this' [-Wshadow]
 CTree::CTree(string TREE, vector <string> Names, bool AllowFail, bool AllowSubTree) {
                                                                                   ^
Tree.cpp: In member function ‘void CTree::CreateTree(std::string, std::vector<std::basic_string<char> >, bool, bool, bool)’:
Tree.cpp:202:107: warning: declaration of ‘Names’ shadows a member of 'this' [-Wshadow]
 void CTree::CreateTree(string Tree, vector <string> Names, bool CheckVar, bool AllowFail,bool AllowSubTree) {
                                                                                                           ^
Tree.cpp:204:9: warning: declaration of ‘NoSeq’ shadows a member of 'this' [-Wshadow]
     int NoSeq = Names.size(); // Get the number of sequences from the names provide
         ^
Tree.cpp:278:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      if(pos == string::npos) { cout << "\nERROR: Sequence name not found in tree: " << get<0>(name) << "\n"; exit(-1); }
             ^
Tree.cpp:397:7: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if(i == m_viBranchLabels.size()) { m_viBranchLabels.clear(); }
       ^
Tree.cpp: In member function ‘void CTree::GetMemory(int)’:
Tree.cpp:480:32: warning: declaration of ‘NoSeq’ shadows a member of 'this' [-Wshadow]
 void CTree::GetMemory(int NoSeq) {
                                ^
Tree.cpp: In member function ‘void CTree::CleanTree()’:
Tree.cpp:498:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(i=0;i<m_Node.size();i++) { if(m_Node[i] != NULL) { delete m_Node[i]; }}
              ^
Tree.cpp: In member function ‘double CTree::QuadB(int)’:
Tree.cpp:562:10: warning: declaration of ‘NoBra’ shadows a member of 'this' [-Wshadow]
  int i,j,NoBra = 1;
          ^
Tree.cpp: In member function ‘void CTree::ReplaceNodeBra(int, std::vector<int>)’:
Tree.cpp:585:48: warning: declaration of ‘B’ shadows a member of 'this' [-Wshadow]
 void CTree::ReplaceNodeBra(int N,vector <int> B) {
                                                ^
In file included from /hwfssz1/ST_DIVERSITY/PUB/USER/yuhao/local/compilation_toolchain/gcc-4.9.4/include/c++/4.9.4/cassert:43:0,
                 from Sequence.h:17,
                 from Tree.h:21,
                 from Tree.cpp:8:
Tree.cpp: In member function ‘void CTree::ReplaceNodeBraElement(int, int, int)’:
Tree.cpp:592:53: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  assert(InRange(Element,0,NoLinks(N)) && NoLinks(N) == m_Node[N]->m_viBranch.size());
                                                     ^
Tree.cpp: In member function ‘void CTree::find_closest(std::string*, int*, int*, int*, int, double*, int*, int*)’:
Tree.cpp:639:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if(x2 == string::npos) { x2 = (int)tree->size();}
         ^
Tree.cpp: In member function ‘void CTree::GetBraDetails(std::string, int*, double*, int*)’:
Tree.cpp:665:6: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if(i!= string::npos) { s.replace(i,1,""); } i = s.find("("); if(j!= string::npos) { s.replace(j,1,""); }
      ^
Tree.cpp:665:67: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if(i!= string::npos) { s.replace(i,1,""); } i = s.find("("); if(j!= string::npos) { s.replace(j,1,""); }
                                                                   ^
Tree.cpp:667:7: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if(i != string::npos || j != string::npos) { Error("\nCTree::GetBraDetails(...)\nTrying to resolve string with more than one parenthesis: " + s + " \n"); }
       ^
Tree.cpp:667:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if(i != string::npos || j != string::npos) { Error("\nCTree::GetBraDetails(...)\nTrying to resolve string with more than one parenthesis: " + s + " \n"); }
                            ^
Tree.cpp:669:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  i = s.find(":"); if(i==string::npos) { i = s.size(); }
                       ^
Tree.cpp:670:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  j = s.find(":"); if(j==string::npos) { j = s.size(); }
                       ^
Tree.cpp: In member function ‘int CTree::CutBranch(int, int)’:
Tree.cpp:742:37: warning: declaration of ‘B’ shadows a member of 'this' [-Wshadow]
 int CTree::CutBranch(int B, int Link) {
                                     ^
In file included from /hwfssz1/ST_DIVERSITY/PUB/USER/yuhao/local/compilation_toolchain/gcc-4.9.4/include/c++/4.9.4/cassert:43:0,
                 from Sequence.h:17,
                 from Tree.h:21,
                 from Tree.cpp:8:
Tree.cpp: In member function ‘int CTree::AddSeq(int, int, double)’:
Tree.cpp:893:105: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  FOR(i,(int)m_Node[inN1]->m_viLink.size()) { if(m_Node[inN1]->m_viLink[i] == inN2) { break; } } assert(i!=m_Node[inN1]->m_viLink.size());
                                                                                                         ^
Tree.cpp:898:105: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  FOR(i,(int)m_Node[inN2]->m_viLink.size()) { if(m_Node[inN2]->m_viLink[i] == inN1) { break; } } assert(i!=m_Node[inN2]->m_viLink.size());
                                                                                                         ^
Tree.cpp: In member function ‘void CTree::MidpointRoot()’:
Tree.cpp:1106:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0 ; i < no.size() - 1; i++) {
                    ^
Tree.cpp: In member function ‘std::vector<int> CTree::GetBranchPath(int, int, std::vector<int>, bool)’:
Tree.cpp:1158:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0 ; i < nodes.size() - 1; i++) {
                    ^
In file included from Tree.cpp:8:0:
Tree.cpp: In member function ‘void CTree::OutSplits(std::ostream&)’:
Tree.h:32:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define FOR(i,n) for(i=0; i<n; i++)                             // Forwards for-loop
                            ^
Tree.cpp:1224:2: note: in expansion of macro ‘FOR’
  FOR(i,m_vSplits.size()) {
  ^
Tree.cpp: In function ‘bool SplitsCompatible(std::vector<SSplit>, int, std::vector<SSplit>, int)’:
Tree.h:32:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define FOR(i,n) for(i=0; i<n; i++)                             // Forwards for-loop
                            ^
Tree.cpp:1271:3: note: in expansion of macro ‘FOR’
   FOR(j,Split1.size()) {
   ^
Tree.cpp: In member function ‘std::ostream& CTree::OutNode(int, int, std::ostream&)’:
Tree.cpp:1381:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if(ToNode < m_iNoSeq && m_vsName.size() == m_iNoSeq) { if(m_bOutName) { os << m_vsName[ToNode]; } else { os << ToNode+1; } } else { os << ToNode + 1; }
                                           ^
Tree.cpp:1384:56: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    if(NodeLink(ToNode,0) < m_iNoSeq && m_vsName.size() == m_iNoSeq) { if(m_bOutName) { os << "," << m_vsName[NodeLink(ToNode,0)]; } else { os << "," << NodeLink(ToNode,0); } }
                                                        ^
In file included from /hwfssz1/ST_DIVERSITY/PUB/USER/yuhao/local/compilation_toolchain/gcc-4.9.4/include/c++/4.9.4/cassert:43:0,
                 from Sequence.h:17,
                 from Tree.h:21,
                 from Tree.cpp:8:
Tree.cpp: In member function ‘std::ostream& CTree::OutBranch(int, int, std::ostream&)’:
Tree.cpp:1412:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    assert(i != m_Node[ToNode]->m_viLink.size());
             ^
Tree.cpp:1418:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    assert(i != m_Node[ToNode]->m_viLink.size());
             ^
Tree.cpp: In member function ‘std::vector<int> CTree::ConstOut()’:
Tree.cpp:1446:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  assert(List.size() == (((m_iNoSeq * m_iNoSeq) - m_iNoSeq) / 2));
                     ^
Tree.cpp: In member function ‘void CTree::PWDistSub(int, int, std::vector<double>*, bool)’:
Tree.cpp:1544:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   assert((DoInternalNodes == false && d->size() == m_iNoSeq) || (DoInternalNodes == true && d->size() == m_iNoNode));
                                                 ^
Tree.cpp:1544:103: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   assert((DoInternalNodes == false && d->size() == m_iNoSeq) || (DoInternalNodes == true && d->size() == m_iNoNode));
                                                                                                       ^
Tree.cpp: In member function ‘void CTree::ReplaceTreeCP(CTree*, std::vector<int>, std::vector<int>, bool)’:
Tree.cpp:1644:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  assert(LeafMap.size() + NCover.size() == NT->m_iNoNode);
                                        ^
Tree.cpp:1672:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  assert(Bran.size() == NT->m_iNoBra);
                     ^
Tree.cpp:1680:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    assert(i != m_Node[nt]->m_viLink.size() && NT->m_Node[nf]->m_viLink.size() == 1);
             ^
Tree.cpp: In member function ‘std::vector<double> CTree::GetPartialTreeDist(std::vector<int>, std::vector<std::vector<int> >)’:
Tree.cpp:1720:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   assert(dist.size() == m_iNoSeq);
                      ^
Tree.cpp: In member function ‘void CTree::BuildOriSubTree(CTree*, std::vector<bool>)’:
Tree.cpp:1777:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  assert(NodesBool.size() == NoNode() + NoSeq());
                          ^
Tree.cpp: In member function ‘void CTree::BuildOriSubTree(CTree*, std::vector<int>, std::vector<int>, std::vector<int>)’:
Tree.cpp:1807:17: warning: declaration of ‘NoSeq’ shadows a member of 'this' [-Wshadow]
  int i,j,k,Node,NoSeq = (int)LeafMap.size();
                 ^
In file included from /hwfssz1/ST_DIVERSITY/PUB/USER/yuhao/local/compilation_toolchain/gcc-4.9.4/include/c++/4.9.4/cassert:43:0,
                 from Sequence.h:17,
                 from Tree.h:21,
                 from Tree.cpp:8:
Tree.cpp:1817:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   assert(Node != NCover.size());
               ^
Tree.cpp: In member function ‘std::vector<std::vector<int> > CTree::GetKnotClusters(std::vector<bool>, int)’:
Tree.cpp:1853:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  assert(INC.size() == NoNode());
                    ^
Tree.cpp: In member function ‘void CTree::SetNames(std::vector<std::basic_string<char> >, bool)’:
Tree.cpp:1882:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if(NewNames.size() != m_iNoSeq) { Error("\nTrying to write " + int_to_string(NewNames.size()) + " NewNames to a tree with " + int_to_string(m_iNoSeq) + " sequences in CTree::SetNames\n"); }
                     ^
Tree.cpp: In function ‘std::vector<std::basic_string<char> > ReadTreeNames(std::string)’:
Tree.cpp:2035:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0; i < Tree.size(); i++) {
                   ^
Tree.cpp:2039:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for(int j = i; j < Tree.size(); j++) {
                     ^
Tree.cpp: In member function ‘std::vector<std::vector<int> > CTree::GetKnotClusters(std::vector<bool>, int)’:
Tree.cpp:1870:3: warning: ‘k’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   if(k != -1) { Clusters.push_back(v_C); }
   ^
Tree.cpp: In member function ‘void CTree::CreateTree(std::string, std::vector<std::basic_string<char> >, bool, bool, bool)’:
Tree.cpp:367:3: warning: ‘SubSeq’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   if(SubSeq == m_iNoSeq) {
   ^
Tree.cpp: In function ‘CTree FindGreedySubTree(CTree*, int)’:
Tree.cpp:1950:65: warning: ‘best_bra’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   GreedySeq2Tree(best_bra,SeqsToAdd[best_seq],&CurTree,&PWDists); SeqsToAdd[best_seq] = -1;
                                                                 ^
g++ -O3 -std=c++14 -Wall -Wmissing-prototypes -Wshadow -fmessage-length=0 -msse2 -mfpmath=sse -I/usr/local/include -c Random.cpp
cc1plus: warning: command line option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++
Random.cpp: In function ‘void TestRandom()’:
Random.cpp:173:10: warning: variable ‘u’ set but not used [-Wunused-but-set-variable]
   double u;
          ^
g++ -O3 -std=c++14 -Wall -Wmissing-prototypes -Wshadow -fmessage-length=0 -msse2 -mfpmath=sse -I/usr/local/include -c Divvier.cpp
cc1plus: warning: command line option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++
In file included from Divvier.h:14:0,
                 from Divvier.cpp:36:
Tree.h: In member function ‘int CTree::BraLink(int, int)’:
Tree.h:167:35: warning: declaration of ‘B’ shadows a member of 'this' [-Wshadow]
  inline int BraLink(int B, int L) { return m_vBraLinks[B][L]; }      // Get the L link for branch B
                                   ^
Tree.h: In member function ‘void CTree::ReplaceBraLink(int, int, int)’:
Tree.h:168:50: warning: declaration of ‘B’ shadows a member of 'this' [-Wshadow]
  inline void ReplaceBraLink(int B,int L,int Val) { m_vBraLinks[B][L]=Val;};   // Set the L link for branch B to Val; returns Val;
                                                  ^
Tree.h: In member function ‘int CTree::NodeBra(int, int)’:
Tree.h:176:28: warning: declaration of ‘B’ shadows a member of 'this' [-Wshadow]
  int NodeBra(int N, int B) { return m_Node[N]->m_viBranch[B]; } // Returns Branchlink B of Node N
                            ^
In file included from Divvier.cpp:36:0:
Divvier.h: In constructor ‘CPostP::CPostP(std::string)’:
Divvier.h:43:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i = 5; i < Toks.size() ; i++)  {
                    ^
Divvier.h: In member function ‘std::string CPostP::out()’:
Divvier.h:50:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i = 0 ; i < _PP.size(); i++) { ss<< "\t" << _PP[i]; }
                     ^
Divvier.cpp: In function ‘int main(int, char**)’:
Divvier.cpp:143:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0; i < seqData->size() ; i++) {
                   ^
Divvier.cpp:189:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if((divvy.size() == Nseq && options.minDivvyChar > 1) && options.doFullDivvy == 0) { continue; }
                    ^
Divvier.cpp: In function ‘CTree MakeTree(std::vector<std::basic_string<char> >, std::vector<std::basic_string<char> >)’:
Divvier.cpp:285:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0; i < n.size(); i++) { newName[i] = "seq" + int_to_string(i); }
                   ^
Divvier.cpp: In function ‘double GetPercentDiff(std::string, std::string)’:
Divvier.cpp:312:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0 ; i < seq1.size(); i++) {
                    ^
Divvier.cpp: In function ‘void CreateZorro()’:
Divvier.cpp:335:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int j = 0; j < in_seq[i].size(); j++) {
                    ^
g++ -O3 -std=c++14 -Wall -Wmissing-prototypes -Wshadow -fmessage-length=0 -msse2 -mfpmath=sse -I/usr/local/include -c bionj.cxx
cc1plus: warning: command line option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++
In file included from Divvier.h:14:0,
                 from bionj.cxx:20:
Tree.h: In member function ‘int CTree::BraLink(int, int)’:
Tree.h:167:35: warning: declaration of ‘B’ shadows a member of 'this' [-Wshadow]
  inline int BraLink(int B, int L) { return m_vBraLinks[B][L]; }      // Get the L link for branch B
                                   ^
Tree.h: In member function ‘void CTree::ReplaceBraLink(int, int, int)’:
Tree.h:168:50: warning: declaration of ‘B’ shadows a member of 'this' [-Wshadow]
  inline void ReplaceBraLink(int B,int L,int Val) { m_vBraLinks[B][L]=Val;};   // Set the L link for branch B to Val; returns Val;
                                                  ^
Tree.h: In member function ‘int CTree::NodeBra(int, int)’:
Tree.h:176:28: warning: declaration of ‘B’ shadows a member of 'this' [-Wshadow]
  int NodeBra(int N, int B) { return m_Node[N]->m_viBranch[B]; } // Returns Branchlink B of Node N
                            ^
In file included from bionj.cxx:20:0:
Divvier.h: In constructor ‘CPostP::CPostP(std::string)’:
Divvier.h:43:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i = 5; i < Toks.size() ; i++)  {
                    ^
Divvier.h: In member function ‘std::string CPostP::out()’:
Divvier.h:50:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i = 0 ; i < _PP.size(); i++) { ss<< "\t" << _PP[i]; }
                     ^
g++ -O3 -std=c++14 -Wall -Wmissing-prototypes -Wshadow -fmessage-length=0 -msse2 -mfpmath=sse -I/usr/local/include -c Sequence.cpp
cc1plus: warning: command line option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++
Sequence.cpp: In member function ‘void CSequence::AddSequence(std::string)’:
Sequence.cpp:35:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if(_seq.size() > _maxLength) { _maxLength = _seq.size(); }
                 ^
Sequence.cpp: In member function ‘std::string CSequence::Seq(int, bool, bool)’:
Sequence.cpp:45:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for( int i = 0 ; i < _seq.size(); i++) {
                      ^
Sequence.cpp: In function ‘EFileType TestFile(std::string)’:
Sequence.cpp:123:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           for(int i = 1; i < Toks.size() ; i++) {
                            ^
Sequence.cpp: In function ‘std::vector<CSequence>* MSFReader(std::string)’:
Sequence.cpp:200:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      for(int i = 0 ; i < Names.size(); i++) {
                        ^
Sequence.cpp:202:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
        for(int j = 1; j < Toks.size(); j++) { Seqstream[i] << Toks[j]; }
                         ^
Sequence.cpp:207:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0 ; i < Names.size(); i++) {
                       ^
Sequence.cpp: In function ‘std::vector<CSequence>* InterleavedReader(std::string)’:
Sequence.cpp:239:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0; i< Names.size(); i++) {
                     ^
Sequence.cpp:254:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0 ; i < Names.size(); i++) {
                       ^
Sequence.cpp: In function ‘std::vector<CSequence>* PhylipReader(std::string)’:
Sequence.cpp:300:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0 ; i < Names.size(); i++) {
                       ^
Sequence.cpp: In function ‘std::vector<std::basic_string<char> > Tokenise(std::string, std::string)’:
Sequence.cpp:328:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  while(i != (int)line.size()) {
          ^
gcc -O3 -Wall -Wmissing-prototypes -Wshadow  -I/usr/local/include -c utils.c
utils.c: In function ‘readSeq’:
utils.c:88:7: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
       for(int k = 0 ; k < full_seq ; k++) {
       ^
utils.c:88:7: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
utils.c:98:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
     for(int k = 0; k < alen; k++) {
     ^
make: *** [utils.o] Error 1

Any ideas? Thank you!

Best, Duo

simonwhelan commented 5 years ago

Hi Duo,

I've updated the gcc makefile options and I believe it should now work. I've tested with the gcc:4.9.4 Docker image and everything seems to compile fine, so let me know if you have any further problems.

Best,

Simon

simonwhelan commented 5 years ago

Closing this. Let me know if there are any ongoing problems and I'll fix them.