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=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 41495BC6B for ; Thu, 29 Nov 2007 01:06:20 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAHORTUfRVaK0kmdsb2JhbACPPgEBAQEHAgYTFoER X-IronPort-AV: E=Sophos;i="4.23,225,1194217200"; d="scan'208";a="5038473" Received: from concorde.inria.fr ([192.93.2.39]) by mail1-smtp-roc.national.inria.fr with ESMTP; 29 Nov 2007 01:06:20 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id lAT06Fb2005668 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Thu, 29 Nov 2007 01:06:20 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAHORTUfRVaK0kmdsb2JhbACPPgEBAQEHAgYTFoER X-IronPort-AV: E=Sophos;i="4.23,225,1194217200"; d="scan'208";a="5038472" Received: from el-out-1112.google.com ([209.85.162.180]) by mail1-smtp-roc.national.inria.fr with ESMTP; 29 Nov 2007 01:06:19 +0100 Received: by el-out-1112.google.com with SMTP id m34so877536ele for ; Wed, 28 Nov 2007 16:06:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=bpnaVqA9ERikcWfbYh8kRuUFUeQft/WpLbXAiPRCsVU=; b=rnIsr8AAzS322wz9kMNZAfpigezY6dI+GapTJpq8K36FBPNXdG4t+gpuzmvA1X9jfl8JCJNijhlkF7LWO3iuLKl7hxxiMhA8u0TGzsCJQa1RH2sI0YHlRcbEIL7J94VNGIg/BzvZLOHjyLb9XpNCDgqaGR+tImrfNLokvf60MEg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=mybHui9tovxmDnPUlxsnD7kI2jEM2G0onriStuC4ff5stKco+8yV42Xyzs23LhsW25elsjO4fN2YI/swQgCJF+YAXCWiWt+/WVG1HOzdQOgqlSkkQEd6I7m0mR2eSrf4c/PhVgXgcujcmT0hjJdOUsEqMkEa/mV4hErGEGsxtGg= Received: by 10.142.88.20 with SMTP id l20mr1732092wfb.1196294777516; Wed, 28 Nov 2007 16:06:17 -0800 (PST) Received: by 10.142.133.16 with HTTP; Wed, 28 Nov 2007 16:06:17 -0800 (PST) Message-ID: Date: Wed, 28 Nov 2007 16:06:17 -0800 From: "Eric Merritt" To: caml-list Subject: Is there a way to statically link an ocaml app compiled to native code against glibc? MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Miltered: at concorde with ID 474E0277.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; statically:01 ocaml:01 ocaml:01 statically:01 non-ocaml:01 pointers:01 binaries:01 glibc:01 glibc:01 dependency:01 binary:02 binary:02 confusing:02 linking:02 merritt:02 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. Thanks, Eric