From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 299BE7F917 for ; Fri, 6 Jun 2014 19:33:56 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of mshinwell@janestreet.com) identity=pra; client-ip=38.105.200.112; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mshinwell@janestreet.com"; x-sender="mshinwell@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of mshinwell@janestreet.com designates 38.105.200.112 as permitted sender) identity=mailfrom; client-ip=38.105.200.112; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mshinwell@janestreet.com"; x-sender="mshinwell@janestreet.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mxout1.mail.janestreet.com) identity=helo; client-ip=38.105.200.112; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mshinwell@janestreet.com"; x-sender="postmaster@mxout1.mail.janestreet.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApABABv7kVMmachwnGdsb2JhbABZg19ZgmzBGgF+CBYPAQEBAQEGFgk8hAMBAQEEEhEdAQE3AQ8LCwMKAgImAgIhARIBBQEcBhMIARIHiAwDEQMCCKIIaoowd4UBAQWUGQ2GCBEGgSqLHYIiB4J1gUyWF4IQgXqNTIQHGCmEbWs X-IPAS-Result: ApABABv7kVMmachwnGdsb2JhbABZg19ZgmzBGgF+CBYPAQEBAQEGFgk8hAMBAQEEEhEdAQE3AQ8LCwMKAgImAgIhARIBBQEcBhMIARIHiAwDEQMCCKIIaoowd4UBAQWUGQ2GCBEGgSqLHYIiB4J1gUyWF4IQgXqNTIQHGCmEbWs X-IronPort-AV: E=Sophos;i="4.98,990,1392159600"; d="scan'208";a="65781908" Received: from mxout1.mail.janestreet.com ([38.105.200.112]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 06 Jun 2014 19:33:55 +0200 Received: from tot-smtp.delacy.com ([172.27.22.15] helo=tot-smtp) by mxout1.mail.janestreet.com with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1Wsy1Y-0007Qj-BE for caml-list@inria.fr; Fri, 06 Jun 2014 13:33:52 -0400 Received: from tot-dmz-mxgoog1.delacy.com ([172.27.224.14] helo=mxgoog2.janestreet.com) by tot-smtp with esmtps (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Wsy1Y-0007d4-7m for caml-list@inria.fr; Fri, 06 Jun 2014 13:33:52 -0400 Received: from mail-vc0-f180.google.com ([209.85.220.180]) by mxgoog2.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1Wsy1Y-0003or-5J for caml-list@inria.fr; Fri, 06 Jun 2014 13:33:52 -0400 Received: by mail-vc0-f180.google.com with SMTP id hq11so3457572vcb.11 for ; Fri, 06 Jun 2014 10:33:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=NRkX/1XZKI6f3yB5vgqjiOdaVKmHq3Q6ZaAviGXnXEo=; b=IwFLdBFjIYL+rqjvHG90uzZ7PAMhYHkf4jjob4jzgHbbzSADJmCdIiBiWxqy4B9hSI 1HaGaa2m5M/ZfPBCn5vmJDbzXAg/vv57CjLx/PU1fEJ7FrPaB9N4wenBzQzL9RzucH/3 JYb0PLbcDsQKewTbzwdYph8joYLz5TruT6YFc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=NRkX/1XZKI6f3yB5vgqjiOdaVKmHq3Q6ZaAviGXnXEo=; b=ZAsWHqynEXRhjxqnlfYV4Wli1ysHLXLNELjObPvtJ/RsCYls9rvT1LWb+ovx9MSz+L sy+cuGABXvg7PXfL4oEY+nUTrB3o13smWRJu18eMrpu890NrnnbFqXKmB3BAnMJot4Rs CTnR7tDLvMfhOzQ8uUfvhbLDZsPiX/zFB3W/XGz0pXyKDt2NClnHcPRr/YjxJG5cMnZK dXKCNuYHXf8eC/vvtKlXdRElwp23YePf4jGIKEwLxw8Z/vSOmQkI9okvWLH6BIrZMIq0 QmhNvl+QPajvQDYu4a+Wj0LEPNaNves1iS4uWedZ8K6D2aDguQVW7lp7jR5aofdIWV2B ovBg== X-Gm-Message-State: ALoCoQn1qKvfviD/PObkwfQLAEq931ZFSaJFpaJnULDmYdrQvjfEvTJQt+EpchjDpwWgdEdGNVR1kDCfG8X/4zK8AIW2Q5/MTT3XJ5tEzEZmHBU8oXAdGiNnwhTzPbG6GKx9dWTUmQKp X-Received: by 10.52.92.5 with SMTP id ci5mr6217940vdb.62.1402076032016; Fri, 06 Jun 2014 10:33:52 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.52.92.5 with SMTP id ci5mr6217915vdb.62.1402076031829; Fri, 06 Jun 2014 10:33:51 -0700 (PDT) Received: by 10.58.201.225 with HTTP; Fri, 6 Jun 2014 10:33:51 -0700 (PDT) In-Reply-To: References: Date: Fri, 6 Jun 2014 18:33:51 +0100 Message-ID: From: Mark Shinwell To: Andreea Costea Cc: "caml-list@inria.fr" Content-Type: text/plain; charset=UTF-8 X-Validation-by: mshinwell@janestreet.com Subject: Re: [Caml-list] static linking On 6 June 2014 16:43, Andreea Costea wrote: > I'm trying to build a rather big system written in Ocaml, using ocamlbuild. > I managed to set all the needed flags nicely, so that the resulted binaries > can run on any Unix machine, independent on their Ocaml distribution. > However, on certain machines I have problems with the compatibility between > the C libraries. Hence, I tried using "-ccopt -static" for the -lflags and > -cflags, respectively, in order to produce the desired statically linked > binaries while building the project. My advice would be to reconsider carefully why you want to statically link. Read this: http://www.akkadia.org/drepper/no_static_linking.html The most important point is: if you're using a glibc or eglibc-based system, you should not statically link the C library. (The advice is probably similar for other platforms.) You don't say exactly which libraries are causing the compatibility problems, but if it is indeed glibc, then one solution might be to spin up some virtual machines to use when you need to build your system against older versions. Mark