Sugar NN for Mac

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

Moderators: hgm, Rebel, chrisw

maxdeg
Posts: 229
Joined: Thu Mar 10, 2016 6:17 pm
Location: Canada

Sugar NN for Mac

Post by maxdeg »

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 10:41 am

Re: Sugar NN for Mac

Post by Max »

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: 229
Joined: Thu Mar 10, 2016 6:17 pm
Location: Canada

Re: Sugar NN for Mac

Post by maxdeg »

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

Re: Sugar NN for Mac

Post by thunderstruck »

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: 229
Joined: Thu Mar 10, 2016 6:17 pm
Location: Canada

Re: Sugar NN for Mac

Post by maxdeg »

@thunderstruck

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