7

When trying to sync two paths (one of which is remote) via ssh, unison fails with

Fatal error: Internal error: New archives are not identical.

while syncing via a network mount works just fine.

While unison -debug all yields no indication on the possible error, having it use ssh -v causes a lot of

channel 0: bad ext data

errors. However, both machines run the same version of unison (2.40.63).

Tobias Kienzler
  • 9,184
  • 13
  • 65
  • 106
  • 2
    It looks like this problem is also affecting Fedora 18, which now includes OCaml 4.00.1. It looks like packaging three versions of Unison wasn't enough to make the program usable. :( – amcnabb Jan 18 '13 at 00:09
  • @amcnabb Good catch, did you post a bug report? The [Karl M Windows version](http://alan.petitepomme.net/unison/index.html) is probably still widely in use, apart from the interoperability issues with any older distribution. The hash inconsistencies are of course a bug in unison/OCaml themselves as well... – Tobias Kienzler Jan 18 '13 at 07:24
  • It's also an issue with Arch Linux, although _there_ there's a [2.32 PKGBUILD](https://aur.archlinux.org/packages.php?ID=46811), and the [Downgrading Arch-Wiki entry](https://wiki.archlinux.org/index.php/Downgrading_Packages) may be helpful as well – Tobias Kienzler Jan 18 '13 at 07:31
  • @amcnabb At least my locally compiled unison binary is a standalone one with static linking, so you can probably just use e.g. the 2.32/Ocaml3.12 build from another distro on the same architecture. Some x86 and and x86_64 builds are available [on the unison homepage](http://alan.petitepomme.net/unison/index.html) – Tobias Kienzler Jan 18 '13 at 07:34

1 Answers1

7

As hinted at by this macports.org ticket, the problem lies in having used two different major versions of OCaml (3.12 vs 4.0) in compilation on the two machines. Either use the same binary on both machines or (as was the case for me due to different architectures) recompile unison with identical OCaml versions.

(Side note: The Windows version compiled by Karl M requires OCaml 3.12)

Tobias Kienzler
  • 9,184
  • 13
  • 65
  • 106
  • 2
    Thanks for a very succinct and useful answer. This is made worse by the fact that the Unison build on Debian squeeze currently fails, so I had to use a binary built with the wrong OCaml version. – RichVel Mar 08 '13 at 14:44