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

Stockfish nnue with learn fails to compile on Ubuntu 18.04 due to a missing declaration #92

Closed
hero2017 opened this issue Aug 25, 2020 · 1 comment

Comments

@hero2017
Copy link

hero2017 commented Aug 25, 2020

learn/learner.cpp:959:22: error: ‘INT_MIN’ was not declared in this scope
959 | int search_depth2 = INT_MIN;
| ^~~
learn/learner.cpp:87:1: note: ‘INT_MIN’ is defined in header ‘’; did you forget to ‘#include ’?
86 | #include "../nnue/evaluate_nnue_learner.h"
+++ |+#include
87 | #include <shared_mutex>
...
make[1]: *** [: learner.o] Error 1

The fix is to do just what it says; insert a new line in learn/learner.cpp after line 86: #include <climits> (thanks nodchip)

I'm not sure if this is specific to Ubuntu 18.04 and gcc v10.x but probably if we're defining something in header then we should declare it.

Please see if it makes sense to add this declaration to learner.cpp so Ubuntu users so Ubuntu users don't have to always add this fix for the current release and possibly future releases. Thanks in advance.

@nodchip
Copy link
Owner

nodchip commented Aug 25, 2020

Thank you for reporting an issue. Could you please create a pull request to fix it? Currently a regression test to release a new binary set is on going. I will merge your pull request after it is finished.

hero2017 added a commit to hero2017/Stockfish that referenced this issue Aug 26, 2020
If we're defining something in a header then we should declare it.
hero2017 added a commit to hero2017/Stockfish that referenced this issue Aug 26, 2020
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