Compilation for many Linux distributions

in short, I'm going to release an application written in OCaml, and I planned to distribute it through the source code.

The problem is that the OCaml development system is not something lightweight, not so common as to be installed, so I would like to release it also in binary form for various operating systems.

  • Windows does not cause problems, since I can compile it through cygwin and distribute it using the necessary DLLs
  • OS X is not a problem either, as I can compile it and distribute it easily (no external dependencies on what I tried)

Arriving to Linux problems arise since I don’t know which one is best compiled and distributed. The program itself does not depend on anything (everything is statically connected), but how to cover many distributions?

I have an ubuntu 10 server virtualized with amd64 architecture, I used this machine to test the program under Linux, and everything works fine. Of course, if I try to move the binary to 32-bit ubuntu, it will stop working, and I could not try different distributions ... are there any tricks to handle this problem? (which seems repetitive)

eg:

  • Can I compile both 32-bit and 64-bit from the same computer?
  • Will the binary compiled under ubuntu work in other distributions as well?
  • "" , ?
+3
5
  • , , 64 32- 64- - .. , . , 64-, .

  • , - , . . . , , , script.

  • Debian/Ubuntu dpkg, Redhad/Fedora/Mandriva RPM SUSE/OpenSUSE RPM ( RPM , "" ). .tz.bz2 .run .

  • , , , Oracle Java VirtualBox, , .

+3

. (, Debian, Fedora), , . .

+1

, 32, 64 : http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html

, Ubuntu , , , ( - - ).

, , , Ubuntu...

+1

openSUSE. openSUSE, :

  • openSUSE SUSE
  • Mandiva
  • Fedora
  • Red Hat Enterprise/CentOS
  • Debian
  • Ubuntu
+1

I would recommend you only a package of 32 and 64-bit binaries for .deb and RPM, so you can hit most major distributions (Debian, Fedora, openSUSE, Ubuntu).

Just give clear instructions on installing dependencies, the fu command line for other distributions, etc., and you shouldn't have a big problem just distributing the source archive.

0
source

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


All Articles