fairy-stockfish / Fairy-Stockfish

chess variant engine supporting Xiangqi, Shogi, Janggi, Makruk, S-Chess, Crazyhouse, Bughouse, and many more
https://fairy-stockfish.github.io/
GNU General Public License v3.0
603 stars 189 forks source link

Help clang build issue on 'fstream' file missing #807

Open abdulbadii opened 2 months ago

abdulbadii commented 2 months ago

On Msys2/Mingw64 environment using clang compiler, ...

Step 1/4. Building instrumented executable ...
make ARCH=x86-64-modern COMP=clang clang-profile-make
make[1]: Entering directory '/c/Users/budi/Downloads/Fairy-Stockfish-master/src'
make ARCH=x86-64-modern COMP=clang \
EXTRACXXFLAGS='-fprofile-instr-generate ' \
EXTRALDFLAGS=' -fprofile-instr-generate' \
all
make[2]: Entering directory '/c/Users/budi/Downloads/Fairy-Stockfish-master/src'
clang++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-instr-generate  -Wno-profile-instr-out-of-date -DNNUE_EMBEDDING_OFF -pedantic -Wextra -Wshadow -m64 -DUSE_PTHREADS -DNDEBUG -O3 -fexperimental-new-pass-manager -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2 -flto -fuse-ld=lld   -c -o benchmark.o benchmark.cpp
clang++: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]
benchmark.cpp:19:10: fatal error: 'fstream' file not found
#include <fstream>
         ^~~~~~~~~

Help shed a light, under what library package it's to get installed

ianfab commented 2 months ago

Since I am not using Windows I unfortunately can't compare. fstream is part of the standard library, so not sure why this should ever be missing in a default installation. Have you tried using gcc instead of clang? I assume gcc should be the default in mingw environment, so maybe that works better?!