1

I just did a fresh install of cygwin64 on windows 10.1. I installed ocaml package (4.02.3) from the cygwin repository. I have strange errors related to flexdll :

$ ocaml OCaml version 4.02.3

#load "str.cma";;

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

Do you know what the problem is and how to circumvent it ? In fact, I encountered a similar issue while trying to compile findlib on cygwin from sources.

Best regards, François

fbrx
  • 11
  • 2
  • I don't know in details about the bug that you mentioned, but there is a related question about installing OCaml in Windows. Hope that it may help you: http://stackoverflow.com/questions/39560241/how-can-i-install-ocaml-with-opam-on-windows/39693955#39693955 – Trung Ta Sep 29 '16 at 08:19
  • Thank you. But this is not directly applicable to my situation. My company has a very restrictive policy concerning web access and download. In particular, I can not use opam. This is why I use the cygwin package which I can download at home and choose to install from a local directory (external drive, ...). – fbrx Sep 29 '16 at 11:24
  • you make your local opam repository, download all packages into it from home, and then bring it to work – ivg Sep 29 '16 at 18:25
  • @fbrx This memory bug seems very tricky since there is no clue how to debug. Can you try a fresh installation of Cygwin and OCaml instead? – Trung Ta Sep 30 '16 at 04:36
  • have you tried a full rebase ? See `/usr/share/doc/Cygwin/_autorebase.README` for info – matzeri Sep 30 '16 at 19:38
  • @TrungTa I tried several things before submitting my question (in particular doing a full rebase as suggested by matzeri in [link](http://stackoverflow.com/questions/38692733/difficulty-installing-ocamlfind-under-cygwin4) and [link](https://cygwin.com/ml/cygwin-apps/2016-04/msg00049.html)) : it did not solve my problem. Before submitting my question, I did a full clean reinstall of cygwin (with ocaml package) in order that it can be reproduced. – fbrx Oct 01 '16 at 08:09
  • @matzeri yes I tried a full rebase or a partial rebase of the libraries triggering the error (see my former comment) – fbrx Oct 01 '16 at 08:11
  • @ivg thanks, I didn't know that it was possible to make a local opam directory and use it for installation. It seems to be the best option for me. I will try that approach and report on it. – fbrx Oct 01 '16 at 08:17
  • You can also follow https://cygwin.com/problems.html and report the problem on cygwin mailing list. I remember a similar issue issue reported but I thought was solved – matzeri Oct 01 '16 at 16:52

1 Answers1

1

François,

I faced the same problem when trying to compile findlib under cygwin. I was using cygwin's package for ocaml.

My solution has been to uninstall the ocaml package(s) from cygwin, then download and compile ocaml from sources (that is version 4.03.0, instead of 4.02.3 packaged with cygwin), using the following to have the installation replace cygwin's ocaml software:

./configure -prefix /usr -no-curses
make world.opt
make install

Once ocaml installed from sources, configure and build findlib is successful:

cd findlib-1.7.1
./configure
make all
make opt
make install

I hope that helps,

David.

dde
  • 150
  • 6
  • Thank you for the suggestion. I tried, but I get the following error during the compilation of ocaml : `$ make world` `[...]` `../boot/ocamlrun ../boot/ocamlc -nostdlib -I ../boot -c -strict-sequence -w +27+32..39 -warn-error A -safe-string -I ../utils -I ../parsing -I ../typing -I ../bytecomp -I ../asmcomp -I ../middle_end -I ../middle_end/base_types -I ../driver -I ../toplevel ocamlmklib.ml` `File "ocamlmklib.ml", line 264, characters 7-12: Error: Unbound value mklib` `make[4]: *** [Makefile.shared:341: ocamlmklib.cmo] Error 2` – fbrx Jan 27 '17 at 09:48