-
Notifications
You must be signed in to change notification settings - Fork 33
Show up for logs how we apply patches when we install ocaml-solo5 via opam #153
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
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering: do all patches apply no matter the ordering? With
patches/$VERSION/*I think we are not guaranteed any particular order, and it will depend on the filesystem. I see the patches go from0001-*.patch..0021-*.patch.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think we need to force the order. I tested with the patches in reverse order and it fails:
$ git apply --check --directory ocaml patches/5.3.0/0021-Set-Max_domains_-def-max-to-1.patch patches/5.3.0/0020-Allow-ocaml-in-a-triplet-target-to-build-freestandin.patch patches/5.3.0/0019-Accept-native-freestanding-targets-at-configure-time.patch patches/5.3.0/0018-Output-the-.size-and-.type-directives-based-on-confi.patch patches/5.3.0/0017-Add-a-Config-variable-for-the-.size-and-.type-assemb.patch patches/5.3.0/0016-Detect-support-for-.size-and-.type-assembler-directi.patch patches/5.3.0/0015-Output-the-.note.GNU-stack-section-based-on-configur.patch patches/5.3.0/0014-Add-a-Config-variable-for-the-need-of-the-GNU-non-ex.patch patches/5.3.0/0013-Detect-the-need-for-the-GNU-note-for-non-executable-.patch patches/5.3.0/0012-Include-asm.h-at-the-beginning-of-assembler-sources.patch patches/5.3.0/0011-Add-a-dummy-caml_debugger_saved_instruction-when-HAS.patch patches/5.3.0/0010-Fix-static-builds-of-the-compiler.patch patches/5.3.0/0009-Enable-bootstrapping-flexdll-in-the-cross-compiler-s.patch patches/5.3.0/0008-Add-a-Makefile.cross-with-rules-to-build-a-cross-com.patch patches/5.3.0/0007-Detect-flexlink-only-on-relevant-targets.patch patches/5.3.0/0006-Add-a-configurable-library-directory-on-target.patch patches/5.3.0/0005-Use-a-TARGET_BINDIR-configure-variable-instead-of-wi.patch patches/5.3.0/0004-Check-that-the-OCaml-versions-are-compatible-for-a-c.patch patches/5.3.0/0003-Detect-a-_build_-C-toolchain-to-build-sak.patch patches/5.3.0/0002-Use-target-instead-of-host-when-relevant-in-configur.patch patches/5.3.0/0001-Use-target-instead-of-host-to-detect-the-C-toolchain.patch error: the patch applies to 'ocaml/configure' (401b94298e4f34946677a409560ce1832c5bbbbc), which does not match the current contents. error: ocaml/configure: patch does not apply error: patch failed: ocaml/configure.ac:299 error: ocaml/configure.ac: patch does not applyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed the order must be enforced. I wrote it that way because IIUC
shis expected (by POSIX) to sort entries when expanding wildcards. Now I discoverbashparameter$GLOBSORTthat can be used to control (including disabling) how sorting is done, so this is another brittleness of that patching code. Sigh.Anyway, in the log I don’t see any failure due to some patch not applying, so I don’t think that the order of the patches is causing issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW I got the same error message when I did
git apply --check directory ocaml patches/5.3.0/*and addingechoin front it's in the numerical order. So I don't know what's going on and why I'm getting that error.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think that using
git applyis not appropriate because it also looks at.git/index. It is much more than just a patch between two files; it is a patch between two files and the state of the Git repository we are in (and it is difficult to know howgit applyfinds.git).In short, I think we're back to the initial issue described here: #151