MSYS2/ucrt64 support
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 115
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
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, the TOOLPREF variable gets set to x86_64-w64-mingw32-, which makes the compilation of flexdll fail under MSYS2 which doesn't have x86_64-w64-mingw32-windres but has windres
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:
version_res.o: version.rc
- $(TOOLPREF)windres -i $< -o $@
+ $(TOOLPREF)windres -i $< -o $@ || windres -i $< -o $@
Relatedly there is also the following comment in configure.ac in ocaml/ocaml:
# Note: This is present for the flexdll bootstrap where it exposed as the old
# TOOLPREF variable. It would be better if flexdll where updated to require
# WINDRES instead.
AC_SUBST([ac_tool_prefix])
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect the flexdll Makefile rule for version_res.o and the TOOLPREF handling referenced in configure.ac. First reproduce the build under MSYS2/ucrt64 and compare windres availability across environments. Done means flexdll builds there without a local Makefile patch while existing Windows build paths continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100