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 > >