Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run-caml problems in emacs #2674

Closed
vicuna opened this issue Feb 2, 2001 · 4 comments
Closed

run-caml problems in emacs #2674

vicuna opened this issue Feb 2, 2001 · 4 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Feb 2, 2001

Original bug ID: 273
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

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



@vicuna
Copy link
Author

vicuna commented Feb 13, 2001

Comment author: administrator

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

@vicuna
Copy link
Author

vicuna commented Feb 15, 2001

Comment author: administrator

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

@vicuna
Copy link
Author

vicuna commented Feb 20, 2001

Comment author: administrator

Can't reproduce presently.

@vicuna vicuna closed this as completed Feb 20, 2001
@vicuna
Copy link
Author

vicuna commented Mar 3, 2001

Comment author: administrator

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 (#2674)

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

@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant