1

I was wondering whether somebody managed to install unison's latest version from source, on its macOS machine (Here I am trying with Catalina). I followed the steps here :

  1. I verified that I had XCode installed (otherwise forget about compiling anything :)

  2. I cloned the official Git repository by running

    git clone https://github.com/bcpierce00/unison.git

  3. I moved to the newly created directory unison

    cd unison

  4. As mentionned in the documentation I then ran the make command telling it to build the text UI:

    make UISTYLE=text

Result should have been an executable file called unisonbut instead of this I got the following error :

Blablabla$ make UISTYLE=text
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C src UISTYLE=text
UISTYLE = text
Building for Unix
NATIVE = true
THREADS = false
STATIC = false
OSTYPE =
OSARCH = osx
ocamlopt: ubase/rx.mli ---> ubase/rx.cmi
ocamlopt -g -unsafe-string -I lwt -I ubase -I system -I fsmonitor -I fsmonitor/linux -I fsmonitor/windows -I system/generic -I lwt/generic -ccopt -mmacosx-version-min=10.6 -c /Users/Shared/unison/src/ubase/rx.mli
make[1]: ocamlopt: No such file or directory
make[1]: *** [ubase/rx.cmi] Error 1
make: *** [text] Error 2
  1. I then wondered whether XCode might not carry with him an OCaml compiler. So I installed the official one using MacPort therefore running:
sudo port install ocaml
sudo port install opam
  1. I then rerun the same make command

    make UISTYLE=text

  2. This time the result looked better and ended with:

/Applications/Xcode.app/Contents/Developer/usr/bin/make tags
if [ -f "`which etags`" ]; then \
        etags *.mli */*.mli *.ml */*.ml */*.m *.c */*.c *.txt \
             *Makefile* \
      ; fi
  1. However, still no unison file visible anywhere.

Question is ... since there is no error message, where is this executable?

oscaroscar
  • 1,158
  • 11
  • 16

1 Answers1

1

Re-hello people from the Internet,

I managed to help myself here and got a nice and fresh unison executable on my macOS Catalina computer.

Basically, the base make tries to move the compilation product into /Users/<your_user>/bin/. which makes sense I guess, but is rarely used by us macOS users. So here is what I did to fix the issue :

  1. Create the bin directory into your home

    mkdir ~/bin

  2. Re run the make by doing

    make UISTYLE=text

  3. Verify you have the executable by asking its version:

    ~/bin/unison -version

  4. Happy me, I got the expected message back from my terminal:

    unison version 2.51.3 (ocaml 4.08.1)

Hope it can help somebody.

Community
  • 1
  • 1
oscaroscar
  • 1,158
  • 11
  • 16