Skip to content
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

Could not update local repository on mac #3639

Closed
feihong opened this issue Oct 26, 2018 · 6 comments · Fixed by #3656 or #5400
Closed

Could not update local repository on mac #3639

feihong opened this issue Oct 26, 2018 · 6 comments · Fixed by #3656 or #5400

Comments

@feihong
Copy link

feihong commented Oct 26, 2018

Problem is identical to that described in #3433, but on Mac OS X instead of OpenBSD. My fix was to run brew install gpatch, after which opam update worked without issue. Perhaps you could update the Mac section of the install docs?

$ opam config report
# opam config report
# opam-version      2.0.0
# self-upgrade      no
# system            arch=x86_64 os=macos os-distribution=homebrew os-version=10.13.6
# solver            builtin-mccs+glpk
# install-criteria  -removed,-count[version-lag,request],-count[version-lag,changed],-changed
# upgrade-criteria  -removed,-count[version-lag,solution],-new
# jobs              3
# repositories      1 (http), 2 (version-controlled) (default repo at 3e5ac5b0)
# pinned            1 (git)
# current-switch    /Users/fhsu/work/cool-project
@rjbou
Copy link
Collaborator

rjbou commented Oct 29, 2018

opam uses internally gpatch only is the os is an {Open,Free}BSD. Does Mac OS X aliases patch to gpatch once installed ?

@feihong
Copy link
Author

feihong commented Oct 30, 2018

@rjbou yes, running brew install gpatch installs gpatch to /usr/local/bin/patch and which patch returns /usr/local/bin/patch

@rjbou rjbou mentioned this issue Nov 6, 2018
@rjbou
Copy link
Collaborator

rjbou commented Nov 6, 2018

Doc updated, thanks for the report!

avsm added a commit to avsm/homebrew-core that referenced this issue Nov 7, 2020
opam depends on GNU patch for some of its operations (ocaml/opam#3639)

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
BrewTestBot pushed a commit to Homebrew/homebrew-core that referenced this issue Nov 8, 2020
opam depends on GNU patch for some of its operations (ocaml/opam#3639)

Closes #64301.

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
Signed-off-by: chenrui <chenrui333@gmail.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
@fpottier
Copy link

I would like to note that I just observed a similar issue under MacOS 10.15.7, where patch is gpatch 2.5.8, and the issue was resolved by upgrading to gpatch 2.7.6.

@dra27
Copy link
Member

dra27 commented May 18, 2021

macOS is rapidly becoming the new Windows for shipping with tediously ancient versions of tools (similar recurrent pain in OCaml with GNU make on macOS). Thanks for the data point - I'm hoping that opam update in 2.2 will not involve patch files, but the patch pre-processor may need to be battle-tested on some even older versions of patch!

@kit-ty-kate
Copy link
Member

I believe this was fixed by #5893 back in opam 2.1.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants