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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 09D8C7ED7A for ; Tue, 25 Sep 2012 19:53:30 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of fabrissimo@gmail.com) identity=pra; client-ip=74.125.83.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="fabrissimo@gmail.com"; x-sender="fabrissimo@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of fabrissimo@gmail.com designates 74.125.83.54 as permitted sender) identity=mailfrom; client-ip=74.125.83.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="fabrissimo@gmail.com"; x-sender="fabrissimo@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ee0-f54.google.com) identity=helo; client-ip=74.125.83.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="fabrissimo@gmail.com"; x-sender="postmaster@mail-ee0-f54.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8EAHTuYVBKfVM2k2dsb2JhbABFJ74zCCMBAQEBCQkLCRQEI4IgAQEBBBICHgEFCAEbHAIDDAYFCw0JFg8JAwIBAgEREQEFAQ4BDRMIAQEeh1ABAw8Emj8JA4wlgWyBCYU8ChknDVmIdQEFDIsOgyKDIAOVZoVhiGg/hAk X-IronPort-AV: E=Sophos;i="4.80,484,1344204000"; d="scan'208";a="156898912" Received: from mail-ee0-f54.google.com ([74.125.83.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 25 Sep 2012 19:53:29 +0200 Received: by eekc50 with SMTP id c50so1157443eek.27 for ; Tue, 25 Sep 2012 10:53:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=FIdS0zqN0urn7SFX2cfOP8Bi4C0YPBwwjIaxDsHFNLs=; b=OmrycQnM9rT/ZHRRdr7e73nUqUdEKoSMfLRcfoaqGciiXTFheYj2Heqp/q0tc42+fX A5i6BWt5b61q9rAulqOLmKonh6IYqD+Il3FvdV3ou7eDvQLf2f8oEnViZmrloZ7HcqO1 HQVxLhuXUQ3fVJqlXXwUG3XePyE8t/R5842dTNczl6o4nm6jqbML8HlcBykA50CRO+rZ i4BILudBVIlhnFI0SPzM5rEh4tcTBT/zkYGHhaNkySYdf7gAomlVMq95KX283nDYBrOW +IwUQVJ13z7SNrNcMN1Gu/PYdGBhGSDDeGm4KSU915ZeL4gLqTaaORJy+p5beGcuZKqj J3fQ== Received: by 10.14.204.72 with SMTP id g48mr21949882eeo.45.1348595609156; Tue, 25 Sep 2012 10:53:29 -0700 (PDT) Received: from [193.55.250.250] (chercheurs2-250.saclay.inria.fr. [193.55.250.250]) by mx.google.com with ESMTPS id 46sm2708573eef.17.2012.09.25.10.53.27 (version=SSLv3 cipher=OTHER); Tue, 25 Sep 2012 10:53:28 -0700 (PDT) Message-ID: <50617877.4050507@gmail.com> Date: Tue, 25 Sep 2012 11:25:11 +0200 From: Fabrice Le Fessant User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0 MIME-Version: 1.0 To: caml-list@inria.fr References: <04644211E51C7E40BF64101089F97E4D0A7AE3DD@exmb-01-ah.ad.mathworks.com> In-Reply-To: <04644211E51C7E40BF64101089F97E4D0A7AE3DD@exmb-01-ah.ad.mathworks.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Validation-by: fabrice.le_fessant@inria.fr Subject: Re: [Caml-list] Build OCaml on linux Hi, On 09/20/2012 09:50 PM, Zhi Han wrote: > I found that the OCaml executable “bin/ocaml” is built by default as an > bytecode on Linux, i.e., it requires ‘bin/ocamlrun” to run it. This has > caused some issues in our group because our build process copies the > executables from place to place. When the files are moved, the old > location of the file is left in the first line of the bytecode file. > > However, same issues does not exists on Windows build. The files are > built as executables and we can move these files around and still be > able to execute them. I am wondering what are the switches that makes > the Windows build work. Can somebody help me with that? Thanks, On Linux, the first line of a non-custom bytecode executable indicates the full path to ocamlrun. You can create a relocatable executable using: cat `which ocamlrun` `which ocamlc` > ocamlc.byte On Windows, a small loader is included at the beginning of each bytecode executable, that locates 'ocamlrun' in the PATH, and run it on the executable, so the only requirement is to have ocamlrun in your PATH. --Fabrice