开发者

Erlang Dialyzer PLT file portability between different architectures

Can you copy and use a Dialyzer PLT output to another machine of different architecture? For example, I've built a PLT file on an x86_64 Linux machine. Can开发者_如何学C I use the file on an x86 FreeBSD or a Windows machine?


considering that dialyzer plt file is in binary form there could be some problems in regards of binary size of some elements in 32/64 bit and maybe metadata about the erlang release which may not be portable between even release and release.

BTW, dialyzer plt file takes less than half an hour to compile and can be edited after that by command line, so why moving the file instead of just simply recreate it (which has also the advantage to always have the dialyzer file for that specific release and architecture)?


It is possible to copy Dialyzer's PLT, but you need two preconditions for all files included in the PLT on both machines:

  1. Same absolute paths: Dialyzer stores the absolute path for every file in the PLT. It is therefore necessary for that to be identical, in order to find the actual files on each machine.
  2. Same versions: For each .beam file included, the PLT stores an MD5 checksum of the relevant source code (embedded within the beam file due to debug_info being enabled). If as little as a single line is changed, the MD5 will differ and Dialyzer will assume the file to be changed and recalculate the information stored in the PLT.


@andrewtj on Twitter kindly told me a quote from Kostis Sagonas. Kostis writes that the copying of PLT file is possible, provided that the two machines have to have identical configurations. (I think having an identical configuration is not easy though...)

https://twitter.com/#!/andrewtj/status/94752252941709312

http://groups.google.com/group/erlang-programming/msg/c34baf501eee56c7

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜