OCaml has been partially broken on Cygwin64 since 2018. I did some recent work upstream to fix it and we're expecting OCaml 4.12.0 by the end of the year to restore full support.
This requires a new release of flexdll (I also maintain upstream for that). We could do with an updated FlexDLL package before OCaml 4.12.0 is released to simplify testing on CI servers. I'd like to offer to adopt the Cygwin flexdll package, therefore. The changes for 0.39 are trivial: https://github.com/dra27/cygport-flexdll/commit/2cb2d6787c56eb1367d7aa4588c5 24db92e45492 and test packages are in https://github.com/dra27/cygport-flexdll/commit/eb544170af8f2a37b7ec8c7eac95 6a47ae9fef4d. Thanks, David