Conversation
Member
Author
|
@smorimoto, you've added Windows to the CI but the ocsigenserver package doesn't install successfully with opam. Do you plan to work on this ? |
Member
|
I have been so busy with work lately so I don't think I can work on it "for now". |
opam install works
This reverts commit 881b03d.
On Windows, opam passes empty arguments (e.g. `--temproot ""`) through the Cygwin shell as a literal double-quote character. That stray quote ended up in Makefile.config as `TEMPROOT := "` and broke the install.files recipe (/bin/sh: unexpected EOF while looking for matching `"'). Strip double quotes from the path variables that get prepended to install paths so Makefile.config stays well-formed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Cygwin/NTFS does not support Unix permission bits, so `install` aborts with "cannot change permissions ... Permission denied" when it chmods the file or directory it just created (this happens even without an explicit -m, since install applies mode 755 by default). Detect Windows (OS=Windows_NT or a CYGWIN uname) and fall back to plain `mkdir -p` / `cp`, dropping the mode and ownership flags. Behavior on Linux/macOS is unchanged: the mode flags are now carried inside the INSTALL_MOD_* variables (`-m <mode>`) so they can be emptied on Windows. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
On Windows, opam passes paths with backslash separators (the expansion of
%{lib}%, %{prefix}%, etc.). The Cygwin shell that runs the install recipes
eats those backslashes as escape characters, corrupting the paths (e.g.
'D:\a\...' became 'D:a...' and cp failed with 'No such file or directory').
Convert backslashes to forward slashes for all path variables before writing
Makefile.config; Cygwin accepts forward-slash drive paths (D:/a/...) and the
conversion is a no-op on Unix.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This reverts commit a3462e8.
This reverts commit 3131536.
Consolidate the Windows handling into a single detection point. cygpath only exists on Cygwin, so its presence identifies the platform and also normalizes opam's Windows-style paths (backslashes / drive letters / stray quotes) via `cygpath -m`, replacing the manual tr-based conversion and quote stripping. configure writes OCSIGEN_WINDOWS into Makefile.config; the Makefile now reads that flag for the install.files mkdir/cp fallback instead of re-detecting the platform with OS/uname. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
On Windows OCSIGENGROUP is empty, so the `groups | grep -q $OCSIGENGROUP` check ran grep with no pattern and printed a usage error into the build log. The whole permission/ownership detection is meaningless on Windows (the OCSIGEN_WINDOWS branch drops modes and ownership regardless), so guard it out. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
No description provided.