tb
tb copied to clipboard
windows MSYS / WSL compilation
Hello, I do have exactly the same error either using MSYS2 or WSL with mingw-w64 libs :
$ make all
make[1]: Entering directory '/home/youri/tb/src'
gcc -pthread -O3 -march=native -pipe -D_GNU_SOURCE -Wall -std=c11 -Wno-array-bounds -flto -mbmi2 -mwin32 -c threads.c -DBMI2 -DUSE_POPCNT -DTBPIECES=7 -DUSE_ZSTD -DCOMPRESSION_THREADS=6 -DREGULAR -o objsr/threads.o
In file included from threads.c:17:
util.h:7: warning: "min" redefined
7 | #define min(a,b) ((a) < (b) ? (a) : (b))
|
In file included from C:/msys64/mingw64/include/windef.h:9,
from C:/msys64/mingw64/include/windows.h:69,
from threads.c:12:
C:/msys64/mingw64/include/minwindef.h:177: note: this is the location of the previous definition
177 | #define min(a, b) (((a) < (b)) ? (a) : (b))
|
threads.c:285:8: error: unknown type name 'pthread_t'
285 | static pthread_t cmprs_threads[COMPRESSION_THREADS];
| ^~~~~~~~~
threads.c:287:8: error: unknown type name 'pthread_barrier_t'
287 | static pthread_barrier_t cmprs_barrier;
Any idea ? :'(