Open ruffianeo opened 2 months ago
see https://github.com/official-stockfish/Stockfish/issues/4026 for some previous talk about this, there are also some other aspects of why static linking on linux is not recommended.
https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html
Apparently gcc 10 is the default for debian 11.. quite old tbh given that it just became LTS.
GCC 11.1.0: GLIBCXX_3.4.29, CXXABI_1.3.13
are you able to easily install gcc 11.1?
Out of curiosity what is stockfish currently linking to on linux? On windows ldd output is:
ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x7ffcf4510000)
KERNEL32.DLL => /c/Windows/System32/KERNEL32.DLL (0x7ffcf3180000)
KERNELBASE.dll => /c/Windows/System32/KERNELBASE.dll (0x7ffcf1890000)
linux-vdso.so.1 (0x00007fff4af3d000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f033e704000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f033e61d000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f033e5fd000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f033e3d4000)
/lib64/ld-linux-x86-64.so.2 (0x00007f03435b0000
windows has static linking, due to the nature of libraries generally missing there
On linux package maintainers do a fairly good job at tracking the most recent releases.
https://packages.debian.org/search?keywords=stockfish https://packages.fedoraproject.org/pkgs/stockfish/stockfish/ (already at 17) https://launchpad.net/ubuntu/+source/stockfish ...
Describe the issue
After downloading stockfish 17 avx2 on my debian bullseye system, it won't run, because:
Expected behavior
If you opt for statically linked standard libraries (on linux), this would not happen and the program would be usable out of the box on many more systems.
Steps to reproduce
Anything else?
The compiler option you might want to use to fix this is:
-static-libstdc++
.Operating system
All
Stockfish version
Stockfish 17 as of the time of this issue post.