Open kit-ty-kate opened 4 months ago
It's worth hardening regardless, but what's the context of this issue? MSYS2's gcc is not a cross-compiler, so it configure
s using a standard ./configure
, which causes flexlink
to use an unprefixed version. This is why all the filters on --host=
in the compiler packages begin with {os-distribution = "cygwin" &
(restricting it to Cygwin's prefixed packaging of gcc) and then system-mingw:installed & arch-x86_64:installed
i was trying to compile opam on MSYS2 using its MinGW toolchain, where gcc is x86_64-w64-mingw32-gcc
By default MSYS2 doesn't have a prefixed
windres
tool in most of its environments (except for the mingw one which seems to fail due to unrelated reasons). When building flexdll vendored inside OCaml, theTOOLPREF
variable gets set tox86_64-w64-mingw32-
, which makes the compilation of flexdll fail under MSYS2 which doesn't havex86_64-w64-mingw32-windres
but haswindres
There is an issue upstream about the lack of prefixed windres tool here: https://github.com/msys2/MSYS2-packages/issues/2595
However regardless of whether or not it is a good decision for such platform to have it or not, it would be nice for OCaml to compile without having to either patch the Makefile or create a custom
windres
binary/script/link.While I'm not certain what this
windres
program is, maybe flexdll could do the following change:Relatedly there is also the following comment in
configure.ac
in ocaml/ocaml:Side note: I remember talking with someone about this issue some months ago and I thought a ticket was opened somewhere but i couldn't find it anywhere so I'm creating it here to at least kickstart the discussion once more