1082 tests behaved as expected.
4 tests were skipped.
on
uname -m = s390x
uname -r = 4.12.14-122.144-default
uname -s = Linux
uname -v = #1 SMP Mon Dec 12 09:21:50 UTC 2022 (bccc371)
Is nice.
cobc: symbol lookup error: cobc: undefined symbol: cob_is_valid_uri
means it uses cobc version 3.1.2 with a likely older version of libcob.
Check
$whichcobc
$ldd$(whichcobc)
to see what is actually used, then consider adjusting LD_LIBRARY_PATH to include the installation directory and/or remove the old libcob if it isn't used any more.
Note: Instead of adding LD_LIBRARY_PATHyou could also add an rpath entry to cobc, but that means that you either have to do the same for cobcrun and only use this to start COBOL modules or also have to do the same for the generated COBOL programs.
Out of interest once this is solved: what does cobc --info show?
Last edit: Simon Sobisch 2023-05-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Many thanks Simon. Got it to work. I removed all old libraries and reinstalled it.
fvtest:/opt/addons/gnucobol-3.1.2 # cobc --info
cobc (GnuCOBOL) 3.1.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch, Edward Hart
Built May 17 2023 12:12:09
Packaged Dec 23 2020 12:04:58 UTC
C version "4.8.5"
build information
build environment : s390x-ibm-linux-gnu
CC : gcc -std=gnu99
C version : "4.8.5"
CPPFLAGS :
CFLAGS : -O2 -pipe -finline-functions -fsigned-char
-Wall -Wwrite-strings -Wmissing-prototypes
-Wno-format-y2k
LD : /usr/s390x-suse-linux/bin/ld -m elf64_s390
LDFLAGS : -Wl,-z,relro,-z,now,-O1
Hello There,
I have installed gnucobol-3.1.2 on SLES running on Z (s390x).
I have gone through the installation steps, from configure to make install
I have done a make check before install.
Please find the test log.
But when I try to compile a sample cobol program it is coming up a strange error. Could you please
fvtest:/opt # cobc -x -debug hello.cob
cobc: symbol lookup error: cobc: undefined symbol: cob_is_valid_uri
Best Regards,
Prasanna
on
Is nice.
means it uses cobc version 3.1.2 with a likely older version of libcob.
Check
to see what is actually used, then consider adjusting
LD_LIBRARY_PATHto include the installation directory and/or remove the old libcob if it isn't used any more.Note: Instead of adding
LD_LIBRARY_PATHyou could also add an rpath entry to cobc, but that means that you either have to do the same for cobcrun and only use this to start COBOL modules or also have to do the same for the generated COBOL programs.Out of interest once this is solved: what does
cobc --infoshow?Last edit: Simon Sobisch 2023-05-17
fvtest:/usr/local/lib/gnucobol # which cobc
/usr/local/bin/cobc
fvtest:/usr/local/lib/gnucobol # ldd $(which cobc)
libcob.so.4 => /usr/lib64/libcob.so.4 (0x000003ffa9280000)
libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x000003ffa9180000)
libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x000003ffa8f80000)
libz.so.1 => /lib64/libz.so.1 (0x000003ffa8e80000)
liblzma.so.5 => /usr/lib64/liblzma.so.5 (0x000003ffa8e00000)
libm.so.6 => /lib64/libm.so.6 (0x000003ffa8d00000)
libjson-c.so.2 => /usr/lib64/libjson-c.so.2 (0x000003ffa8c80000)
libncursesw.so.5 => /lib64/libncursesw.so.5 (0x000003ffa8c00000)
libdb-4.8.so => /usr/lib64/libdb-4.8.so (0x000003ffa8a00000)
libdl.so.2 => /lib64/libdl.so.2 (0x000003ffa8980000)
libc.so.6 => /lib64/libc.so.6 (0x000003ffa8780000)
libtinfo.so.5 => /lib64/libtinfo.so.5 (0x000003ffa8700000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x000003ffa8680000)
/lib/ld64.so.1 (0x000003ffa9300000)
Many thanks Simon. Got it to work. I removed all old libraries and reinstalled it.
fvtest:/opt/addons/gnucobol-3.1.2 # cobc --info
cobc (GnuCOBOL) 3.1.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch, Edward Hart
Built May 17 2023 12:12:09
Packaged Dec 23 2020 12:04:58 UTC
C version "4.8.5"
build information
build environment : s390x-ibm-linux-gnu
CC : gcc -std=gnu99
C version : "4.8.5"
CPPFLAGS :
CFLAGS : -O2 -pipe -finline-functions -fsigned-char
-Wall -Wwrite-strings -Wmissing-prototypes
-Wno-format-y2k
LD : /usr/s390x-suse-linux/bin/ld -m elf64_s390
LDFLAGS : -Wl,-z,relro,-z,now,-O1
GnuCOBOL information
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 : 8 bytes
endianness : big-endian
native EBCDIC : no
extended screen I/O : ncursesw
variable file format : 0
sequential file handler : built-in
indexed file handler : BDB
mathematical library : GMP
XML library : libxml2
JSON library : json-c
This is the execution of my sample program
fvtest:/opt # cobc -x hello.cob
fvtest:/opt # ll
total 5740
drwxr-xr-x 6 root root 4096 May 17 14:54 addons
-rw------- 1 root root 1946336 May 17 11:07 gmp-6.1.2.tar.xz
-rw-r--r-- 1 root root 3897397 May 17 11:33 gnucobol-3.1.2.tar.gz
-rwxr-xr-x 1 root root 17000 May 17 16:16 hello
-rw-r--r-- 1 root root 171 May 17 16:16 hello.cob
fvtest:/opt # ./hello
Hello, world!
Big Endian !