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 9A9C47ED7A for ; Thu, 20 Sep 2012 21:50:19 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of Zhi.Han@mathworks.com) identity=pra; client-ip=144.212.95.218; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="Zhi.Han@mathworks.com"; x-sender="Zhi.Han@mathworks.com"; x-conformance=sidf_compatible Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of Zhi.Han@mathworks.com) identity=mailfrom; client-ip=144.212.95.218; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="Zhi.Han@mathworks.com"; x-sender="Zhi.Han@mathworks.com"; x-conformance=sidf_compatible Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp2.mathworks.com) identity=helo; client-ip=144.212.95.218; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="Zhi.Han@mathworks.com"; x-sender="postmaster@smtp2.mathworks.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AskCANJxW1CQ1F/ae2dsb2JhbABFgksjuj8jAQELCwoIFAUigiIBBC0mOAEMHlYXAQ4BBBuHewGYaaFDkH5gA6hsghc X-IronPort-AV: E=Sophos;i="4.80,455,1344204000"; d="scan'208,217";a="156442125" Received: from smtp2.mathworks.com ([144.212.95.218]) by mail4-smtp-sop.national.inria.fr with ESMTP; 20 Sep 2012 21:50:18 +0200 Received: from mail-vif.mathworks.com (newscl02ah.mathworks.com [144.212.95.122]) by smtp2.mathworks.com (8.13.8/8.12.11) with ESMTP id q8KJoGLY009727 for ; Thu, 20 Sep 2012 15:50:17 -0400 (EDT) Received: from EXHUB-01-AH.ad.mathworks.com (exhub-01-ah.mathworks.com [172.31.22.59]) by mail-vif.mathworks.com (8.13.8/8.13.8) with ESMTP id q8KJoGVo006065 for ; Thu, 20 Sep 2012 15:50:16 -0400 (EDT) Received: from exmb-01-ah.ad.mathworks.com ([fe80::3987:755c:46c7:f770]) by EXHUB-01-AH.ad.mathworks.com ([::1]) with mapi id 14.02.0283.003; Thu, 20 Sep 2012 15:50:16 -0400 From: Zhi Han To: "caml-list@inria.fr" Thread-Topic: Build OCaml on linux Thread-Index: Ac2XaSaEhpHlHaoKTmCUTyXroToZlg== Date: Thu, 20 Sep 2012 19:50:15 +0000 Message-ID: <04644211E51C7E40BF64101089F97E4D0A7AE3DD@exmb-01-ah.ad.mathworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.28.154.42] Content-Type: multipart/alternative; boundary="_000_04644211E51C7E40BF64101089F97E4D0A7AE3DDexmb01ahadmathw_" MIME-Version: 1.0 X-Validation-by: zhi.han@mathworks.com Subject: [Caml-list] Build OCaml on linux --_000_04644211E51C7E40BF64101089F97E4D0A7AE3DDexmb01ahadmathw_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, I found that the OCaml executable "bin/ocaml" is built by default as an byt= ecode 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 exec= ute them. I am wondering what are the switches that makes the Windows build= work. Can somebody help me with that? Thanks, Zhi --_000_04644211E51C7E40BF64101089F97E4D0A7AE3DDexmb01ahadmathw_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

I found that the OCaml executable “bin/ocaml&#= 8221; 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 be= cause our build process copies the executables from place to place. When the files are moved, the old location of the file is left i= n the first line of the bytecode file.

 

However, same issues does not exists on Windows buil= d. The files are built as executables and we can move these files around an= d 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,

 

Zhi

--_000_04644211E51C7E40BF64101089F97E4D0A7AE3DDexmb01ahadmathw_-- 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 1D8477ED7A for ; Sat, 22 Sep 2012 21:52:14 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of krismicinski@gmail.com) identity=pra; client-ip=209.85.212.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="krismicinski@gmail.com"; x-sender="krismicinski@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of krismicinski@gmail.com designates 209.85.212.54 as permitted sender) identity=mailfrom; client-ip=209.85.212.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="krismicinski@gmail.com"; x-sender="krismicinski@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-vb0-f54.google.com) identity=helo; client-ip=209.85.212.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="krismicinski@gmail.com"; x-sender="postmaster@mail-vb0-f54.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjIBACEWXlDRVdQ2kGdsb2JhbABFviUIIwEBAQEJCQ0HFAQjgiABAQEEEgIsARsdAQMMBgULDS4iAREBBQEOAQ0GEyKHUAEDDwuZfQkDjCaCdYQ/ChknDVmIdAEFDIsQhioDlWWBFY0vFimEIw X-IronPort-AV: E=Sophos;i="4.80,468,1344204000"; d="scan'208,223";a="156611737" Received: from mail-vb0-f54.google.com ([209.85.212.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 22 Sep 2012 21:52:13 +0200 Received: by vbmv11 with SMTP id v11so8413102vbm.27 for ; Sat, 22 Sep 2012 12:52:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=5ahAdJkK46t4KulW5Z677/Hzeqd8U1I6yBS63IqDJwE=; b=T6DCS+r1kkkWeF9o04wIEZEV4GP9Ux6j6CMfsfckYVkDHikShYbOMX9BAj0FrLgz+1 KVePAiq+M48ajP4p6fV/lGIEpQ2ppDSRsTfnw1HOvnAyz9ne7wreGriQVSVGX9lv2oCF TugC7bKJFZubNsWEbYUPEO+3LaqC0b3t0Fo+G4EGnVNdLPOxkaUFXse4Gcar8H9rkOpT 0i7enk+V4vtSod6fgAbUI8JL2wUQM6Pyfm82UwTfxs05xYEodDEqhRHY7NKQ6HIRmvuS fi7PHEKRZtAHlq441EO4n712oj35K8Wxx/L84aDu5RPNWqAMcO7wsEH2iJPKzSzvHwtX yWNw== MIME-Version: 1.0 Received: by 10.58.4.131 with SMTP id k3mr5055850vek.54.1348343531869; Sat, 22 Sep 2012 12:52:11 -0700 (PDT) Received: by 10.58.95.104 with HTTP; Sat, 22 Sep 2012 12:52:11 -0700 (PDT) In-Reply-To: <04644211E51C7E40BF64101089F97E4D0A7AE3DD@exmb-01-ah.ad.mathworks.com> References: <04644211E51C7E40BF64101089F97E4D0A7AE3DD@exmb-01-ah.ad.mathworks.com> Date: Sat, 22 Sep 2012 15:52:11 -0400 Message-ID: From: Kristopher Micinski To: Zhi Han Cc: "caml-list@inria.fr" Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] Build OCaml on linux =46rom the INSTALL notes (http://caml.inria.fr/pub/distrib/ocaml-3.12/notes/INSTALL) ... 4- If your platform is supported by the native-code compiler (as reported during the autoconfiguration), you can now build the native-code compiler. From the top directory, do: make opt or: make opt > log.opt 2>&1 # in sh make opt >& log.opt # in csh Is that the sort of thing for which you're looking? kris On Thu, Sep 20, 2012 at 3:50 PM, Zhi Han wrote: > Hi, > > > > I found that the OCaml executable =93bin/ocaml=94 is built by default as = an > bytecode on Linux, i.e., it requires =91bin/ocamlrun=94 to run it. This h= as > caused some issues in our group because our build process copies the > executables from place to place. When the files are moved, the old locati= on > 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, > > > > Zhi 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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id 7C9E67ED7A for ; Sun, 23 Sep 2012 02:33:06 +0200 (CEST) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of thelema314@gmail.com) identity=pra; client-ip=209.85.223.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="thelema314@gmail.com"; x-sender="thelema314@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail1-smtp-roc.national.inria.fr: domain of thelema314@gmail.com designates 209.85.223.182 as permitted sender) identity=mailfrom; client-ip=209.85.223.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="thelema314@gmail.com"; x-sender="thelema314@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ie0-f182.google.com) identity=helo; client-ip=209.85.223.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="thelema314@gmail.com"; x-sender="postmaster@mail-ie0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnUCAChYXlDRVd+2m2dsb2JhbABFhUS4YQgjAQEBAQEICQsJFCeCIAEBAQQSAiQIARscAgMMBgULDQkWDwkDAgECARERAQUBHBMIAQEeh1ABAw+ZfQkDjCaCdYQhChknDVmIdAEFDIsQgwqDIAOVZYVhiGM/hCM X-IronPort-AV: E=Sophos;i="4.80,469,1344204000"; d="scan'208";a="174246388" Received: from mail-ie0-f182.google.com ([209.85.223.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 23 Sep 2012 02:33:05 +0200 Received: by ieak10 with SMTP id k10so9015174iea.27 for ; Sat, 22 Sep 2012 17:33:04 -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=MLMEenX15nnpuNPggTMKt3dw2v27fPSijXOMqJVcxbk=; b=tUxm4UFBijS/QcNcaHauLvZU+VZ4ebB7noCBZQ4Z+iAQBYJWVrC5W8ykHwjvsda354 PpAIqyKbZ+RSbNPXYi6OmbyE9l/dewk+1Q8S8Ud4AO+WbnwFRF75A3i0mPg2PRlO84X6 o/Pych0gEkY8wEXlPc2BCQTKjURwWQPfzBKn9gtE0x0jKBfeZ0RTFpk5kbvVzK3F6GQj 3/uCbtzTkNCG0m0vSYrKcMMjlwhk+F96xxDalSVYnjmWxxv5cYL1bNjW4Rs1fX8aIntW I81me8TL7O4KSbQhDyNuXo75otqFVGTfp0n8CLBoRLQihzCwuuxFVysUNY4xUU0lzSlB EQ+g== Received: by 10.50.140.65 with SMTP id re1mr2021540igb.68.1348360384711; Sat, 22 Sep 2012 17:33:04 -0700 (PDT) Received: from [192.168.24.238] ([50.33.151.22]) by mx.google.com with ESMTPS id a10sm4690331igd.1.2012.09.22.17.33.02 (version=SSLv3 cipher=OTHER); Sat, 22 Sep 2012 17:33:03 -0700 (PDT) Message-ID: <505E58BD.3030909@gmail.com> Date: Sat, 22 Sep 2012 20:33:01 -0400 From: Edgar Friendly User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: caml-list@inria.fr References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] Build OCaml on linux On 9/22/2012 4:58 PM, Didier Cassirame wrote: > The first line of the bytecode executable is just a hint for the shell to > locate the bytecode interpreter. it might not hurt to have the default hint to the shell be: #!/usr/bin/env ocamlrun This would make it harder to have multiple OCaml installations and run the compiler of one while the PATH is set to the other, but this is a pretty edge case. Is there any other problem with doing this? E. 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 CBB897ED7A for ; Sun, 23 Sep 2012 02:56:45 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of wojciech.meyer@googlemail.com) identity=pra; client-ip=74.125.82.182; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="wojciech.meyer@googlemail.com"; x-sender="wojciech.meyer@googlemail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of wojciech.meyer@googlemail.com designates 74.125.82.182 as permitted sender) identity=mailfrom; client-ip=74.125.82.182; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="wojciech.meyer@googlemail.com"; x-sender="wojciech.meyer@googlemail.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-we0-f182.google.com) identity=helo; client-ip=74.125.82.182; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="wojciech.meyer@googlemail.com"; x-sender="postmaster@mail-we0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmsBAMpdXlBKfVK2kGdsb2JhbABFhUS4YQgjAQEBAQkJDQcUBCOCIAEBAQMBEgIsAQE3AQQLCwsDCgklDwEEDRMBBQEiEyKHUAEDCQYEmXgJA4pohDMBBYQWCkANiU0GijpihiqUE4FVgRWKBIMrP4QI X-IronPort-AV: E=Sophos;i="4.80,469,1344204000"; d="scan'208";a="156618658" Received: from mail-we0-f182.google.com ([74.125.82.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 23 Sep 2012 02:56:45 +0200 Received: by weyx56 with SMTP id x56so4082666wey.27 for ; Sat, 22 Sep 2012 17:56:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=6uhL9s7H/I1NPbi7FSQCPEBy2c1EeWoORfAs0EXsVmg=; b=z53nL/g6smT0ZuJMPq09OiesaZjAUUiH8Es+MUxlAjUO7C0j9DPftMn+6YQL7tJwSj nLemGkkCg+95bx9FT0BzZZW/l+D6Oho3kFH947Jlz583psLb38a1Fr6vXa5jol/efvyI jSinKbV3D4MYbGNDf/5f/8qAPKWopZTHthF+LHlRJLGFNOHsGTskqDnVN6YVbdvBWlRw 7WIzlhFTwW8JCGOC7xSV9UmXx25nfOZQPNiCKE3LY3s/Hg+b11gh84TPqymSPzvd52xS ZxkvvdGr7iSm7B4U4bN8idoczxvpC+yKciOFkFObbk9kbU7thWG73SEBMHNaaH04gEM0 VefQ== Received: by 10.180.82.164 with SMTP id j4mr5582184wiy.18.1348361804551; Sat, 22 Sep 2012 17:56:44 -0700 (PDT) Received: from spec-desktop.danmey.org (cpc1-cmbg12-0-0-cust201.5-4.cable.virginmedia.com. [86.9.116.202]) by mx.google.com with ESMTPS id l6sm6463496wiz.4.2012.09.22.17.56.42 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 22 Sep 2012 17:56:43 -0700 (PDT) From: Wojciech Meyer To: Edgar Friendly Cc: caml-list@inria.fr References: <505E58BD.3030909@gmail.com> Date: Sun, 23 Sep 2012 01:56:57 +0100 In-Reply-To: <505E58BD.3030909@gmail.com> (Edgar Friendly's message of "Sat, 22 Sep 2012 20:33:01 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Caml-list] Build OCaml on linux Edgar Friendly writes: > On 9/22/2012 4:58 PM, Didier Cassirame wrote: >> The first line of the bytecode executable is just a hint for the shell to >> locate the bytecode interpreter. > it might not hurt to have the default hint to the shell be: > #!/usr/bin/env ocamlrun > This would make it harder to have multiple OCaml installations and run > the compiler of one while the PATH is set to the other, but this is a > pretty edge case. Is there any other problem with doing this? No there is no other problem, but if you want to run an image with a different compiler in a different root, just use different ocamlrun. > > E. -- Wojciech Meyer http://danmey.org 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 3F4E67ED7A for ; Tue, 25 Sep 2012 02:36:26 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of berenger@riken.jp) identity=pra; client-ip=134.160.33.162; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="berenger@riken.jp"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of berenger@riken.jp designates 134.160.33.162 as permitted sender) identity=mailfrom; client-ip=134.160.33.162; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="berenger@riken.jp"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of postmaster@postman.riken.jp designates 134.160.33.162 as permitted sender) identity=helo; client-ip=134.160.33.162; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="postmaster@postman.riken.jp"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AukAAOH7YFCGoCGimWdsb2JhbABFhgu4fwEBAQEBCAsLBxQngiABAQQBIxVNBAsRBAEBAQICBR4DAgIPAhAlCQgTBgIBAYdvAwkGC6YWgjuGdg2JU4EhiRhihTCBEgOIVIlggVyBVYEVhEyFOIgA X-IronPort-AV: E=Sophos;i="4.80,478,1344204000"; d="scan'208";a="156790785" Received: from postman2.riken.jp (HELO postman.riken.jp) ([134.160.33.162]) by mail4-smtp-sop.national.inria.fr with ESMTP; 25 Sep 2012 02:36:23 +0200 Received: from postman.riken.jp (postman2.riken.jp [127.0.0.1]) by postman.riken.jp (Postfix) with SMTP id EF6BF1260584 for ; Tue, 25 Sep 2012 09:36:19 +0900 (JST) Received: from [172.27.98.103] (rikad98.riken.jp [134.160.214.98]) by postman.riken.jp (Postfix) with ESMTPA id 99F64127006E for ; Tue, 25 Sep 2012 09:36:19 +0900 (JST) Message-ID: <5060FC83.70204@riken.jp> Date: Tue, 25 Sep 2012 09:36:19 +0900 From: Francois Berenger 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> <04644211E51C7E40BF64101089F97E4D0A7B38C9@exmb-01-ah.ad.mathworks.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.6.0.2009776, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.9.25.2417 Subject: Re: [Caml-list] Build OCaml on linux Did someone mentioned ocamlbrew in order to perform installation automatically? https://github.com/hcarty/ocamlbrew It also installs a few useful stuffs (oasis, odb, etc.). This is what I use in our lab to install OCaml in user's home in case they have a non Debian-like Linux distro. Regards, F. On 09/25/2012 06:42 AM, Didier Cassirame wrote: > Hi, > > First of, my apologies, I made a few mistakes in my previous message, > which probably contributed to confuse everyone: > - the -stdlib parameter doesn't exist, the correct parameter is "-I > " > - I actually cannot tell if the ocamlrun binary relies on a bytecode > executable version number (that said a version number exists in compiled > libraries), > > Regarding your problem, according to my own tests, it is not safe to > change the shebang line in bytecode executables. It is > preferable to explicitely launch a bytecode program with the interpreter > corresponding to the compiler used to build the program. > > Sorry again for the generated confusion, > > didier > > 2012/9/24 Zhi Han > > > Hi, > > Thanks everyone for the help so far. I was going through the > Makefile and it appears that there is a native target 'ocamlnat'. If > I do 'make ocamlnat' after 'make world.opt' that should create a > native executable toplevel that does not require 'ocamlrun', right? > It is a little odd because I presume 'make world.opt' would make all > native targets. > > The workflow we want to support is: > Build OCaml from source on a machine and copy the installation to a > server. > > 1) Store the OCaml at a shared file server, so that users can setup > a few environment variables to use the shared OCaml. > > 2) When the users have intermittent network problems, they shall be > able to copy the network version to their machine and setup the > environment to use the local version. > > Having the byte code really adds complexity to these workflows. Is > it safe to simply edit the bytecode to modify the first line? > > Zhi > > -----Original Message----- > From: Didier Cassirame [mailto:didier.cassirame@gmail.com > ] > Sent: Saturday, September 22, 2012 4:59 PM > To: Zhi Han; caml-list@inria.fr > Subject: Re: [Caml-list] Build OCaml on linux > > Hello Zhi and Everyone, > > The first line of the bytecode executable is just a hint for the > shell to locate the bytecode interpreter. Nothing stops you from > running a given bytecode executable with the interpreter of your > choice, provided it supports the file revision of said executable. > > So, you have two options : > the first one is to keep track of the location of the ocamlrun > binary, and prepend every command line running ocaml, ocamlc, > ocamlopt with the full path to ocamlrun, i.e. : > > $ /path/to/ocamlrun ocamlc myfile.ml > > instead of > > $ ocamlc myfile.ml > > You may have to give the full path to ocamlc as well, and perhaps > also indicate the location of the stdlib if they are also moved from > their default location (use the -stdlib command line parameter of > ocamlc). > > The second option is to recompile the ocaml software from source > (you are perhaps already doing that, if you are moving the > executables around), specifying the final install location of the > binaries at the configuration step (see INSTALL in the source tar ball). > > cheers, > > didier > > 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