shogun-toolbox / shogun

Shōgun
http://shogun-toolbox.org
BSD 3-Clause "New" or "Revised" License
3.03k stars 1.04k forks source link

Make fail on Ubuntu 20.04.1 #5172

Closed YuliZheng closed 3 years ago

YuliZheng commented 3 years ago

WHAT I DO First thing first, I am not root on this machine, so I cannot use apt get to install shogun. So I try
git clone https://github.com/shogun-toolbox/shogun.git; cd shogun; git submodule update --init, However I got stuck in git submodule when it is cloning shogun/data. I think this is mayby some internet issue (since git clone often fails in China), so I manually download shogun.tar.gz and the gpl submodules (shogun/data, shogun/debian, shogun/src/gpl), and cmake succeed. Then I try make, however make failed.

THIS IS WHAT I GOT AFTER MAKE make [ 1%] Generating version header [ 1%] Built target version [ 1%] Built target HeadersProtobuf [ 2%] Built target rxcpp [ 2%] Built target class_list [ 2%] Performing update step for 'variant' [ 2%] No configure step for 'variant' [ 2%] No build step for 'variant' [ 3%] Performing install step for 'variant' [ 3%] Completed 'variant' [ 3%] Built target variant [ 5%] Built target StanMath [ 5%] Built target ChunksProtobuf [ 5%] Built target ShogunVersionProtobuf [ 5%] Building CXX object src/shogun/CMakeFiles/libshogun.dir/clustering/GMM.cpp.o In file included from /home/zhengyl/room/shogun/src/shogun/multiclass/KNN.h:24, from /home/zhengyl/room/shogun/src/shogun/clustering/GMM.cpp:19: /home/zhengyl/room/shogun/src/gpl/shogun/multiclass/CoverTreeKNNSolver.h:25:1: error: expected class-name before ‘{’ token 25 | { | ^ In file included from /home/zhengyl/room/shogun/src/shogun/multiclass/KNN.h:24, from /home/zhengyl/room/shogun/src/shogun/clustering/GMM.cpp:19: /home/zhengyl/room/shogun/src/gpl/shogun/multiclass/CoverTreeKNNSolver.h:44:19: error: ‘MulticlassLabels’ was not declared in this scope; did you mean ‘CMulticlassLabels’? 44 | std::shared_ptr classify_objects(std::shared_ptr d, const int32_t num_lab, SGVector& train_lab, SGVector& classes) const override; | ^~~~ | CMulticlassLabels /home/zhengyl/room/shogun/src/gpl/shogun/multiclass/CoverTreeKNNSolver.h:44:35: error: template argument 1 is invalid 44 | std::shared_ptr classify_objects(std::shared_ptr d, const int32_t num_lab, SGVector& train_lab, SGVector& classes) const override; | ^ /home/zhengyl/room/shogun/src/gpl/shogun/multiclass/CoverTreeKNNSolver.h:44:70: error: ‘Distance’ was not declared in this scope; did you mean ‘CDistance’? 44 | std::shared_ptr classify_objects(std::shared_ptr d, const int32_t num_lab, SGVector& train_lab, SGVector& classes) const override; | ^~~~ | CDistance /home/zhengyl/room/shogun/src/gpl/shogun/multiclass/CoverTreeKNNSolver.h:44:78: error: template argument 1 is invalid 44 | std::shared_ptr classify_objects(std::shared_ptr d, const int32_t num_lab, SGVector& train_lab, SGVector& classes) const override; | ^ /home/zhengyl/room/shogun/src/gpl/shogun/multiclass/CoverTreeKNNSolver.h:46:56: error: ‘Distance’ was not declared in this scope; did you mean ‘CDistance’? 46 | SGVector classify_objects_k(std::shared_ptr d, const int32_t num_lab, SGVector& train_lab, SGVector& classes) const override; | ^~~~ | CDistance /home/zhengyl/room/shogun/src/gpl/shogun/multiclass/CoverTreeKNNSolver.h:46:64: error: template argument 1 is invalid 46 | SGVector classify_objects_k(std::shared_ptr d, const int32_t num_lab, SGVector& train_lab, SGVector& classes) const override; | ^ In file included from /home/zhengyl/room/shogun/src/shogun/multiclass/KNN.h:24, from /home/zhengyl/room/shogun/src/shogun/clustering/GMM.cpp:19: /home/zhengyl/room/shogun/src/gpl/shogun/multiclass/CoverTreeKNNSolver.h:32:3: error: ‘shogun::CoverTreeKNNSolver::~CoverTreeKNNSolver()’ marked ‘override’, but does not override 32 | ~CoverTreeKNNSolver() override { / nothing to do / } | ^ In file included from /home/zhengyl/room/shogun/src/shogun/multiclass/KNN.h:24, from /home/zhengyl/room/shogun/src/shogun/clustering/GMM.cpp:19: /home/zhengyl/room/shogun/src/gpl/shogun/multiclass/CoverTreeKNNSolver.h:44:37: error: ‘int shogun::CoverTreeKNNSolver::classify_objects(int, int32_t, shogun::SGVector&, shogun::SGVector&) const’ marked ‘override’, but does not override 44 | std::shared_ptr classify_objects(std::shared_ptr d, const int32_t num_lab, SGVector& train_lab, SGVector& classes) const override; | ^~~~ /home/zhengyl/room/shogun/src/gpl/shogun/multiclass/CoverTreeKNNSolver.h:46:21: error: ‘shogun::SGVector shogun::CoverTreeKNNSolver::classify_objects_k(int, int32_t, shogun::SGVector&, shogun::SGVector&) const’ marked ‘override’, but does not override 46 | SGVector classify_objects_k(std::shared_ptr d, const int32_t num_lab, SGVector& train_lab, SGVector& classes) const override; | ^~~~~~ /home/zhengyl/room/shogun/src/gpl/shogun/multiclass/CoverTreeKNNSolver.h:49:15: error: ‘const char shogun::CoverTreeKNNSolver::get_name() const’ marked ‘override’, but does not override 49 | const char get_name() const override { return "CoverTreeKNNSolver"; } | ^~~~ In file included from /home/zhengyl/room/shogun/src/shogun/multiclass/KNN.h:24, from /home/zhengyl/room/shogun/src/shogun/clustering/GMM.cpp:19: /home/zhengyl/room/shogun/src/gpl/shogun/multiclass/CoverTreeKNNSolver.h: In constructor ‘shogun::CoverTreeKNNSolver::CoverTreeKNNSolver()’: /home/zhengyl/room/shogun/src/gpl/shogun/multiclass/CoverTreeKNNSolver.h:28:26: error: class ‘shogun::CoverTreeKNNSolver’ does not have any field named ‘KNNSolver’ 28 | CoverTreeKNNSolver() : KNNSolver() | ^~~~~ make[2]: [src/shogun/CMakeFiles/libshogun.dir/build.make:1461: src/shogun/CMakeFiles/libshogun.dir/clustering/GMM.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:286: src/shogun/CMakeFiles/libshogun.dir/all] Error 2 make: *** [Makefile:152: all] Error 2

It looks like there is something wrong with my downloaded shogun/scr/gpl I download them on https://github.com/shogun-toolbox/shogun-gpl/tree/8e361a17b48c17ebd6a0255a4f53a19fd84ea27f Could you please tell me where to download a suitable submodule? Or may by you could show me how to get away with this download and mannualy compile shit...

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

This issue is now being closed due to a lack of activity. Feel free to reopen it.