* [Caml-list] Help using unix library?
@ 2001-04-19 20:33 Steve Stevenson
2001-04-23 19:52 ` Gerd Stolpmann
0 siblings, 1 reply; 3+ messages in thread
From: Steve Stevenson @ 2001-04-19 20:33 UTC (permalink / raw)
To: caml-list
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.
Best regards,
steve
-------------------
To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Help using unix library?
2001-04-19 20:33 [Caml-list] Help using unix library? Steve Stevenson
@ 2001-04-23 19:52 ` Gerd Stolpmann
2001-04-24 9:23 ` Sven LUTHER
0 siblings, 1 reply; 3+ messages in thread
From: Gerd Stolpmann @ 2001-04-23 19:52 UTC (permalink / raw)
To: Steve Stevenson, caml-list
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Help using unix library?
2001-04-23 19:52 ` Gerd Stolpmann
@ 2001-04-24 9:23 ` Sven LUTHER
0 siblings, 0 replies; 3+ messages in thread
From: Sven LUTHER @ 2001-04-24 9:23 UTC (permalink / raw)
To: Gerd Stolpmann; +Cc: Steve Stevenson, caml-list
On Mon, Apr 23, 2001 at 09:52:01PM +0200, Gerd Stolpmann wrote:
> 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.
But you loose the portability of the bytecode by doing this. This may not be a
problem for you though.
Friendly,
Sven Luther
-------------------
To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-04-24 9:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-19 20:33 [Caml-list] Help using unix library? Steve Stevenson
2001-04-23 19:52 ` Gerd Stolpmann
2001-04-24 9:23 ` Sven LUTHER
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox