-
Notifications
You must be signed in to change notification settings - Fork 30
Windows build fixes (MSYS2, Cygwin, etc.) #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dra27
wants to merge
8
commits into
ocaml:master
Choose a base branch
from
dra27:win-fixes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Check for META.pkg was executed even when metadir is unset - the effect is that ocamlfind install would fail if there was a META.pkg in the current directory... which happens to be the case for the num package!
They've never been used - tracking the paths we need to know about is hard enough!
Group all the commands generating findlib.conf into a single subshell invocation.
Possibly an attempt to avoid spaces or unusual characters, but somewhat dated.
Member
|
I can confirm that this fixes the annoying |
This was referenced Oct 28, 2025
This was referenced Nov 1, 2025
Eliminate the USE_CYGPATH variable by manipulating native paths on Windows directly in configure. This has two important side-effects: 1. Native paths coming from OCaml are used directly 2. Semi-colon handling in OCaml 5.x is fixed for the Cygwin port
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes various issues:
ocamlfinddoes not build with OCaml 5.0+ on Cygwin (a build failure occurs owing to mishandling of the;inpathin the generation offindlib.conf). (GHA: Add OCaml 5.4 to the test matrix opam#6732)findlib.confis (silently) misgenerated which causes bothocamlfind listandtopfindto fail. (MSys2 fails to compile topkg.1.1.0 opam-repository#28636)ocamlfind installcontains an incorrect check forMETA.pkgeven whenmetadiris not in use (which happened to affect the non-opam installation ofnum).-sis not a necessary, nor even always valid, flag tocygpathany more and the technically the legacy command for retrieving the Standard Library is broken on old versions of OCaml.The opening commits are fairly straightforward. The last commit is fiddly, but enacts the following sequence of changes:
findlib.confis shifted from being a build operation to aconfigureoperation. That requires the tracking of the native / "Unix" version of various path variables inconfigure, but is fundamentally simpler overall, because we only have to worry about escaping the backslashes which physically go intofindlib.confand not also escaping characters which may interfere with an escapingsedexpression!tools/patchto be able to assume that it has received a native path (modulo the highly legacy stuff for the MinGW environment, but this probably ought to all be removed).Fixes Cygwin failure in ocaml/opam#6732
Closes ocaml/opam-repository#28636
cc @kit-ty-kate (opam), @jmid (opam-repository), @Leonidas-from-XIV (Dune package management)