Skip to content

Commit

Permalink
Merge pull request #46 from melange-re/gnu-patch
Browse files Browse the repository at this point in the history
Add section about making sure patch is GNU patch
  • Loading branch information
feihong authored Jun 13, 2024
2 parents 13e86b9 + 86a34ab commit c6805bf
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/installation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,34 @@ and add this snippet:
"editor.defaultFormatter": "ocamllabs.ocaml-platform"
}
```

## Troubleshooting

## Error while compiling OCaml

If you get an error while compiling OCaml and it says something about not being
able to find a file, then your `patch` binary probably isn't [GNU
patch](https://savannah.gnu.org/projects/patch/). Run this in your shell:

```bash
patch --version
```

If it returns something like

```text
GNU patch 2.7.6
Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 1988 Larry Wall
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Larry Wall and Paul Eggert
```

then you're good to go. Otherwise, you need to install GNU patch and make sure
that running `patch` will invoke it. How you do it depends on your operating
system. For example, on Macs you can install from [Homebrew](https://brew.sh/)
by running `brew install gpatch`.

0 comments on commit c6805bf

Please sign in to comment.