Fix the way the ocamldoc bytecode executable is called under Windows. (#906)
This fixes a problem related to the way ocamldoc's bytecode executable is called under Windows, reported by @alainfrisch at https://github.com/ocaml/ocaml/pull/808#issuecomment-257364340 As he explains, ``Even if the PATH is extended with explicit paths to otherlibs/win32unix and otherlibs/str, ocamlrun will still look up the stub dlls in the installation directory first, as can be seen by setting OCAMLRUNPARAM=v=256. If another version was installed in the same target directory before, the old dlls will be loaded which can lead to failure (e.g. I just got "Fatal error: unknown C primitive 'unix_lstat'"). A fix could be to set: CAML_LD_LIBRARY_PATH="../otherlibs/win32unix;../otherlibs/str" instead of changing PATH''. This commit implements the proposed fix, due to @alainfrisch.master
parent
2847cb8f17
commit
b1e93a298b
|
@ -63,7 +63,7 @@ ifeq "$(UNIX_OR_WIN32)" "unix"
|
|||
OCAMLDOC_RUN=$(OCAMLRUN) ./$(OCAMLDOC)
|
||||
endif
|
||||
else # Windows
|
||||
OCAMLDOC_RUN = PATH="$$PATH":"$(abspath $(ROOTDIR))/otherlibs/$(UNIXLIB)":"$(abspath $(ROOTDIR))/otherlibs/str" $(OCAMLRUN) ./$(OCAMLDOC)
|
||||
OCAMLDOC_RUN = CAML_LD_LIBRARY_PATH="../otherlibs/win32unix;../otherlibs/str" $(OCAMLRUN) ./$(OCAMLDOC)
|
||||
endif
|
||||
|
||||
OCAMLDOC_OPT=$(OCAMLDOC).opt
|
||||
|
|
Loading…
Reference in New Issue