From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA31574; Mon, 19 May 2003 16:01:18 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA09288 for ; Mon, 19 May 2003 16:01:17 +0200 (MET DST) Received: from mail.npc.de (fw.npc.de [62.225.140.214]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h4JE1GH09454 for ; Mon, 19 May 2003 16:01:16 +0200 (MET DST) Received: from pD9E260AD.dip.t-dialin.net (lion.npc.de [192.168.129.1]) by mail.npc.de (Postfix) with ESMTP id 31FEB141A; Mon, 19 May 2003 16:01:15 +0200 (CEST) Received: from hera.ffm.npc.de (hera.ffm.npc.de [192.168.130.8]) by pD9E260AD.dip.t-dialin.net (Postfix STYX NPC GmbH) with ESMTP id DBA4978E0; Mon, 19 May 2003 16:01:12 +0200 (CEST) Received: from ares.ffm.npc.de (ares.ffm.npc.de [192.168.130.32]) by hera.ffm.npc.de (Postfix HERA NPC GmbH) with ESMTP id 74388159BB; Mon, 19 May 2003 16:01:12 +0200 (CEST) Received: from ares.ffm.npc.de (ares.ffm.npc.de [192.168.130.32]) by ares.ffm.npc.de (Postfix ARES NPC GmbH) with ESMTP id 220D8183A; Mon, 19 May 2003 16:01:12 +0200 (CEST) Subject: Re: [Caml-list] Distributing programs From: Gerd Stolpmann To: Johann Spies Cc: caml-list@inria.fr In-Reply-To: <20030519133738.GA6485@sun.ac.za> References: <20030519133738.GA6485@sun.ac.za> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 19 May 2003 16:01:11 +0200 Message-Id: <1053352872.18085.238.camel@ares> Mime-Version: 1.0 X-Spam: no; 0.00; gerd:01 stolpmann:01 caml-list:01 johann:01 spies:01 pcre:01 ocaml-tools:01 ocamlopt:01 pcre-ocaml:01 dynamically:01 -static:01 complained:01 libpcre:01 libcpre:01 usr:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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 executable. > Trying to run the program on a Redhat 7.2 system firstly complained > about a missing libpcre.so.3 file. After copying a libcpre.so.3 from > another system to /usr/local/lib and making a symlink to /usr/lib/ the > next complaint was > > zsh % sncd > sncd: /lib/i686/libc.so.6: 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/libc.so.6. The library prints a nice summary of its features.) Regarding libpcre.so.3: There seems to be no standard for the versions attached to so files. libpcre.so.3 is often called libpcre.so.0 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 -- ------------------------------------------------------------ Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de ------------------------------------------------------------ ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners