ocamlfind icon indicating copy to clipboard operation
ocamlfind copied to clipboard

Can not compile ocamlfind 1.9.6 under Cygwin /opam 2.2.0 /ocaml 5.2.0

Open iBoostAI opened this issue 1 year ago • 0 comments

# tools/patch '@SITELIB@' '/home/Kevin/.opam/5.2.0+trunk/lib' |
# tools/patch '@FINDLIB_PATH@' '/home/Kevin/.opam/5.2.0+trunk/lib/ocaml;/home/Kevin/.opam/5.2.0+trunk/lib' -p >findlib.conf # sed: -e expression #1, char 58: unknown option to `s'

In the patch script, the delimiter used by sed is ;, which is generally a safe choice. However, since the replacement value contains ;, we need to choose a delimiter that won't appear in the paths.

Here, I've changed the delimiter from ; to |, as | is less likely to appear in file paths. So, the final line of the patch script should look like this:

sed -e 's|'"$varname"'|'"$varvalue"'|g'

iBoostAI avatar Jun 19 '23 11:06 iBoostAI