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

compile errors on Linux #3

Open
tissatussa opened this issue Feb 1, 2023 · 2 comments
Open

compile errors on Linux #3

tissatussa opened this issue Feb 1, 2023 · 2 comments

Comments

@tissatussa
Copy link

tissatussa commented Feb 1, 2023

hi, i try to compile your source code on Xubuntu 22.04 but it get errors :

$ make no_egtb
test -e book.in || gunzip -k book.in.gz
g++ -Wall -Wno-char-subscripts -O3 -D USE_BOOK=1 -D USE_EGTB=0 -D USE_HASH=1 -D WEAKENED=0 -c -o bin/hash.o hash.cc
In file included from hash.cc:22:
hash.h:32:3: error: reference tobyteis ambiguous
   32 |   byte depth;
      |   ^~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:61,
                 from /usr/include/c++/11/bits/char_traits.h:39,
                 from /usr/include/c++/11/ios:40,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from hash.cc:19:
/usr/include/c++/11/bits/cpp_type_traits.h:404:30: note: candidates are: ‘enum class std::byte404 |   enum class byte : unsigned char;
      |                              ^~~~
In file included from hash.h:22,
                 from hash.cc:22:
common.h:84:23: note:                 ‘typedef unsigned char byte84 | typedef unsigned char byte;
      |                       ^~~~
In file included from hash.cc:22:
hash.h:34:3: error: reference tobyteis ambiguous
   34 |   byte type;
      |   ^~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:61,
                 from /usr/include/c++/11/bits/char_traits.h:39,
                 from /usr/include/c++/11/ios:40,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from hash.cc:19:
/usr/include/c++/11/bits/cpp_type_traits.h:404:30: note: candidates are: ‘enum class std::byte404 |   enum class byte : unsigned char;
      |                              ^~~~
In file included from hash.h:22,
                 from hash.cc:22:
common.h:84:23: note:                 ‘typedef unsigned char byte84 | typedef unsigned char byte;
      |                       ^~~~
In file included from hash.cc:22:
hash.h:35:3: error: reference tobyteis ambiguous
   35 |   byte best_move;
      |   ^~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:61,
                 from /usr/include/c++/11/bits/char_traits.h:39,
                 from /usr/include/c++/11/ios:40,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from hash.cc:19:
/usr/include/c++/11/bits/cpp_type_traits.h:404:30: note: candidates are: ‘enum class std::byte404 |   enum class byte : unsigned char;
      |                              ^~~~
In file included from hash.h:22,
                 from hash.cc:22:
common.h:84:23: note:                 ‘typedef unsigned char byte84 | typedef unsigned char byte;
      |                       ^~~~
make: *** [Makefile:54: bin/hash.o] Error 1

i know a little C(++) and i try to find a solution to change the code somehow, but i don't succeed .. it seems some code lines are typical Windows, even maybe 32-bit related, am i right ? However, it seems you still work on this project, how can the code be used on 64-bit machines, what should i adjust to compile on Linux ?

@visanalexandru
Copy link
Contributor

@tissatussa, i have fixed the build errors and opened a pull request : visanalexandru@c08ec67

@CatalinFrancu
Copy link
Owner

Fixed in c08ec67, thanks @visanalexandru!

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

3 participants