1

On my OS X box, brew install unison gives me version 2.51.2. But the system I need to sync with runs CentOS 6.10 for which there appears to be no existing 2.51.2 binary. I also can't compile from source on that machine as it doesn't have the right tools and I am not root.

To solve this I would like to compile unison from source on my Ubuntu machine on which I am root. But this has to be a static compilation to run on the CentOS machine.

How can I make a static binary of unison?

The Makefile has the line include src/Makefile.OCaml but I don't know anything about OCaml and am not sure what I would need to change to make a static binary.

Simd
  • 19,447
  • 42
  • 136
  • 271

1 Answers1

2

In the Makefile, there should be a line STATIC = false. Either change that to true, or just compile with the line make STATIC=true.

Some caution, according to this blog post the STATIC option doesn't actully do anything as of at least version 2.32.52, and I see no changes in the change log to indicate that this has been fixed, but the author of the blog post says, and I've confirmed, that building a static binary works for the latest version of Unison, 2.48.

Mike Pierce
  • 1,390
  • 1
  • 12
  • 35