difficulty installing ocamlfind under cygwin4

2019-09-02 07:56发布

问题:

I have installed ocaml under cygwin64 (a Windows 10 computer). Ocaml, ocamlc seem to run fine, but I need packages. So I've tried opam, and it complained that ocamlfind was missing. I have tried to install ocamlfind it two ways - using opam and from the findlib repository on gitlab.camlcity.org - and in both cases, it failed on not finding dllunix.so . I noticde that the environment variable OCAMLLIB was C:\Ocaml (ie outside the cygwin directory tree), but that in /usr/lib/ocaml/stublibs there was such a file. Having modified OCAMLLIB to point there, I received the following error.

Cannot load required shared library dllunix. Reason: /usr/lib/ocaml/stublibs/dllunix.so: flexdll error: cannot relocate RELOC_REL32, target is too far: 0xfffffffc02c37112 0x2c37112.

I have a similar message on another library as well:

Error: Error on dynamically loaded library: /usr/lib/ocaml/stublibs/dllcamlstr.so: flexdll error: cannot relocate RELOC_REL32, target is too far: 0xfffffffc02b6a92a 0x2b6a92a

回答1:

First:

this is not a programming question, it is a support requirement and the right place is the cygwin mailing list. You can follow guidelines on: https://cygwin.com/problems.html

Second:

you can try the following approach, execute

/usr/bin/rebase-trigger fullrebase

than close all the cygwin programs and services, and run setup-x86_64 again. Further info on document

/usr/share/doc/Cygwin/_autorebase.README

If number two fails, follow one. Really.