GValiente/pocket-tensor

Compiling issue

Closed this issue · 2 comments

Hi,

I am trying to build pocket tensor using the instructions in the README.md. My compiler is gcc 7.3.0 running on 64bit ubuntu 18.04.

The error message I get is:

make [ 1%] Building CXX object lib/CMakeFiles/pocket-tensor.dir/src/pt_tensor.cpp.o /home/paul/Documents/projects/pocket-tensor/lib/src/pt_tensor.cpp: In function ‘std::ostream& pt::operator<<(std::ostream&, const pt::Tensor&)’: /home/paul/Documents/projects/pocket-tensor/lib/src/pt_tensor.cpp:507:82: error: wrong number of template arguments (0, should be 1) std::partial_sum(dims.rbegin(), dims.rend(), steps.rbegin(), std::multiplies<>()); ^ In file included from /usr/include/c++/7/memory:76:0, from /home/paul/Documents/projects/pocket-tensor/lib/include/pt_tensor.h:12, from /home/paul/Documents/projects/pocket-tensor/lib/src/pt_tensor.cpp:8: /usr/include/c++/7/bits/stl_function.h:187:12: note: provided for ‘template<class _Tp> struct std::multiplies’ struct multiplies : public binary_function<_Tp, _Tp, _Tp> ^~~~~~~~~~ lib/CMakeFiles/pocket-tensor.dir/build.make:62: recipe for target 'lib/CMakeFiles/pocket-tensor.dir/src/pt_tensor.cpp.o' failed make[2]: *** [lib/CMakeFiles/pocket-tensor.dir/src/pt_tensor.cpp.o] Error 1 CMakeFiles/Makefile2:85: recipe for target 'lib/CMakeFiles/pocket-tensor.dir/all' failed make[1]: *** [lib/CMakeFiles/pocket-tensor.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

Regards
Paul

I have committed two build fixes for Ubuntu 18.

Please check them out.

Thanks. It works now.