Where can I find the places in the source files that I need to adjust for my PC? This is a rust program. Compiling the previous version works. The exe file works. I use a PC with the ARCH=x86-64.
Where can I find the places in the source files that I need to adjust for my older PC?
With -Ctarget-cpu=native, it will be optimized for the CPU where you're running the compiler, and that may include using new CPU instructions. If you're going to run on a different machine, you may need to choose an older corresponding target, or just remove that option and run with the default.
Caused by:
process didn't exit successfully: C:\Users\Privat\Desktop\velvet-chess-5.2.1\velvet-chess-5.2.1\target\release\build\proc-macro2-3554e81a17608834\build-script-build (exit code: 0xc000001d, STATUS_ILLEGAL_INSTRUCTION)
--- stdout
cargo:rerun-if-changed=build.rs
warning: build failed, waiting for other jobs to finish...
Here the right version of the compiled, the *exe file ist created, but not working
Velvet Chess Engine v5.3.0
uci
id name Velvet v5.3.0
id author Martin Honert
option name Clear Hash type button
option name Hash type spin default 32 min 1 max 262144
option name MultiPV type spin default 1 min 1 max 218
option name Ponder type check default false
option name SyzygyPath type string default
option name SyzygyProbeDepth type spin default 0 min 0 max 127
option name Threads type spin default 1 min 1 max 256
option name UCI_Chess960 type check default false
option name UCI_EngineAbout type string default Velvet Chess Engine (GitHub - mhonert/velvet-chess: ♟ Velvet Chess Engine - written in Rust)
uciok
If i say go, then the console is closed.
here the other old version output:
Velvet Chess Engine v5.2.1
uci
id name Velvet v5.2.1
id author Martin Honert
option name Clear Hash type button
option name Hash type spin default 32 min 1 max 262144
option name MultiPV type spin default 1 min 1 max 218
option name Ponder type check default false
option name SyzygyPath type string default
option name SyzygyProbeDepth type spin default 0 min 0 max 127
option name Threads type spin default 1 min 1 max 256
option name UCI_Chess960 type check default false
option name UCI_EngineAbout type string default Velvet Chess Engine (GitHub - mhonert/velvet-chess: ♟ Velvet Chess Engine - written in Rust)
uciok
go depht 5
info depth 1 seldepth 1 multipv 1 score cp 22 nodes 20 nps 181818 tbhits 0 hashfull 0 time 0 pv d2d4
info depth 2 seldepth 4 multipv 1 score cp 17 nodes 136 nps 3057 tbhits 0 hashfull 0 time 44 pv e2e4 e7e5
info depth 3 seldepth 5 multipv 1 score cp 18 nodes 685 nps 2232 tbhits 0 hashfull 0 time
Caused by:
process didn't exit successfully: C:\Users\Privat\Desktop\velvet-chess-5.3.0\velvet-chess-5.3.0\target\release\build\proc-macro2-5c30343c4d453867\build-script-build (exit code: 0xc000001d, STATUS_ILLEGAL_INSTRUCTION)
--- stdout
cargo:rerun-if-changed=build.rs
warning: build failed, waiting for other jobs to finish...
core2 is just a fairly old processor that I tried; if Rust itself is generating the wrong code, then something much older like athlon might work better. Unfortunately I have a Ryzen 7 so I can’t easily test if that’s the problem.
As another way to solve this kind of problem, I might see whether I could use 32-bit Rust to compile a 32-bit executable. It could end up being more compatible.
Rust on Windows will use an illegal instruction with panic=abort set (in cargo.toml generally) - is there any chance that's set and there's some other panic happening on the older computer?
It could be that std itself is compiled against a newer instruction set, but I can't imagine anything too interesting happening there if you're on x86-64.
I learned that a compiler converts a program programmed in a high-level language into an executable program for the corresponding hardware. So I see it as a bug in rust.
Note:
Tomorrow I have the opportunity to test my program on a newer PC to see if it works there.