Deploying a Standalone OCaml Native Application

I need to deploy in Linux a field of my own OCaml application, which depends on several dynamic libraries. The idea is to prepare a standalone package (without dependencies on OCaml, OPAM, etc.), which contains all the materials, and can be installed hypothetically in any modern Linux x84 box. In an ideal world, there will be only one file that will be deployed and launched.

The best I can think of is to deploy all the necessary dynamic libraries ( ldd app.native) along with the executable software and run the application using a bash script that exports LD_LIBRARY_PATHbefore invoking the application.

Any ideas on how to do this better are welcome.

UPDATE

Some tips:

  • Use the Linux application checker to check compatibility with various Linux distributions.
  • Build the binary package on a stable but slightly outdated distribution (e.g. CentOS 6 at the moment) to improve compatibility libc.
  • Sample scripts build a binary package and run an executable file.
+4
source share
1 answer

OCaml . OCaml OCaml. OCaml, script LD_LIBRARY_PATH, rpath, dlopen , . libc , .. libc.

+6

Source: https://habr.com/ru/post/1584127/


All Articles