From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id pBIFKKTi030564 for ; Sun, 18 Dec 2011 16:20:20 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmQDAG0D7k7AbSoIe2dsb2JhbABDhQyWEJA9IgEBFiYEIYFyAQEFI0sLEAsJDAMCAgkdAgIUDQsZGBMSh2oGpVaRBBOBHIJKhnUzYwSNRINhg1iKb4dB X-IronPort-AV: E=Sophos;i="4.71,371,1320620400"; d="scan'208";a="123819306" Received: from einhorn.in-berlin.de ([192.109.42.8]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Dec 2011 16:20:14 +0100 X-Envelope-From: oliver@first.in-berlin.de Received: from first (e178025225.adsl.alicedsl.de [85.178.25.225]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id pBIFKCRP019938 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 18 Dec 2011 16:20:12 +0100 Received: by first (Postfix, from userid 1000) id 7F0941540253; Sun, 18 Dec 2011 16:20:12 +0100 (CET) Date: Sun, 18 Dec 2011 16:20:12 +0100 From: oliver To: Jacques Garrigue Cc: Dmitry Grebeniuk , caml-list@inria.fr Message-ID: <20111218152012.GC2081@siouxsie> References: <-3085435649396878115@unknownmsgid> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <-3085435649396878115@unknownmsgid> User-Agent: Mutt/1.5.20 (2009-06-14) X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Subject: Re: [Caml-list] bytecode: ./prog vs ocamlrun ./prog and with "which ocamlrun" you get the info, which one is used. Ciao, Oliver On Sun, Dec 18, 2011 at 01:30:25PM +0900, Jacques Garrigue wrote: > This basically means that you have 2 ocamlrun on this machine. > ./prog calls ocamlrun with a fixed path, but the 1st ocamlrun is your > path is an incompatible one. > Do "head -1 prog" to see the right ocamlrun. > > Jacques Garrigue > > ----- > From: Dmitry Grebeniuk > > Hello. > > The OCaml manual states that executing bytecode program > with "./prog" and "ocamlrun ./prog" should give the same result > (in simple case, without options and environment modifications). > However in my case the result is different: "./prog" executes > well, but "ocamlrun ./prog" gives > "Fatal error: unknown C primitive `unix_dup'". > > But I have no good minimal case (other small unix.cma-dependent > programs run fine both ways), and I can't show the full sources due > to my contract with employer. > I suspect this issue can give me additional headache in the future, > so I prefer to solve it now. > > How can I find the source of this problem? > > What I have checked for now: > - host OS is linux (gentoo, fresh enough) > - the host contains (and contained ever) only one OCaml installation > (3.11.2), and I can't install more recent OCaml versions > system-wide (and I want this program to work under system-wide > 3.11.2 anywhere) > - ocaml toplevel doesn't fail on "#load "unix.cma"" and on calls to > functions of Unix module > - this system doesn't provide ocamlobjinfo, so I can't read its output > - the program is built with ocamlbuild, without custom myocamlbuild.ml > and other C-specific options, however some libraries may use > C bindings (I'll check this if it is important) > - I've tried to set environment variable LD_DEBUG=libs and run > both cases: "ocamlrun ./prog" output is pasted to > http://paste.in.ua/3499/raw/ , "./prog" output is pasted to > http://paste.in.ua/3500/raw/ , but I don't understand where > the problem is, even after meditation on these logs > > What should I do to diagnose this problem? > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa-roc.inria.fr/wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa-roc.inria.fr/wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >