err 16 MODULE expected on Ubuntu 24.04
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.
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'.
I think it's about time to close this issue, as I forgot to do so.