From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA21671; Tue, 24 Apr 2001 09:09:06 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA22109 for caml-list@pauillac.inria.fr; Tue, 24 Apr 2001 09:09:05 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA16713 for ; Mon, 23 Apr 2001 21:58:23 +0200 (MET DST) Received: from moutvdom01.kundenserver.de (moutvdom01.kundenserver.de [195.20.224.200]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f3NJwM900792 for ; Mon, 23 Apr 2001 21:58:22 +0200 (MET DST) Received: from [195.20.224.220] (helo=mrvdom04.kundenserver.de) by moutvdom01.kundenserver.de with esmtp (Exim 2.12 #2) id 14rmTW-0003JV-00; Mon, 23 Apr 2001 21:58:22 +0200 Received: from drms-3e364b6e.pool.mediaways.net ([62.54.75.110] helo=ice.gerd-stolpmann.de) by mrvdom04.kundenserver.de with esmtp (Exim 2.12 #2) id 14rmTQ-0008Of-00; Mon, 23 Apr 2001 21:58:16 +0200 Received: from localhost (localhost [[UNIX: localhost]]) by ice.gerd-stolpmann.de (8.9.3/8.9.3) id VAA27871; Mon, 23 Apr 2001 21:57:49 +0200 From: Gerd Stolpmann Reply-To: gerd@gerd-stolpmann.de Organization: privat To: Steve Stevenson , caml-list@inria.fr Subject: Re: [Caml-list] Help using unix library? Date: Mon, 23 Apr 2001 21:52:01 +0200 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain References: <15071.19327.151495.618688@merlin.cs.clemson.edu> In-Reply-To: <15071.19327.151495.618688@merlin.cs.clemson.edu> MIME-Version: 1.0 Message-Id: <01042321574905.02753@ice> Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, 19 Apr 2001, Steve Stevenson wrote: >Good afternoon: > > I have references to the unix library using ocaml 3.01. The make >file has > > ebv0: $(BASICOBJECTS) > ocamlc -g -o ebv0 unix.cma $(BASICOBJECTS) > cp ebv0 Test/ebv0 > >where BASICOBJECTS are all ocaml .cmo files. The complaint is > >Fatal error: this bytecode file cannot run on this bytecode interpreter >Mismatch on primitive `unix_dup' > >Does this sound like an installation problem or a mistake in my >coding? I'm not using dup. Try ocamlc -custom -g -o ebv0 unix.cma $(BASICOBJECTS) This makes ebv0 a bit larger, but avoids that problem because ebv0 contains the bytecode interpreter that is able to execute the code. By default (without -custom), the generated executable uses the distributed ocamlrun interpreter. Another solution is to create the right interpreter: ocamlc -make-runtime -o myinterpreter unix.cma (you must enumerate all libraries that refer to additional C libraries), then ocamlc -use-runtime myintepreter -g -o ebv0 unix.cma $(BASICOBJECTS) Gerd -- ---------------------------------------------------------------------------- Gerd Stolpmann Telefon: +49 6151 997705 (privat) Viktoriastr. 100 64293 Darmstadt EMail: gerd@gerd-stolpmann.de Germany ---------------------------------------------------------------------------- ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr