Compilations finally succeed – but creating library doesn’t

looking for info on the internet:

https://www.fortran90.org/
http://micro.ustc.edu.cn/Fortran/Fortran%2090%20Handbook.pdf
http://www.owlnet.rice.edu/~ceng303/manuals/fortran/
https://www.fortrantutorial.com/documents/IntroductionToFTN95.pdf
https://www.fortrantutorial.com/

(could also check VMSSoftware.com – the Fortran manuals are online)

Adapt the MMS file for [.INSTALL], source for liblapack Is missing, after changing that it seems to work, until vms_auto64 is set to work with code slamch.for – the .map file isný found. Which is weird, because link worked:

cc/define=(VMS)/comment=as_is/prep=LAPACK_INS:slamch.f_ LAPACK_INS:slamch.f
fortran/name=lower/float=ieee/ieee=denorm/nowarn/list=LAPACK_LIS:/show=all/obj=LAPACK_OBJ:slamch.obj LAPACK_INS:slamch.f_
pipe link/map=LAPACK_LIS:/full/exec=nl: LAPACK_INS:slamch | copy sys$input nl:

mc ETWEXE:vms_auto64 LAPACK_LIS:slamch.map LAPACK_LIS:slamch.lis
error opening .map file
cc/define=(VMS)/comment=as_is/prep=slamch_64.f_ LAPACK_INS:slamch_64.f
%CC-F-OPENIN, error opening LAPACK_VMS:[INSTALL]slamch_64.f; as input
-RMS-E-FNF, file not found
%MMS-F-ABORT, For target slamch.obj, CLI returned abort status: %X10B9002C.
%MMS-F-ABORT, For target all, CLI returned abort status: %X10EE8034.

Makes sense because the object isn’t located where it should be

slamch.obj : LAPACK_INS:slamch.f
cc/define=(VMS)/comment=as_is/prep=LAPACK_INS:$(MMS$TARGET_NAME).f_\
LAPACK_INS:$(MMS$TARGET_NAME).f
fortran$(FFLAGS)/nowarn/list=LAPACK_LIS:/show=all/obj=LAPACK_OBJ:$(MMS$TARGET_NAME).obj\
LAPACK_INS:$(MMS$TARGET_NAME).f_
pipe link/map=LAPACK_LIS:/full/exec=nl:
LAPACK_INS:$(MMS$TARGET_NAME) | copy sys$input nl:
mc ETWEXE:vms_auto64 LAPACK_LIS:$(MMS$TARGET_NAME).map LAPACK_LIS:$(MMS$TARGET_NAME).lis
cc/define=(VMS)/comment=as_is/prep=$(MMS$TARGET_NAME)_64.f_\
LAPACK_INS:$(MMS$TARGET_NAME)_64.f
fortran$(FFLAGS)/nowarn/obj=LAPACK_OBJ:$(MMS$TARGET_NAME)_64.obj\
LAPACK_INS:$(MMS$TARGET_NAME)_64.f_
delete LAPACK_INS:$(MMS$TARGET_NAME)_64.f;*
delete LAPACK_INS:$(MMS$TARGET_NAME).f_;*
delete LAPACK_INS:$(MMS$TARGET_NAME)_64.f_;*

Neither the next definition is correct. Corrected this, next error is:

cc/define=(VMS)/comment=as_is/prep=LAPACK_INS:tstiee.f_ LAPACK_INS:tstiee.f
fortran/name=lower/float=ieee/ieee=denorm/list=LAPACK_LIS:/show=all/obj=LAPACK_OBJ:tstiee.obj LAPACK_INS:tstiee.f_
pipe link/map=LAPACK_LIS:/full/exec=nl: LAPACK_OBJ:tstiee | copy sys$input nl:

mc etwexe:vms_auto64 LAPACK_LIS:tstiee.map LAPACK_LIS:tstiee.lis
normal end
cc/define=(VMS)/comment=as_is/prep=LAPACK_INS:tstiee_64.f_ LAPACK_INS:tstiee_64.f
fortran/name=lower/float=ieee/ieee=denorm/obj=LAPACK_OBJ:tstiee_64.obj LAPACK_INS:tstiee_64.f_
delete LAPACK_INS:tstiee_64.f;*
delete LAPACK_INS:tstiee.f_;*
delete LAPACK_INS:tstiee_64.f_;*
library/crea LAPACK_LIB:liblapack.olb dlamch.obj,dsecnd_INT_CPU_TIME.obj, ilaver.obj,lsame.obj,second_INT_CPU_TIME.obj, slam
ch.obj, LAPACK_version.obj, LAPACK_version.obj tstiee.obj tstiee.obj
%DCL-W-MAXPARM, too many parameters - reenter command with fewer parameters
\TSTIEE\
%MMS-F-ABORT, For target liblapack.olb, CLI returned abort status: %X00038098.
-CLI-W-MAXPARM, too many parameters - reenter command with fewer parameters
%MMS-F-ABORT, For target all, CLI returned abort status: %X10EE8034.

caused by a missing comma. Finally, all goes as planned until the library is to be created:

library/crea LAPACK_LIB:liblapack.olb dlamch.obj,dsecnd_INT_CPU_TIME.obj, ilaver.obj,lsame.obj,second_INT_CPU_TIME.obj, slam
ch.obj, LAPACK_version.obj, LAPACK_version.obj, tstiee.obj
%LIBRAR-W-OPENIN, error opening LAPACK_VMS:[000000.INSTALL]dlamch.obj; as input
-RMS-E-FNF, file not found
%LIBRAR-W-OPENIN, error opening LAPACK_VMS:[000000.INSTALL]dsecnd_INT_CPU_TIME.obj; as input
-RMS-E-FNF, file not found
%LIBRAR-W-OPENIN, error opening LAPACK_VMS:[000000.INSTALL]ilaver.obj; as input
-RMS-E-FNF, file not found
%LIBRAR-W-OPENIN, error opening LAPACK_VMS:[000000.INSTALL]lsame.obj; as input
-RMS-E-FNF, file not found
%LIBRAR-W-OPENIN, error opening LAPACK_VMS:[000000.INSTALL]second_INT_CPU_TIME.obj; as input
-RMS-E-FNF, file not found
%LIBRAR-W-OPENIN, error opening LAPACK_VMS:[000000.INSTALL]slamch.obj; as input
-RMS-E-FNF, file not found
%LIBRAR-W-OPENIN, error opening LAPACK_VMS:[000000.INSTALL]LAPACK_version.obj; as input
-RMS-E-FNF, file not found
%LIBRAR-W-OPENIN, error opening LAPACK_VMS:[000000.INSTALL]LAPACK_version.obj; as input
-RMS-E-FNF, file not found
%LIBRAR-W-OPENIN, error opening LAPACK_VMS:[000000.INSTALL]tstiee.obj; as input
-RMS-E-FNF, file not found
%MMS-F-ABORT, For target liblapack.olb, CLI returned abort status: %X10861098.
%MMS-F-ABORT, For target all, CLI returned abort status: %X10EE8034.
$

That is to be expected if the wrong directory-logical is used. It must be LAPACK_OBJ:

liblapack.olb : $(OBJS)
library/crea LAPACK_LIB:liblapack.olb LAPACK_OBJ:$(OBJS)
library LAPACK_LIB:liblapack.olb LAPACK_OBJ:$(OBJS64)

Changed that, but it is not sufficient:

library/crea LAPACK_LIB:liblapack.olb LAPACK_OBJ:dlamch.obj,dsecnd_INT_CPU_TIME.obj, ilaver.obj,lsame.obj,second_INT_CPU_TIME.obj
, slamch.obj, LAPACK_version.obj, LAPACK_version.obj, tstiee.obj
library LAPACK_LIB:liblapack.olb LAPACK_OBJ:dlamch_64.obj,dsecnd_INT_CPU_TIME_64.obj, ilaver_64.obj,lsame_64.obj,second_INT_CPU_TI
ME_64.obj, slamch_64.obj, LAPACK_version_64.obj, tstiee_64.obj
%LIBRAR-E-DUPGLOBAL, global symbol lapack_version from file LAPACK_VMS:[OBJ]LAPACK_version_64.obj;6 already in library LAPACK_VMS:[LIB]liblapack.olb;1
%LIBRAR-E-DUPGLOBAL, global symbol tstiee from file LAPACK_VMS:[OBJ]tstiee_64.obj;4 already in library LAPACK_VMS:[LIB]liblapack.olb;1
%MMS-F-ABORT, For target liblapack.olb, CLI returned abort status: %X108680B2.
%MMS-F-ABORT, For target all, CLI returned abort status: %X10EE8034.
$

Does this mean: Remove library and redo? no – the symbol is created in both the standard (32-bit) as 64-bit versions of these objects. Question is if these must be added in the library: these will be linked into executables and so are not to be added here: If done, first link fails:

LAPACK_version.exe : LAPACK_version.obj liblapack.olb
link/exec=LAPACK_EXE: LAPACK_OBJ:LAPACK_version.obj,LAPACK_LIB:Liblapack.olb/lib

results in

link/exec=LAPACK_EXE: LAPACK_OBJ:LAPACK_version.obj,LAPACK_LIB:Liblapack.olb/lib
%MMS-F-GWKNOPRN, There are no known sources for the current target Liblapack.olb
%MMS-F-ABORT, For target all, CLI returned abort status: %X10EE8064.