Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Distributing programs
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-05-19 (14:01)
From: Gerd Stolpmann <info@g...>
Subject: Re: [Caml-list] Distributing programs
Am Mon, 2003-05-19 um 15.37 schrieb Johann Spies:
> I have developed a program on Debian Sarge Linux using pcre and
> ocaml-tools.  I thought that a static (ocamlopt) compilation of the
> program would allow me to run it on other Linux systems without having
> to install ocaml (or pcre-ocaml) on them.  But this seems not to be
> the case.

The ocamlopt executables are not fully static. Only the compiled O'Caml
code is static, the system libraries are dynamically linked.

Add -ccopt -static to the ocamlopt call to produce a fully static

> Trying to run the program on a Redhat 7.2 system firstly complained
> about a missing file.  After copying a from
> another system to /usr/local/lib and making a symlink to /usr/lib/ the
> next complaint was 
> zsh % sncd
> sncd: /lib/i686/ version `GLIBC_2.3' not found (required by
> sncd)

It is not possible to compile a program on a glibc-2.3 system and run it
on a glibc-2.2 system. The reverse way should work, though. (You can 
find out the glibc version number by _running_ /lib/ The
library prints a nice summary of its features.)

Regarding There seems to be no standard for the versions
attached to so files. is often called because
the author of pcre does not add a version number, and the Linux
distributors often follow this decision. Not nice.

> I then installed ocaml-3.06-1.src.rpm on the system and did a rpm -ba,
> installed the binary package, converted Debian libpcre-ocaml-packages
> to rpm's, installed it and recompiled my program (sncd) and ... at
> last I have sncd running.
> Is there an easier way distribute a binary program?

Unfortunately, this is still a major problem for Linux. Static
executables are no real solution, and especially glibc should be
dynamically linked to enable all the special configurations of the
system (e.g. special login modules and all that).

Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: