Build / Compile unison v2.48.4 with OCaml v4.08.1

Hello,

I need to get unison 2.48.4 build with OCaml version 4.08.1, but it’s not available for Manjaro.
The packages in AUR seems to be built with another OCaml version.

The problem is, I have never built a package my self and I don’t know where to get the sources for unison and how I ensure that it’s compiled with the correct OCaml versionb (4.08.1).

I found some “guides” in the web, but I never succeded.

Is there any how to guide completely for newbies?

Thank you very much.

You have unison-2.48.4 available in AUR, which seems based on the official build. Isn’t that enough?

In short: Not that I know. All guides presuppose advanced knowledge.

Question:

  • Why do you think, you need version 4.08.1, instead of 4.13.1?
  • Why is the precompiled debian package not enough? unison-2.48.4

because version 4.08.1 is installed on the ubuntu server 20.04 LTS. Unison version on both sides must be identical.
The precompiled package is not enough, because it seems to be compiled with a different version of ocaml. That’s the terminal output when trying:

Fatal error: Server: Server: Fatal error during unmarshaling (input_value: unknown custom block identifier),
possibly because client and server have been compiled with different versions of the OCaml compiler.

Make sense. Then you can use this PKGBUILD as template and modify it for the package which is used your server.

It simply convert the deb package into an arch package.

More infos:

1 Like

Hi @exaveal,

unison-2.48 is available in the AUR:

$ pamac search unison    
soundfont-unison                                                                                                                                                                                                               1.00-3                 AUR 
A lean and clean GM/GS soundbank
unison-gtk-2.48.4-compat-bin                                                                                                                                                                                                   2.48.4-2               AUR 
GTK2-GUI for unison. Specific version ${_pkgver}, compatible with parallel installation to other versions of unison binaries (but pay attention to the local user configurations!). Prebuilt binary from debian,
repackaged.
unison-gtk-2.48.4                                                                                                                                                                                                              2.48.4-1               AUR 
Makes the specific version ${_pkgver} of ${_pkgname} available as default ${_pkgname}.
unison-git                                                                                                                                                                                                                     2.51.4.r62.ga39c572-1  AUR 
File-synchronization tool
unison-2.48.4-compat-bin                                                                                                                                                                                                       2.48.4-2               AUR 
File-synchronization tool. Specific version ${_pkgver}, compatible with parallel installation to other versions of unison binaries (but pay attention to the local user configurations!). Prebuilt binary from debian,
repackaged.
unison-2.48.4                                                                                                                                                                                                                  2.48.4-1               AUR 
Makes the specific version ${_pkgver} of ${_pkgname} available as default ${_pkgname}.
unison-240-compat                                                                                                                                                                                                              2.40.128-1             AUR 
File-synchronization tool
unison-232-compat                                                                                                                                                                                                              2.32.52-2              AUR 
File-synchronization tool (legacy 2.32 version). Compatible with parallel installation to other versions of unison binaries (but pay attention to the local user configurations!)
unison                                                                                                                                                                                                                         2.52.1-1               extra 
File-synchronization tool

And I just installed it successfully, so you should also be able to install it with:

pamac build unison-2.48.4

Hope it helps!

Thanks, that helps a lot. I will try it out tomorrow. What I just don’t know how to use the right ocaml version for building.

Maybe look at the offical unison github repo: Releases · bcpierce00/unison · GitHub There are latest builds with all sorts ocaml version. No need to compile them. Example: https://github.com/bcpierce00/unison/releases/download/v2.52.0/unison-v2.52.0+ocaml-4.08.1+x86_64.linux.tar.gz

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.