Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000273OCamlOCaml generalpublic2001-02-02 15:052001-02-20 10:43
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000273: run-caml problems in emacs
DescriptionI can only run-caml with arg "ocaml", not any other toplevel-exes.

If I run the command

(make-comint "inferior-caml" "mytop" nil)

I get


No bytecode file specified.

Process inferior-caml exited abnormally with code 2



If I run


(make-comint "inferior-caml" "ocaml" nil)

I get


        Objective Caml version 3.00+20 (2000-12-03)

#



I use cygwin, lastest version on Windows 2000. Both ocaml and mytop works
from bash and cmd.exe. Ocaml is compiled using cygwin, so ocamldebug works
in bash, but not under emacs. But that is an other problem.

/mattias

P.s The same for mytop.exe

P.p.s If I do Esc-! mytop from *scratch*, mytop starts in a separate window

P.P.p.s I don't think it has to do with mytop, I get the same error if I do
(make-comint "inferior-caml" "ocamlbrowser.exe" nil)



----------------
BEGIN:VCARD
VERSION:2.1
N:Waldau;Mattias;;Mr.
FN:Mattias Waldau
ORG:Tacton Systems AB
TITLE:CTO
TEL;WORK;VOICE:+46 8 690 07 50
TEL;HOME;VOICE:+46 (18) 55 14 49
TEL;CELL;VOICE:+46 70 549 11 12
TEL;WORK;FAX:+46 70 617 11 12
ADR;WORK:;;Saltmätargatan 7;11359 Stockholm;;;Sweden
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Saltm=E4targatan 7=0D=0A11359 Stockholm=0D=0ASweden
URL:
URL:http://www.abc.se/~m10217 [^]
EMAIL;PREF;INTERNET:mattias.waldau@tacton.com
REV:20000724T102834Z
END:VCARD

----------------
----------------
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0002204)
administrator (administrator)
2001-02-13 11:24

> I can only run-caml with arg "ocaml", not any other toplevel-exes.
> If I run the command
> (make-comint "inferior-caml" "mytop" nil)
> I get
> No bytecode file specified.
> Process inferior-caml exited abnormally with code 2
>
> If I run
> (make-comint "inferior-caml" "ocaml" nil)
> I get
> Objective Caml version 3.00+20 (2000-12-03)

I'm sorry, I cannot reproduce the problem on my Windows machine. For
what is worth, I'm using

GNU Emacs 20.6.1 (i386-*-nt5.0.2195) of Tue Feb 29 2000 on buffy

(can't remember where I got it from), probably not the very latest
Cygwin (mine dates from summer 2000), and Windows 2000.

One suggestion: I used to have lots of trouble with launching Cygwin
executables from non-Cygwin programs. This was due to Cygwin's
default configuration of mapping its root "/" directory on C:\something,
rather than C:\. Once I made sure Cygwin's root and C:\ are the same,
things worked much better.

Regards,

- Xavier Leroy

(0002205)
administrator (administrator)
2001-02-15 13:08

> When does Ocaml say 'No bytecode file specified'?
> That might give me a clue what is wrong.

At startup, the OCaml runtime system looks "inside itself",
i.e. inside the file specified by the argv[0] argument, for a valid
bytecode executable file.

(Keep in mind that ocamlc -custom generates a "mixed-mode" executable,
consisting of a C executable containing the custom runtime,
concatenated with the Caml bytecode for the program.)

On many platforms, argv[0] is not a full path to the executable, just
a short name, so the directories of the PATH environment variables are
searched to try to complete the argv[0] name.

The "No bytecode file specified" error occurs when the runtime system
fails to find a valid bytecode executable "inside itself".
This can indicate:
- an incorrect argv[0] (some programs do not set argv[0] correctly
  when they launch another program);
- a PATH problem (argv[0] is a short name and the directory containing
  the executable is not in PATH);
- a file name conversion problem (as I said earlier, Cygwin somehow
  converts the Win32 view of the file system into its own view of
  the file system; usually this conversion is made consistently,
  i.e. on all command-line arguments, but there may be a problem with this).

Let me know if this helps diagnosing the problem.

- Xavier Leroy

(0002206)
administrator (administrator)
2001-02-20 10:43

Can't reproduce presently.
(0002207)
administrator (administrator)
2001-03-03 12:08

It is str.cma that is the problem.
What is so special with str.cma?


In the following test I created two different toplevels, one with str.cma,
one without. The one without works inside emacs, the other doesn't. Both
works on toplevel (both inside bash and cmd)

tableplan$ ocamlmktop -o facile3.exe str.cma facile.cma
tableplan$ ocamlmktop -o facile2.exe facile.cma
tableplan$ mv facile?.exe /usr/local/bin/
tableplan$ facile2
        Objective Caml version 3.00+22 (2001-02-05)

# #quit;;
tableplan$ facile3
        Objective Caml version 3.00+22 (2001-02-05)

# #quit;;
tableplan$

M-x run-caml facile3.exe results in

No bytecode file specified.

Process inferior-caml exited abnormally with code 2

/mattias
-----Original Message-----
From: Xavier Leroy [mailto:Xavier.Leroy@inria.fr]
Sent: Thursday, February 15, 2001 1:09 PM
To: Mattias Waldau
Cc: Caml bug tracking system
Subject: Re: run-caml problems in emacs (PR#273)


> When does Ocaml say 'No bytecode file specified'?
> That might give me a clue what is wrong.

At startup, the OCaml runtime system looks "inside itself",
i.e. inside the file specified by the argv[0] argument, for a valid
bytecode executable file.

(Keep in mind that ocamlc -custom generates a "mixed-mode" executable,
consisting of a C executable containing the custom runtime,
concatenated with the Caml bytecode for the program.)

On many platforms, argv[0] is not a full path to the executable, just
a short name, so the directories of the PATH environment variables are
searched to try to complete the argv[0] name.

The "No bytecode file specified" error occurs when the runtime system
fails to find a valid bytecode executable "inside itself".
This can indicate:
- an incorrect argv[0] (some programs do not set argv[0] correctly
  when they launch another program);
- a PATH problem (argv[0] is a short name and the directory containing
  the executable is not in PATH);
- a file name conversion problem (as I said earlier, Cygwin somehow
  converts the Win32 view of the file system into its own view of
  the file system; usually this conversion is made consistently,
  i.e. on all command-line arguments, but there may be a problem with this).

Let me know if this helps diagnosing the problem.

- Xavier Leroy


- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker