Module build information

Compiler and runtime compatibility

The compiler version used to build the .42m modules must be compatible with the runtime system used to execute the programs. The fglcomp compiler writes version information in the generated 42m files. This can be useful on site, if you need to check the version of the compiler that was used to build the 42m nodules.

Identifying the version of the compiler and runtime system

To check if the version of the compiler or runtime system, use the -V option:
$ fglcomp -V
fglrun 3.00.12 internal-build-number
Genero virtual machine
Target l64xl212
...

$ fglrun -V
fglrun 3.00.12 internal-build-number
Genero virtual machine
Target l64xl212
...

Checking the compiler version used to build p-code modules

To extract build information from a .42m file, run fglrun with the -b option:

$ fglrun -b mymodule.42m
3.00.00 /home/devel/stores/mymodule.4gl 24

The output shows the following fields:

  1. The Genero product version (3.00.00)
  2. The full path of the source file (/home/devel/stores/mymodule.4gl)
  3. The internal identifier of the p-code version (23)

fglrun -b can read the header of p-code modules compiled with older versions of fglcomp and display version information for such old modules. If fglrun cannot recognize a p-code module, it returns with an execution status that is different from zero.

When reading build information of a 42x or 42r file, fglrun scans all modules used to build the library or program. You will see different versions in the first column if the modules were compiled with different versions of fglcomp. However, it's not recommended that you mix versions on a production site:

$ fglrun -b myprogram.42r
3.00.00 /home/devel/stores/mymodule1.4gl 24
3.10.02 /home/devel/stores/mymodule2.4gl 24
3.00.01 /home/devel/stores/mymodule3.4gl 24

Adding compilation timestamp in the p-code modules

If you need to write timestamp information in the p-code modules, you can use the --timestamp option of fglcomp:

$ fglcomp --timestamp mymodule.4gl

$ fglrun -b mymodule.42m
2008-12-24 11:22:33 3.00.12 /home/devel/stores/mymodule.4gl 15
Important: When using the --timestamp compiler option to write build timestamp information in p-code modules, you will not be able to easily compare 42m files (based on a checksum, for example): Without the timestamp, fglcomp generates exactly the same p-code module if the source file was not modified.

Avoiding source file path in the p-code modules

By default, fglcomp writes the source file name (path) in the resulting .42m module. To avoid the source name in the .42m module, you can use the --omit-source-name option of fglcomp. With this option, the source name/path will be replaced by the module name:

$ fglcomp mymodule.4gl

$ fglrun -b mymodule.42m
3.00.13 /home/devel/stores/mymodule.4gl 15

$ fglcomp --omit-source-name mymodule.4gl

$ fglrun -b mymodule.42m
3.00.13 mymodule 15