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.4 required=5.0 tests=HTML_MESSAGE,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 27D1BBC6B for ; Thu, 29 Nov 2007 06:14:31 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAACvZTUdA6bjukGdsb2JhbACCPTaMUgEBAQEHBAQkB4EP X-IronPort-AV: E=Sophos;i="4.23,227,1194217200"; d="scan'208";a="5046918" Received: from discorde.inria.fr ([192.93.2.38]) by mail1-smtp-roc.national.inria.fr with ESMTP; 29 Nov 2007 06:14:30 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id lAT5EUPk013837 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Thu, 29 Nov 2007 06:14:30 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAACvZTUdA6bjukGdsb2JhbACCPTaMUgEBAQEHBAQkB4EP X-IronPort-AV: E=Sophos;i="4.23,227,1194217200"; d="scan'208";a="5046917" Received: from wr-out-0506.google.com ([64.233.184.238]) by mail1-smtp-roc.national.inria.fr with ESMTP; 29 Nov 2007 06:14:29 +0100 Received: by wr-out-0506.google.com with SMTP id c57so1485011wra for ; Wed, 28 Nov 2007 21:14:29 -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:cc:in-reply-to:mime-version:content-type:references; bh=vBRCLgVE2wGJvPpIrMenUIWuQ6/Taym2+BAGg4lhapU=; b=j9ag6dunh0JOSM+swcWM/bBmE7kW821N+FN73SoVnaFK/jMVFuZmpXxFfh3T0GqweMxjoktySkT4x/HDj1MJ1xbWoD6rp2P9Rmy1JZ/fzgS/R5Ip2NjM5m/ahj5r+y0jMM9Wt/tf4JsajlbYTc+PT7mc45FtN0lCuWOfZ5sOap0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=HbJb1HdNWJk54GNH+B7UkflN7DcfPzOw6ssHBH5unS5n6nTIHF2MQX7NYtl+FJnbD/j/q/vTCrhFmVkCLqqtCyYyE1MlXHWFyySAR6p8lD+l1C2GVn4uPhX6BzOPwhe/jURYE02AFDhaQDGIyI/8XYK3N4i4Wmp7LaGX9UNVHug= Received: by 10.143.5.21 with SMTP id h21mr539670wfi.1196313268143; Wed, 28 Nov 2007 21:14:28 -0800 (PST) Received: by 10.142.43.11 with HTTP; Wed, 28 Nov 2007 21:14:28 -0800 (PST) Message-ID: Date: Wed, 28 Nov 2007 21:14:28 -0800 From: "Garrett Jones" To: "Eric Merritt" Subject: Re: [Caml-list] Is there a way to statically link an ocaml app compiled to native code against glibc? Cc: caml-list In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3827_15555503.1196313268134" References: X-Miltered: at discorde with ID 474E4AB6.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; statically:01 ocaml:01 ldflags:01 -wl:01 ocaml:01 statically:01 non-ocaml:01 pointers:01 beginner's:01 bug:01 ldflags:01 -wl:01 non-ocaml:01 pointers:01 beginner's:01 ------=_Part_3827_15555503.1196313268134 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline (resending to include the list) This setting works for me with OCamlMakefile: LDFLAGS = -Wl,-Bstatic On Nov 28, 2007 4:06 PM, Eric Merritt wrote: > 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 > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > ------=_Part_3827_15555503.1196313268134 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline (resending to include the list)

This setting works for me with OCamlMakefile:

LDFLAGS = -Wl,-Bstatic

On Nov 28, 2007 4:06 PM, Eric Merritt < cyberlync@gmail.com> wrote:
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

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

------=_Part_3827_15555503.1196313268134--