Conversation
Member
Author
|
On subsequent review of this since #112 while working on #122, I've added commits here which remove the |
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.
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
MSYS2 configures GCC correctly.
MSYS2 uses cygpath in the same way as Cygwin, and the install command is a Cygwin-style command.
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
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 (which is simply a repeat of #112 opened directly) 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