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

err 16 MODULE expected on Ubuntu 24.04 #103

Open
pascalecu opened this issue May 22, 2024 · 1 comment
Open

err 16 MODULE expected on Ubuntu 24.04 #103

pascalecu opened this issue May 22, 2024 · 1 comment

Comments

@pascalecu
Copy link

Hello! I have been getting this weird error on Ubuntu 24.04 with any module, for instance:

(* HelloWorld.Mod *)
MODULE HelloWorld;
   IMPORT Out;
BEGIN
   Out.String("Hello World");
   Out.Ln;
END HelloWorld.
$ voc HelloWorld.Mod -m HelloWorld
HelloWorld.mod  Compiling HelloWorld.  Main program.  383 chars.
HelloWorld

   0: ELF
      ^
    pos     0  err 16  MODULE expected

Module compilation failed.

The executable still generates and works as expected, but am I doing something wrong? I am new to Oberon-2 and I don't know if it's the fault of the program or it's a bug in voc.

@dcwbrown
Copy link
Contributor

This is about the voc command line. 'voc HelloWorld.Mod -m HelloWorld' says: first compile the file 'HelloWorld.Mod' with the option 'm', then compile the file 'HelloWorld' with no options.
The file 'HelloWorld' is the binary file generated by the first compilation - a binary file in Linux's 'Executable and Linkable Format', 'ELF' for short. All ELF files begin with 'ELF', which is why voc complains that the file does not start with 'MODULE'.
Sorry - a lot of explanation for why the solution is to use the command 'voc HelloWorld.Mod -m'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants