我在Windows 8.1上使用管理开发环境(mgtcommerce / mgt-development-environment-5.6)。 &安培; DockerToolbox for Windows。
我还下载了OpenSSH& amp;的推荐版本。来自https://www.mgt-commerce.com/documentation/mgt-development-windows-file-synchronization的Unison并按照描述创建了sync.bat。
不幸的是,Unison会因以下错误消息而崩溃:
Uncaught exception Failure("input_value: bad bigarray kind")
Raised by primitive operation at file "./remote.ml", line 453, characters 18-45
Called from file "./remote.ml", line 459, characters 23-61
Called from file "./lwt/lwt.ml", line 75, characters 20-23
Re-raised at file "./lwt/lwt.ml", line 135, characters 12-13
Called from file "list.ml", line 73, characters 12-15
Called from file "./lwt/lwt.ml", line 31, characters 2-37
Called from file "./lwt/lwt.ml", line 83, characters 17-46
Called from file "./lwt/win/lwt_unix_impl.ml", line 239, characters 6-40
Called from file "./uitext.ml", line 490, characters 2-113
Called from file "./uitext.ml", line 556, characters 38-66
Called from file "./uitext.ml", line 718, characters 6-47
Called from file "./uitext.ml", line 756, characters 6-125
Called from file "./uitext.ml", line 804, characters 8-47
Called from file "./uitext.ml", line 870, characters 21-43
它确实可以正常工作:
我阅读了几篇文章,其中大部分都得出结论,这是一个OCaml不兼容问题。
如何解决这个问题? 其他人是否也遇到过这个错误?
答案 0 :(得分:2)
错误消息" input_value:bad bigarray kind"表明你在Unison中遇到了一个众所周知的错误。
同步中涉及的两个Unison进程的主要版本不仅需要匹配(您可能知道),OCaml版本4.01和4.02之间的OCaml库也有内部更改,与编组有关。数据。很难给你一个精确的链接,因为一些谷歌最有希望的结果会返回一个空白的页面,但我希望这些可以做到:
https://github.com/bcpierce00/unison/issues/32 http://unison-users.yahoogroups.narkive.com/7FOa6VCg/re-unison-failed-uncaught-exception-failure-input-value-bad-bigarray-kind
请特别注意最后一个链接中的页面:
[...]这是一个已知问题,因为Unison没有被编译而发生 反对相同的OCaml版本[...]。 OCaml中的编组4.01和 4.02使用不同的格式......您必须编译Unison 2.48.3 针对相同版本的OCaml [...]
我有时会遇到这个问题,我通过编译自己的OCaml Lablgtk for the graphical (GTK) interface和Unison来绕过它。我发现在Linux下编译它们非常简单(在其他操作系统上没有尝试过)。
答案 1 :(得分:1)
最后,我得到了同步功能。使用以下设置运行:
Dockerfile中使用的命令:
RUN apt-get update && apt-get install -y \
ocaml \
&& curl -L https://github.com/bcpierce00/unison/archive/2.48.4.tar.gz | tar zxv -C /tmp && \
cd /tmp/unison-2.48.4 && \
sed -i -e 's/GLIBC_SUPPORT_INOTIFY 0/GLIBC_SUPPORT_INOTIFY 1/' src/fsmonitor/linux/inotify_stubs.c && \
make && \
cp src/unison src/unison-fsmonitor /usr/bin && \
cd /root && rm -rf /tmp/unison-2.48.4