0

I'm using Repl.it and Python to communicate with an executable (stockfish, a chess engine).

i.e.:

  1. Send a command to the stockfish executable
  2. Get the output

This is what I'm currently doing:

stockfish = subprocess.check_output(f'printf "position fen {board.fen()}\ngo depth 7\nucinewgame\n" | ./stockfish'
                                            , shell=True, text=True, timeout=5)

# then do something with stockfish

Weirdly, this does not work even though I have ensured that the executable works correctly. In fact, it works properly when I execute it in the shell. However, when I execute it from the Python script, it instead gives me this error:

./stockfish: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /nix/store/dd8swlwhpdhn6bv219562vyxhi8278hs-gcc-10.3.0-lib/lib/libstdc++.so.6)

Is there any way to solve this error? I have tried many alternatives, including using subprocess.run(), etc. I know that the error reports something about GLIBC being outdated, but there is nothing I can do to fix GLIBC right now, and I believe it is not necessary for the executable to be run. I am merely looking for a bypass. Thanks in advance!

Boo Who
  • 17
  • 6
  • It looks like a problem on how the Repl.it environment is set up. Did you had to make something specific to have Stockfish available on your replit ? Otherwise, it is on their side, you can't do nothing about that. – Lenormju Jan 26 '23 at 06:55
  • @Lenormju I added the precompiled Stockfish executable to the directory directly; I have checked, and it is working properly when I run it in the shell. So it shouldn't be a problem with the executable itself. I tested this in the default Replit Python environment, and have not made any env-specific changes either. – Boo Who Jan 26 '23 at 13:21

0 Answers0