Thursday, 14 March 2019

OpenVMS Porting Library

The OpenVMS Porting Library (OPL) provides key files to assist with porting open source to OpenVMS.

Installation is via PCSI, or compilable source. The PCSI just installs the shareable image, and not the header files, so it is only useful for running programs that are based on it - not compiling with it.

The compilable source needs modification as newer versions of the CRTL have superseded some parts of the OPL and compiling can throw errors, an example is realpath which is in the OPL but now also in the CRTL.

The latest version of the OPL is version A9. Running the porting-a9.sfx_axpexe file unpacks the files into the directory, and the included porting_relnotes.txt explained how to compile and install the OPL using the included make files.

Prior to compilation a few modifications are required to remove parts that are no longer required due to updates to the CRTL:

JACKETS_ALPHA.OPT
remove the line:
  GENERIC_REALPATH=PROCEDURE,-

makefile.vms
remove the line:
  realpath.c \

vms_jackets.h
remove the line:
#define realpath   GENERIC_REALPATH

I installed it using the following commands:

$ gmake == "$DKA0:[software.opl]make_3_76_1_vms_alpha"
$ gmake "RUBY_RTL=1"
$ gmake "DIST_TOP=DKA0:[PORTING.DIST.]" install


This resulted in a compiled copy of the OpenVMS Porting Library being installed in DKA0:[PORTING.DIST] with the additional OpenVMS 7.3-1+ (RUBY) functions enabled.

The OPL can also be easily adjusted to compile as an optimised build by editing a line in the makefile.vms, before compiling as above, as such:

# Compiler flags we always want
CFLAGS += /prefix=all /include=[] /warn=disable=portable /optimize=(tune=host)





No comments:

Post a Comment