From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 81270BC6B for ; Thu, 29 Nov 2007 01:18:15 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAI6TTUfAXQImh2dsb2JhbACBW41jAQEBCAopgQ8 X-IronPort-AV: E=Sophos;i="4.23,225,1194217200"; d="scan'208";a="19787441" Received: from discorde.inria.fr ([192.93.2.38]) by mail4-smtp-sop.national.inria.fr with ESMTP; 29 Nov 2007 01:18:15 +0100 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id lAT0IBAg006884 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Thu, 29 Nov 2007 01:18:14 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAI6TTUfU436znmdsb2JhbACBW41jAQEBAQcCCBEYgQ8 X-IronPort-AV: E=Sophos;i="4.23,225,1194217200"; d="scan'208";a="19787440" Received: from moutng.kundenserver.de ([212.227.126.179]) by mail4-smtp-sop.national.inria.fr with ESMTP; 29 Nov 2007 01:18:12 +0100 Received: from gate.lan.gerd-stolpmann.de (dslb-084-059-121-055.pools.arcor-ip.net [84.59.121.55]) by mrelayeu.kundenserver.de (node=mrelayeu3) with ESMTP (Nemesis) id 0MKxQS-1IxX6Z3ucz-0001Sa; Thu, 29 Nov 2007 01:18:12 +0100 Received: from flakew.lan.gerd-stolpmann.de (fw.lan.gerd-stolpmann.de [192.168.1.1]) by gate.lan.gerd-stolpmann.de (Postfix) with ESMTP id 7EE9DC097; Thu, 29 Nov 2007 01:18:11 +0100 (CET) Subject: Re: [Caml-list] Is there a way to statically link an ocaml app compiled to native code against glibc? From: Gerd Stolpmann To: Eric Merritt Cc: caml-list In-Reply-To: References: Content-Type: text/plain Date: Thu, 29 Nov 2007 01:18:10 +0100 Message-Id: <1196295490.2260.23.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX18rV0J0M9+jzyZ9HUjtCfIKcFYBXRH2dYR5nO2 9J51ca1u65hmjpAriRuqilYnLltjns8sXy9M/v77MS0lsWzRZS hf+0JWT9BSoyOF4qntiQjWTBVkqjYFl X-Miltered: at discorde with ID 474E0543.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; statically:01 ocaml:01 gerd:01 stolpmann:01 ocaml:01 statically:01 non-ocaml:01 pointers:01 distro:01 gerd:01 stolpmann:01 viktoriastr:01 64293:01 darmstadt:01 6151:01 Am Mittwoch, den 28.11.2007, 16:06 -0800 schrieb Eric Merritt: > Everyone, > > I have spent quite a bit of time digging around for this on the net > with now luck. We have a pretty simple ocaml app for which we would > like to distribute an executable binary. For the most part this works. > However, we would like to minimize the number of binaries that we are > forced to distribute. We would also like to avoid any confusion on the > part of our users around figuring out which version of glibc they are > using. For example, we would like to avoid distributing a binary for > each version of glibc available. Its more work for us and has a chance > of confusing some of the folks using our work. Considering the > simplicity of our binary it seems like a good solution would be to be > to just statically link against glibc (our only non-ocaml dependency). > So it would be great if someone could give me pointers to docs that > describe how to do this. Extra points if I can easily do this with > OCamlMakefile. If there is another way to accomplish our goals I am > more then willing to entertain them, as there are a lot of potential > problems involved with static linking against glibc. Install some oldish distro somewhere, and link against glibc-2.1. This should run everywhere. At least, this is what the glibc people say about the compatibility of their library. Gerd -- ------------------------------------------------------------ Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de Phone: +49-6151-153855 Fax: +49-6151-997714 ------------------------------------------------------------