Just rechecked the current status. This is primarily a "documentary note" about GnuCOBOL 3.x on IBM/S390 with its supported Linux OS for that machine.
register, wait one business day to receive activation mail, login
create instance (on the first one let it create a key-pair, download as IBM.pem
ssh -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" -i "IBM.pem" "linux1@$ip_from_instance" (we totally disable the key check here as the servers key will change when changing the instance - if you have a "permanent" one you'd leave those two options aside).
Then, depending on the instance used do as follows.
SLES15SP1:
$zyppersearchlibdb# as the version number may change
$sudozypperinstallmakegccgmp-devellibjson-c-develncurses-devellibxml2-devellibdb-4_8-devel
$wgethttps://ftpmirror.gnu.org/gnucobol/gnucobol-3.1.1.tar.xz
$tar-xvfgnucobol-3.1.1.tar.xz&&cdgnucobol-3.1.1&&./configure
$make-j3# we have 2 cores with 5200MHz, give them something to do
$make-j2checkallTESTSUITEFLAGS="--jobs=3"# results: all as expected
$sudomakeinstall
$cobc--info|grepbuild-A30# see note below for LD_LIBRARY_PATH
buildinformation
buildenvironment:s390x-ibm-linux-gnu
CC:gcc
Cversion:"7.5.0"
CPPFLAGS:
CFLAGS:-O2-pipe-finline-functions-fsigned-char
-Wall-Wwrite-strings-Wmissing-prototypes
-Wno-format-y2k
LD:/usr/s390x-suse-linux/bin/ld-melf64_s390
LDFLAGS:-Wl,-z,relro,-z,now,-O1
GnuCOBOLinformation
COB_CC:gcc
COB_CFLAGS:-pipe-I/usr/local/include-Wno-unused
-fsigned-char-Wno-pointer-sign
COB_DEBUG_FLAGS:-ggdb3-fasynchronous-unwind-tables
COB_LDFLAGS:
COB_LIBS:-L/usr/local/lib-lcob-lm
COB_CONFIG_DIR:/usr/local/share/gnucobol/config
COB_COPY_DIR:/usr/local/share/gnucobol/copy
COB_MSG_FORMAT:GCC
COB_OBJECT_EXT:o
COB_MODULE_EXT:so
COB_EXE_EXT:
64bit-mode:yes
BINARY-C-LONG:8bytes
endianness:big-endian
nativeEBCDIC:no
extendedscreenI/O:ncursesw
variablefileformat:0
sequentialfilehandler:built-in
indexedfilehandler:BDB
$cobcrun-v-info|grep-A10indexed
indexedfilehandler:BDB,version4.8.30
mathematicallibrary:GMP,version6.1.2
XMLlibrary:libxml2,version2.9.7
JSONlibrary:json-c,version0.13.0
extendedscreenI/O:ncursesw,version6.1.20180317(CHTYPE=32,WIDE=1)
mousesupport:yes
note to myself: also tested with configure --enable-hardening PROGRAMS_LIBS="'-Wl,-rpath -Wl,${exec_prefix}/lib' , which also passed make checkall and removes the need to have LD_LIBRARY_PATH set for cobcandcobcrun
RHEL7.8:
$sudoyuminstallgccgmp-devellibxml2-develncurses-devellibdb-devel# no json-c-devel as it is too old; make is already installed
$curlhttps://ftp.gnu.org/gnu/gnucobol/gnucobol-3.1.1.tar.xz-ognucobol-3.1.1.tar.xz&&tar-xvfgnucobol-3.1.1.tar.xz&&cdgnucobol-3.1.1
$https://raw.githubusercontent.com/DaveGamble/cJSON/v1.7.14/cJSON.c-olibcob/cJON.c
$https://raw.githubusercontent.com/DaveGamble/cJSON/v1.7.14/cJSON.h-olibcob/cJON.h
$./configure
$make-j3# we have 2 cores with 5200MHz, give them something to do
$make-j2checkallTESTSUITEFLAGS="--jobs=3"# results: all as expected
$sudomakeinstall
$cobc--info|grepbuild-A30
buildinformation
buildenvironment:s390x-ibm-linux-gnu
CC:gcc-std=gnu99
Cversion:"4.8.5 20150623 (Red Hat 4.8.5-44)"
CPPFLAGS:
CFLAGS:-O2-pipe-finline-functions-fsigned-char
-Wall-Wwrite-strings-Wmissing-prototypes
-Wno-format-y2k
LD:/usr/bin/ld-melf64_s390
LDFLAGS:-Wl,-z,relro,-z,now,-O1
GnuCOBOLinformation
COB_CC:gcc-std=gnu99
COB_CFLAGS:-pipe-I/usr/local/include-Wno-unused
-fsigned-char-Wno-pointer-sign
COB_DEBUG_FLAGS:-ggdb3-fasynchronous-unwind-tables
COB_LDFLAGS:
COB_LIBS:-L/usr/local/lib-lcob-lm
COB_CONFIG_DIR:/usr/local/share/gnucobol/config
COB_COPY_DIR:/usr/local/share/gnucobol/copy
COB_MSG_FORMAT:GCC
COB_OBJECT_EXT:o
COB_MODULE_EXT:so
COB_EXE_EXT:
64bit-mode:yes
BINARY-C-LONG:8bytes
endianness:big-endian
nativeEBCDIC:no
extendedscreenI/O:ncursesw
variablefileformat:0
sequentialfilehandler:built-in
indexedfilehandler:BDB
$cobcrun-v-info|grep-A10indexed
indexedfilehandler:BDB,version5.3.21
mathematicallibrary:GMP,version6.0.0
XMLlibrary:libxml2,version2.9.1
JSONlibrary:cJSON,version1.7.14
extendedscreenI/O:ncursesw,version5.9.20130511(CHTYPE=64,WIDE=1)xtermwith256colors
mousesupport:yes
RHEL 8.2:
$sudoyuminstallmakegccgmp-devellibxml2-develncurses-develjson-c-devellibdb-devel# json-c at 0.13 -> new enough; but make comes extra
$curlhttps://ftp.gnu.org/gnu/gnucobol/gnucobol-3.1.1.tar.xz-ognucobol-3.1.1.tar.xz&&tar-xvfgnucobol-3.1.1.tar.xz&&cdgnucobol-3.1.1&&./configure
$make-j3# we have 2 cores with 5200MHz, give them something to do
$make-j2checkallTESTSUITEFLAGS="--jobs=3"# results: all as expected
$sudomakeinstall
$cobc--info|grepbuild-A30
buildinformation
buildenvironment:s390x-ibm-linux-gnu
CC:gcc
Cversion:"8.3.1 20191121 (Red Hat 8.3.1-5)"
CPPFLAGS:
CFLAGS:-O2-pipe-finline-functions-fsigned-char
-Wall-Wwrite-strings-Wmissing-prototypes
-Wno-format-y2k
LD:/usr/bin/ld
LDFLAGS:-Wl,-z,relro,-z,now,-O1
GnuCOBOLinformation
COB_CC:gcc
COB_CFLAGS:-pipe-I/usr/local/include-Wno-unused
-fsigned-char-Wno-pointer-sign
COB_DEBUG_FLAGS:-ggdb3-fasynchronous-unwind-tables
COB_LDFLAGS:
COB_LIBS:-L/usr/local/lib-lcob-lm
COB_CONFIG_DIR:/usr/local/share/gnucobol/config
COB_COPY_DIR:/usr/local/share/gnucobol/copy
COB_MSG_FORMAT:GCC
COB_OBJECT_EXT:o
COB_MODULE_EXT:so
COB_EXE_EXT:
64bit-mode:yes
BINARY-C-LONG:8bytes
endianness:big-endian
nativeEBCDIC:no
extendedscreenI/O:ncursesw
variablefileformat:0
sequentialfilehandler:built-in
indexedfilehandler:BDB
$cobcrun-v-info|grep-A10indexed
indexedfilehandler:BDB,version5.3.28
mathematicallibrary:GMP,version6.1.2
XMLlibrary:libxml2,version2.9.7
JSONlibrary:json-c,version0.13.1
extendedscreenI/O:ncursesw,version6.1.20180224(CHTYPE=32,WIDE=1)xtermwith256colors
mousesupport:yes
So... all checks passed in these environments and a sample way to build them is presented, too.
Bonus note - installing using EPEL-Release (using a fresh RHEL8 VM here):
Just rechecked the current status. This is primarily a "documentary note" about GnuCOBOL 3.x on IBM/S390 with its supported Linux OS for that machine.
ssh -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" -i "IBM.pem" "linux1@$ip_from_instance"(we totally disable the key check here as the servers key will change when changing the instance - if you have a "permanent" one you'd leave those two options aside).Then, depending on the instance used do as follows.
SLES15SP1:
note to myself: also tested with
configure --enable-hardening PROGRAMS_LIBS="'-Wl,-rpath -Wl,${exec_prefix}/lib', which also passedmake checkalland removes the need to haveLD_LIBRARY_PATHset forcobcandcobcrunRHEL7.8:
RHEL 8.2:
So... all checks passed in these environments and a sample way to build them is presented, too.
Bonus note - installing using EPEL-Release (using a fresh RHEL8 VM here):
Note: I think that RHEL7 would have the same procedure but the first command replaced by: