ulong is not uint32_t instead of unsigned long as unsigned long is 8 bytes on 64 bits machines but 4 bytes on 32 bit machines and fmindexV2 is developed with a hard 32 bit requirement for the ulong type