LCSL / GURLS

GURLS: a Least Squares Library for Supervised Learning
http://lcsl.mit.edu/#/downloads/gurls
63 stars 37 forks source link

Build problems with several compilers #9

Closed traversaro closed 10 years ago

traversaro commented 10 years ago

I have problem in building GURLS on Ubuntu 13.10, gcc 4.8.1, during the build I get this error:

[ 47%] Building CXX object gurls++/CMakeFiles/gurls++.dir/src/gmath.cpp.o
In file included from /home/pegua/src/GURLS/gurls++/src/gmath.cpp:45:0:
/home/pegua/src/GURLS/gurls++/include/gurls++/gmat2d.hpp: In member function ‘gurls::gMat2D<bool>& gurls::gMat2D<T>::operator==(T) const’:
/home/pegua/src/GURLS/gurls++/include/gurls++/gmat2d.hpp:286:47: error: expression list treated as compound expression in initializer [-fpermissive]
     gMat2D<bool> *w(this->rows(), this->cols());
                                               ^                                       

While on Ubuntu 12.04, clang 3.3, during the build I get this error:

[ 52%] Building CXX object gurls++/CMakeFiles/gurls++.dir/src/gmath.cpp.o
In file included from /home/travis/build/traversaro/GURLS/gurls++/src/gmath.cpp:44:
In file included from /home/travis/build/traversaro/GURLS/gurls++/include/gurls++/gmat2d.h:60:
In file included from /home/travis/build/traversaro/GURLS/gurls++/include/gurls++/gvec.h:334:
/home/travis/build/traversaro/GURLS/gurls++/include/gurls++/gvec.hpp:111:12: error: 
      no viable conversion from 'gVec<unsigned int>' to
      'gVec<unsigned long>'
    return indexes;
           ^~~~~~~
/home/travis/build/traversaro/GURLS/gurls++/include/gurls++/gvec.h:76:5: note: 
      candidate constructor not viable: no known conversion from
      'gVec<unsigned int>' to 'unsigned long' for 1st argument
    gVec(unsigned long n = 0);
    ^
/home/travis/build/traversaro/GURLS/gurls++/include/gurls++/gvec.h:86:5: note: 
      candidate constructor not viable: no known conversion from
      'gVec<unsigned int>' to 'const gVec<unsigned long> &' for 1st argument
    gVec(const gVec<T>& other);
    ^
In file included from /home/travis/build/traversaro/GURLS/gurls++/src/gmath.cpp:44:
In file included from /home/travis/build/traversaro/GURLS/gurls++/include/gurls++/gmat2d.h:537:
/home/travis/build/traversaro/GURLS/gurls++/include/gurls++/gmat2d.hpp:95:18: error: 
      member reference base type 'gMat2D<T> *' is not a structure or union
        copy(this.data + r +((c+i)*this->numrows), other.data + (i*other...
             ~~~~^~~~~
2 errors generated.
matteosantoro commented 10 years ago

Build problems have been fixed