pytorch / ELF

ELF: a platform for game research with AlphaGoZero/AlphaZero reimplementation
Other
3.37k stars 567 forks source link

Unused parameter fails build #36

Closed Ricocotam closed 6 years ago

Ricocotam commented 6 years ago

Hi all, I'm trying to build ELF and I got this :

ELF/src_cpp/elf/ai/tree_search/tree_search_base.h:65:24: error: unused parameter 's' [-Werror,-Wunused-parameter]
  moves_since(const S& s, size_t* next_move_number, std::vector<A>* moves) {
                       ^

ELF/src_cpp/elf/ai/tree_search/tree_search_base.h:65:35: error: unused parameter 'next_move_number' [-Werror,-Wunused-parameter]
  moves_since(const S& s, size_t* next_move_number, std::vector<A>* moves) {
                                  ^

ELF/src_cpp/elf/ai/tree_search/tree_search_base.h:65:69: error: unused parameter 'moves' [-Werror,-Wunused-parameter]
  moves_since(const S& s, size_t* next_move_number, std::vector<A>* moves) {
                                                                    ^

ELF/src_cpp/elf/ai/tree_search/tree_search_base.h:87:45: error: unused parameter 'a' [-Werror,-Wunused-parameter]
  static std::string to_string(const Actor& a) {

Thanks for the help. And good luck for the dev

yuandong-tian commented 6 years ago

Interesting. Which C++ version did you use to compile?

Ricocotam commented 6 years ago

After some investigation, I couldn't find which C++ version I used. I just ran make in the appropriate directory. BUT I noticed make is detecting python2.7 as the version to used, might it come from this ? And how to specify which python version to use ? I'm not new to python but I am to C++

qucheng commented 6 years ago

type g++ -v to find out the c++ version. You need C++ 7.x. You also need Python 3.x. Try cmake .. -DPYTHON_EXECUTABLE=~/path/to/python3.6

Ricocotam commented 6 years ago

I checked my g++ version and i get 4.2.1. But I compiled another project in c++ 11.. I installed the latest gcc version but is it safe to replace default g++ my g++8, and if not how to set it ?

Thanks for your help

jma127 commented 6 years ago

I can't think of any issue with GCC 8 off the top of my head, but can't promise that it'll work flawlessly.

You can override the compiler with export CC=your-c-compiler and export CXX=your-cpp-compiler .

ppwwyyxx commented 6 years ago

@Ricocotam could you try removing "-Werror" at https://github.com/pytorch/ELF/blob/113aba73ec0bc9d60bdb00b3c439bc60fecabc89/CMakeLists.txt#L46 ?

Ricocotam commented 6 years ago

I made aliases and the right link to python3

Then I started the make and I have a library missing (ZeroMQ). I'm trying to resolve that and update this

Edit : after several minutes trying to understand how to heck it doesn't work I'll just abandon. When I install ZeroMQ it says I need pkg-config. When I install pkg-config, I need glib. When I install glib, everything goes well. Then I install pkg-config and it says "no glib installed". I sometimes hate installers !