Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when trying to build AlphaZero torch version #990

Closed
rezunli96 opened this issue Jan 8, 2023 · 2 comments
Closed

Issue when trying to build AlphaZero torch version #990

rezunli96 opened this issue Jan 8, 2023 · 2 comments

Comments

@rezunli96
Copy link
Contributor

Hello, I am following the steps described in here. But when I am doing step 5, there were errors like:

/Users/lizun/open_spiel_tmp/open_spiel_alphazero/open_spiel/libtorch/libtorch/include/pybind11/detail/common.h:339:12: error:
      redefinition of 'return_value_policy'
enum class return_value_policy : uint8_t {
           ^
/Users/lizun/open_spiel_tmp/open_spiel_alphazero/open_spiel/../pybind11/include/pybind11/detail/common.h:488:12: note:
      previous definition is here
enum class return_value_policy : uint8_t {
           ^
In file included from /Users/lizun/open_spiel_tmp/open_spiel_alphazero/open_spiel/python/pybind11/games_gin_rummy.cc:28:
In file included from /Users/lizun/open_spiel_tmp/open_spiel_alphazero/open_spiel/python/../pybind11_abseil/pybind11_abseil/absl_casters.h:33:
In file included from /Users/lizun/open_spiel_tmp/open_spiel_alphazero/open_spiel/libtorch/libtorch/include/pybind11/cast.h:13:
In file included from /Users/lizun/open_spiel_tmp/open_spiel_alphazero/open_spiel/libtorch/libtorch/include/pybind11/pytypes.h:12:
/Users/lizun/open_spiel_tmp/open_spiel_alphazero/open_spiel/libtorch/libtorch/include/pybind11/detail/common.h:392:48: error:
      redefinition of default argument
inline static constexpr int log2(size_t n, int k = 0) { return (n <= 1) ? k : log2(n >> 1, k + 1); }
                                               ^   ~
/Users/lizun/open_spiel_tmp/open_spiel_alphazero/open_spiel/../pybind11/include/pybind11/detail/common.h:565:48: note:
      previous definition is here
inline static constexpr int log2(size_t n, int k = 0) {

It looks like during the building process it generates a file ./open_spiel/libtorch/libtorch/include/pybind11/detail/common.h, which conflicts with ./pybind11/include/pybind11/detail/common.h

@lanctot
Copy link
Collaborator

lanctot commented Jan 9, 2023

Right, this is a known problem: take a look here for a workaround: #966.

We will try to fix it soon.

@lanctot
Copy link
Collaborator

lanctot commented Jan 9, 2023

I've amended the docs now with this info, until we can fix it: e75bdf1

@lanctot lanctot closed this as completed Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants