Sugar NN for Mac

Discussion of anything and everything relating to chess playing software and machines.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
maxdeg
Posts: 196
Joined: Thu Mar 10, 2016 5:17 pm
Location: Canada

Sugar NN for Mac

Post by maxdeg » Tue Jan 14, 2020 8:42 am

Trying to compile the latest Sugar NN for my Mac - this error popped up - need help here please .. many thanks .. :D

g++ -Wall -Wcast-qual -std=c++11 -pedantic -Wextra -Wshadow -m64 -arch x86_64 -mmacosx-version-min=10.9 -DNDEBUG -O3 -mdynamic-no-pic -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_PEXT -msse4 -mbmi2 -flto -c -o tt.o tt.cpp
tt.cpp:42:10: fatal error: 'windows.h' file not found
#include "windows.h"
^~~~~~~~~~~
1 error generated.
make[1]: *** [tt.o] Error 1
make: *** [build] Error 2
➜ src

Max
Posts: 247
Joined: Tue Apr 13, 2010 8:41 am

Re: Sugar NN for Mac

Post by Max » Tue Jan 14, 2020 10:41 am

Looks like the author is aware of this issue (for Linux). But no solution yet.
Hope we're not just the biological boot loader for digital super intelligence. Unfortunately, that is increasingly probable - Elon Musk

maxdeg
Posts: 196
Joined: Thu Mar 10, 2016 5:17 pm
Location: Canada

Re: Sugar NN for Mac

Post by maxdeg » Tue Jan 14, 2020 11:45 am

Max wrote:
Tue Jan 14, 2020 10:41 am
Looks like the author is aware of this issue (for Linux). But no solution yet.
OK - many thanks .. :D

thunderstruck
Posts: 45
Joined: Tue Jul 19, 2016 8:19 am

Re: Sugar NN for Mac

Post by thunderstruck » Tue Jan 14, 2020 8:04 pm

I could compile it for Linux applying these fixes.

# windows.h: No such file or directory
sed -i 's|#include "windows.h"||' tt.cpp

# Disable large pages code for Linux
sed -i '92i#ifdef _WIN32' tt.cpp
sed -i '145i#endif' tt.cpp
sed -i '162i#ifdef _WIN32' tt.cpp
sed -i '164i#endif' tt.cpp
sed -i '170i#ifdef _WIN32' tt.cpp
sed -i '174i#endif' tt.cpp
sed -i '180i#ifdef _WIN32' tt.cpp
sed -i '182i#endif' tt.cpp
sed -i '186i#ifdef _WIN32' tt.cpp
sed -i '190i#endif' tt.cpp
sed -i '195i#ifdef _WIN32' tt.cpp
sed -i '197i#endif' tt.cpp
sed -i '199i#ifdef _WIN32' tt.cpp
sed -i '228i#endif' tt.cpp

# /usr/bin/ld: cannot find -lws2_32
sed -i 's| -lws2_32||' Makefile

And compile : make profile-build ARCH=x86-64-bmi2 COMP=gcc

maxdeg
Posts: 196
Joined: Thu Mar 10, 2016 5:17 pm
Location: Canada

Re: Sugar NN for Mac

Post by maxdeg » Thu Jan 16, 2020 12:03 pm

@thunderstruck

Thanks .. :D .. will try this weekend - hope it works !

Post Reply