Chess engines compilation

Moderators: Elijah, Igbo, timetraveller

kramnik

Top contribute Forum
Forum Contributions
Points: 40 305,00 
Posts: 1924
Joined: 04/11/2019, 14:45
Status: Offline (Active 3 Months, 6 Days, 12 Hours, 39 Minutes ago)
Medals: 1
Topics: 71
Reputation: 2388
Location: North-Italy
Has thanked: 1185 times
Been thanked: 2951 times

Chess engines compilation

Post by kramnik »

I'm getting this kind of error compiling Sugar-NN from https://github.com/Zerbinati/SugaR-NN
Massimiliano Goi@DESKTOP MINGW64 ~
$ cd SugaR-NN-master/src/

Massimiliano Goi@DESKTOP MINGW64 ~/SugaR-NN-master/src
$ make build ARCH=x86-64

Config:
debug: 'no'
sanitize: 'no'
optimize: 'yes'
arch: 'x86_64'
bits: '64'
kernel: 'MINGW64_NT-6.3-9600'
os: 'Windows_NT'
prefetch: 'yes'
popcnt: 'no'
sse: 'yes'
pext: 'no'

Flags:
CXX: g++
CXXFLAGS: -Wall -Wcast-qual -std=c++11 -pedantic -Wextra -Wshadow -m64 -DNDEBUG -O3 -DIS_64BIT -msse -flto
LDFLAGS: -lcurl -lws2_32 -m64 -Wl,--no-as-needed -lpthread -Wall -Wcast-qual -std=c++11 -pedantic -Wextra -Wshadow -m64 -DNDEBUG -O3 -DIS_64BIT -msse -flto

Testing config sanity. If this fails, try 'make help' ...

make ARCH=x86-64 COMP=gcc all
make[1]: Entering directory '/home/Massimiliano Goi/SugaR-NN-master/src'
g++ -o sugar benchmark.o bitbase.o bitboard.o endgame.o evaluate.o main.o material.o misc.o movegen.o movepick.o pawns.o position.o psqt.o search.o thread.o timeman.o tt.o uci.o ucioption.o polybook.o syzygy/tbprobe.o -lcurl -lws2_32 -m64 -Wl,--no-as-needed -lpthread -Wall -Wcast-qual -std=c++11 -pedantic -Wextra -Wshadow -m64 -DNDEBUG -O3 -DIS_64BIT -msse -flto
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: benchmark.o:benchmark.cpp:(.text+0x1e): undefined reference to `__gcov_indirect_call_profiler_v3'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: benchmark.o:benchmark.cpp:(.text+0x18d): undefined reference to `__gcov_indirect_call_profiler_v3'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: benchmark.o:benchmark.cpp:(.text+0x1de): undefined reference to `__gcov_indirect_call_profiler_v3'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: benchmark.o:benchmark.cpp:(.text+0x52e): undefined reference to `__gcov_one_value_profiler'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: benchmark.o:benchmark.cpp:(.text+0x53f): undefined reference to `__gcov_average_profiler'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: benchmark.o:benchmark.cpp:(.text+0x54e): undefined reference to `__gcov_ior_profiler'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: benchmark.o:benchmark.cpp:(.text+0xc63): undefined reference to `__gcov_one_value_profiler'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: benchmark.o:benchmark.cpp:(.text+0xc74): undefined reference to `__gcov_average_profiler'
the list goes on for hundreds of lines. Someone can help, please?
hagtorp
Forum Contributions
Points: 19 796,00 
Posts: 159
Joined: 04/11/2019, 3:15
Status: Offline (Active 7 Months, 1 Day, 15 Hours, 43 Minutes ago)
Topics: 3
Reputation: 30
Has thanked: 9 times
Been thanked: 24 times

Chess engines compilation

Post by hagtorp »

You do not have the libgcov library connected ( -lgcov).
Do this: make profile-build ARCH=x86-64 or add:
  LDFLAGS += -lgcov
kramnik

Top contribute Forum
Forum Contributions
Points: 40 305,00 
Posts: 1924
Joined: 04/11/2019, 14:45
Status: Offline (Active 3 Months, 6 Days, 12 Hours, 39 Minutes ago)
Medals: 1
Topics: 71
Reputation: 2388
Location: North-Italy
Has thanked: 1185 times
Been thanked: 2951 times

Chess engines compilation

Post by kramnik »

Making make profile-build ARCH=x86-64 produces a 346 KB that needs some cygwin library and it's not undependent, not my case of things.

The other option produces a 423 KB executable, that is not the standard stockfish-like weight.
hagtorp wrote:You do not have the libgcov library connected ( -lgcov).
Do this: make profile-build ARCH=x86-64 or add:
  LDFLAGS += -lgcov
M.Z

Top contribute Forum Engines Maker
Founder
Points: 31 377,00 
Forum Contributions
Posts: 1456
Joined: 31/10/2019, 8:50
Status: Offline (Active 6 Hours, 41 Minutes ago)
Medals: 2
Topics: 217
Reputation: 4118
Has thanked: 655 times
Been thanked: 3111 times

Chess engines compilation

Post by M.Z »

kramnik wrote:I'm getting this kind of error compiling Sugar-NN from https://github.com/Zerbinati/SugaR-NN



the list goes on for hundreds of lines. Someone can help, please?
Hi Massimiliano,
you have to copy to the subfolders of MinGW 32\64

32
the curl folder to:
i686-w64-mingw32\include\
file libcurl.a to:
i686-w64-mingw32\lib

64
the curl folder to:
x86_w64-mingw32\include
file libcurl.a to:
x86_w64-mingw32\lib

Curl library 32-64 Bit
kramnik

Top contribute Forum
Forum Contributions
Points: 40 305,00 
Posts: 1924
Joined: 04/11/2019, 14:45
Status: Offline (Active 3 Months, 6 Days, 12 Hours, 39 Minutes ago)
Medals: 1
Topics: 71
Reputation: 2388
Location: North-Italy
Has thanked: 1185 times
Been thanked: 2951 times

Chess engines compilation

Post by kramnik »

Image

Produced exe small and it's not working...

M.Z wrote:
kramnik wrote:I'm getting this kind of error compiling Sugar-NN from https://github.com/Zerbinati/SugaR-NN



the list goes on for hundreds of lines. Someone can help, please?
Hi Massimiliano,
you have to copy to the subfolders of MinGW 32\64

32
the curl folder to:
i686-w64-mingw32\include\
file libcurl.a to:
i686-w64-mingw32\lib

64
the curl folder to:
x86_w64-mingw32\include
file libcurl.a to:
x86_w64-mingw32\lib

Curl library 32-64 Bit
M.Z

Top contribute Forum Engines Maker
Founder
Points: 31 377,00 
Forum Contributions
Posts: 1456
Joined: 31/10/2019, 8:50
Status: Offline (Active 6 Hours, 41 Minutes ago)
Medals: 2
Topics: 217
Reputation: 4118
Has thanked: 655 times
Been thanked: 3111 times

Chess engines compilation

Post by M.Z »

kramnik wrote:Image

Produced exe small and it's not working...

M.Z wrote:
kramnik wrote:I'm getting this kind of error compiling Sugar-NN from https://github.com/Zerbinati/SugaR-NN



the list goes on for hundreds of lines. Someone can help, please?
Hi Massimiliano,
you have to copy to the subfolders of MinGW 32\64

32
the curl folder to:
i686-w64-mingw32\include\
file libcurl.a to:
i686-w64-mingw32\lib

64
the curl folder to:
x86_w64-mingw32\include
file libcurl.a to:
x86_w64-mingw32\lib

Curl library 32-64 Bit
Massimiliano if your operating system and Windows, the steps I have indicated are correct.
Have you changed the Makefile?
kramnik

Top contribute Forum
Forum Contributions
Points: 40 305,00 
Posts: 1924
Joined: 04/11/2019, 14:45
Status: Offline (Active 3 Months, 6 Days, 12 Hours, 39 Minutes ago)
Medals: 1
Topics: 71
Reputation: 2388
Location: North-Italy
Has thanked: 1185 times
Been thanked: 2951 times

Chess engines compilation

Post by kramnik »

No, what I have to change?
M.Z wrote:Massimiliano if your operating system and Windows, the steps I have indicated are correct.
Have you changed the Makefile?
M.Z

Top contribute Forum Engines Maker
Founder
Points: 31 377,00 
Forum Contributions
Posts: 1456
Joined: 31/10/2019, 8:50
Status: Offline (Active 6 Hours, 41 Minutes ago)
Medals: 2
Topics: 217
Reputation: 4118
Has thanked: 655 times
Been thanked: 3111 times

Chess engines compilation

Post by M.Z »

kramnik wrote:No, what I have to change?
M.Z wrote:Massimiliano if your operating system and Windows, the steps I have indicated are correct.
Have you changed the Makefile?
you don't have to edit the Makefile, just a question for safety.
Check that you have copied the libraries to the correct paths.
If you don't solve, I'm available to help you with TeamViewer.

Image
kramnik

Top contribute Forum
Forum Contributions
Points: 40 305,00 
Posts: 1924
Joined: 04/11/2019, 14:45
Status: Offline (Active 3 Months, 6 Days, 12 Hours, 39 Minutes ago)
Medals: 1
Topics: 71
Reputation: 2388
Location: North-Italy
Has thanked: 1185 times
Been thanked: 2951 times

Chess engines compilation

Post by kramnik »

Yes, I've placed them there sm59 at this point I have no clues.

I wonder what particularly SugaR-NN and BrainLearn have to raise this error... I'm o k with any other engine source...
M.Z

Top contribute Forum Engines Maker
Founder
Points: 31 377,00 
Forum Contributions
Posts: 1456
Joined: 31/10/2019, 8:50
Status: Offline (Active 6 Hours, 41 Minutes ago)
Medals: 2
Topics: 217
Reputation: 4118
Has thanked: 655 times
Been thanked: 3111 times

Chess engines compilation

Post by M.Z »

kramnik wrote:Yes, I've placed them there sm59 at this point I have no clues.

I wonder what particularly SugaR-NN and BrainLearn have to raise this error... I'm o k with any other engine source...
Both integrate the Book Live code.
kramnik

Top contribute Forum
Forum Contributions
Points: 40 305,00 
Posts: 1924
Joined: 04/11/2019, 14:45
Status: Offline (Active 3 Months, 6 Days, 12 Hours, 39 Minutes ago)
Medals: 1
Topics: 71
Reputation: 2388
Location: North-Italy
Has thanked: 1185 times
Been thanked: 2951 times

Chess engines compilation

Post by kramnik »

I have uninstalled msys2, installed mingw and did what you said (added the folder and the library). I have cleaned the PATH, actually the only global variable is C:\ndk-bundle\toolchains\llvm\prebuilt\windows\bin;

Now what I have to do?
M.Z wrote:
kramnik wrote:No, what I have to change?
M.Z wrote:Massimiliano if your operating system and Windows, the steps I have indicated are correct.
Have you changed the Makefile?
you don't have to edit the Makefile, just a question for safety.
Check that you have copied the libraries to the correct paths.
If you don't solve, I'm available to help you with TeamViewer.

Image
M.Z

Top contribute Forum Engines Maker
Founder
Points: 31 377,00 
Forum Contributions
Posts: 1456
Joined: 31/10/2019, 8:50
Status: Offline (Active 6 Hours, 41 Minutes ago)
Medals: 2
Topics: 217
Reputation: 4118
Has thanked: 655 times
Been thanked: 3111 times

Chess engines compilation

Post by M.Z »

kramnik wrote:I have uninstalled msys2, installed mingw and did what you said (added the folder and the library). I have cleaned the PATH, actually the only global variable is C:\ndk-bundle\toolchains\llvm\prebuilt\windows\bin;

Now what I have to do?
Use the paths I have indicated to you.
Make a clean installation
Why do you install MinGW inside the software for Android? :boh:
kramnik

Top contribute Forum
Forum Contributions
Points: 40 305,00 
Posts: 1924
Joined: 04/11/2019, 14:45
Status: Offline (Active 3 Months, 6 Days, 12 Hours, 39 Minutes ago)
Medals: 1
Topics: 71
Reputation: 2388
Location: North-Italy
Has thanked: 1185 times
Been thanked: 2951 times

Chess engines compilation

Post by kramnik »

Opening the mingw-w64.bat shell inside MinGW:
C:\MinGW>echo off
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\>cd SugaR-NN-master

C:\SugaR-NN-master>cd src

C:\SugaR-NN-master\src>make help
'make' is not recognized as an internal or external command,
operable program or batch file.

C:\SugaR-NN-master\src>
Text of the BAT file:
echo off
set PATH=C:\MinGW\bin\bin;%PATH%
rem echo %PATH%
rem cd "C:\MinGW\bin\bin"
cd "C:\"
"C:\Windows\system32\cmd.exe"
I apologize if I seem tedious but I prefere to get a slow, explicative way so that everyone can read and understand how to do to compile.
M.Z

Top contribute Forum Engines Maker
Founder
Points: 31 377,00 
Forum Contributions
Posts: 1456
Joined: 31/10/2019, 8:50
Status: Offline (Active 6 Hours, 41 Minutes ago)
Medals: 2
Topics: 217
Reputation: 4118
Has thanked: 655 times
Been thanked: 3111 times

Chess engines compilation

Post by M.Z »

kramnik wrote:Opening the mingw-w64.bat shell inside MinGW:
C:\MinGW>echo off
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\>cd SugaR-NN-master

C:\SugaR-NN-master>cd src

C:\SugaR-NN-master\src>make help
'make' is not recognized as an internal or external command,
operable program or batch file.

C:\SugaR-NN-master\src>
Text of the BAT file:
echo off
set PATH=C:\MinGW\bin\bin;%PATH%
rem echo %PATH%
rem cd "C:\MinGW\bin\bin"
cd "C:\"
"C:\Windows\system32\cmd.exe"
I apologize if I seem tedious but I prefere to get a slow, explicative way so that everyone can read and understand how to do to compile.
The slow and explanatory way is well explained through the screen shoot
All you have to do is apply the steps I have illustrated and fill in as you have always done.
If you read above, I wrote that I am also available to help you through TeamViewer, you can contact me without hesitation.
kramnik

Top contribute Forum
Forum Contributions
Points: 40 305,00 
Posts: 1924
Joined: 04/11/2019, 14:45
Status: Offline (Active 3 Months, 6 Days, 12 Hours, 39 Minutes ago)
Medals: 1
Topics: 71
Reputation: 2388
Location: North-Italy
Has thanked: 1185 times
Been thanked: 2951 times

Chess engines compilation

Post by kramnik »

M.Z wrote:The slow and explanatory way is well explained through the screen shoot
All you have to do is apply the steps I have illustrated and fill in as you have always done.
If you read above, I wrote that I am also available to help you through TeamViewer, you can contact me without hesitation.
There are just two screenshot not related to how to set the path to the make.exe command, g++.exe and such.
Post Reply

Return to “Programming, Technical Discussions, Chess related questions etc.”