Skip to content

problem in 'make' #50

@biopolyhedron

Description

@biopolyhedron

Dear gabraham,

I downloaded flashpca2 using git clone as mentioned in README.md , and installed Eigen 3.3.9 and Spectra as instructed without problem. Then I entered flashpca/ folder, changed the including folders of eigen, boost and spectra in Makefile and then 'make', then I got these error informations (too long, I just copy the first and last few lines):

~/Downloads/flashpca$ make
g++ -I/usr/local/include/Spectra -I/usr/local/include/boost -I/usr/local/include/eigen3 -march=native -std=c++0x -O3 -DNDEBUG -DVERSION=\"2.1\" -funroll-loops -ftree-vectorize -ffast-math -c randompca.cpp -o randompca.o
randompca.cpp: In member function ‘void RandomPCA::pca_fast(Eigen::MatrixXd&, unsigned int, unsigned int, unsigned int, double, long int, bool)’:
randompca.cpp:133:16: error: ‘LARGEST_ALGE’ is not a member of ‘Spectra’
  133 |       Spectra::LARGEST_ALGE, SVDWide> eigs(&op, ndim, ndim * 2 + 1);
      |                ^~~~~~~~~~~~
randompca.cpp:133:16: error: ‘LARGEST_ALGE’ is not a member of ‘Spectra’
randompca.cpp:133:37: error: wrong number of template arguments (3, should be at least 0)
  133 |       Spectra::LARGEST_ALGE, SVDWide> eigs(&op, ndim, ndim * 2 + 1);
      |                                     ^
In file included from randompca.h:23,
                 from randompca.cpp:11:
/usr/local/include/Spectra/SymEigsSolver.h:134:7: note: provided for ‘template<class OpType> class Spectra::SymEigsSolver’
  134 | class SymEigsSolver : public SymEigsBase<OpType, IdentityBOp>
      |       ^~~~~~~~~~~~~
randompca.cpp:133:67: error: expression list treated as compound expression in initializer [-fpermissive]
  133 |       Spectra::LARGEST_ALGE, SVDWide> eigs(&op, ndim, ndim * 2 + 1);
      |                                                                   ^
randompca.cpp:135:9: error: request for member ‘init’ in ‘eigs’, which is of non-class type ‘int’
  135 |    eigs.init();
      |         ^~~~
randompca.cpp:136:9: error: request for member ‘compute’ in ‘eigs’, which is of non-class type ‘int’
  136 |    eigs.compute(maxiter, tol);
      |         ^~~~~~~
randompca.cpp:144:12: error: request for member ‘info’ in ‘eigs’, which is of non-class type ‘int’
  144 |    if(eigs.info() == Spectra::SUCCESSFUL)
      |            ^~~~
randompca.cpp:144:31: error: ‘SUCCESSFUL’ is not a member of ‘Spectra’
  144 |    if(eigs.info() == Spectra::SUCCESSFUL)
      |                               ^~~~~~~~~~
randompca.cpp:146:16: error: request for member ‘eigenvectors’ in ‘eigs’, which is of non-class type ‘int’
  146 |       U = eigs.eigenvectors();
      |                ^~~~~~~~~~~~
randompca.cpp:148:16: error: request for member ‘eigenvalues’ in ‘eigs’, which is of non-class type ‘int’
  148 |       d = eigs.eigenvalues().array() / div;
      |                ^~~~~~~~~~~
randompca.cpp:164:43: error: request for member ‘info’ in ‘eigs’, which is of non-class type ‘int’
  164 |      + ", status: " + std::to_string(eigs.info()));
      |                                           ^~~~
randompca.cpp: In member function ‘void RandomPCA::pca_fast(Data&, unsigned int, unsigned int, unsigned int, double, long int, bool)’:
randompca.cpp:174:44: error: ‘LARGEST_ALGE’ is not a member of ‘Spectra’
  174 |    Spectra::SymEigsSolver<double, Spectra::LARGEST_ALGE,
      |                                            ^~~~~~~~~~~~
...
...
...
randompca.cpp:186:31: error: ‘SUCCESSFUL’ is not a member of ‘Spectra’
  186 |    if(eigs.info() == Spectra::SUCCESSFUL)
      |                               ^~~~~~~~~~
randompca.cpp:188:16: error: request for member ‘eigenvectors’ in ‘eigs’, which is of non-class type ‘int’
  188 |       U = eigs.eigenvectors();
      |                ^~~~~~~~~~~~
randompca.cpp:190:16: error: request for member ‘eigenvalues’ in ‘eigs’, which is of non-class type ‘int’
  190 |       d = eigs.eigenvalues().array() / div;
      |                ^~~~~~~~~~~
randompca.cpp:216:43: error: request for member ‘info’ in ‘eigs’, which is of non-class type ‘int’
  216 |      + ", status: " + std::to_string(eigs.info()));
      |                                           ^~~~
make: *** [Makefile:54: randompca.o] Error 1

What could I do for fixing it? Thank you!
polyhedron

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions