cobc -Ox cobcbug.cblSegmentation fault (core dumped)
I'm currently on Ubuntu 12.04 running version: "cobc (OpenCOBOL)
1.0.0".
I'm starting to hit problems that I can't diagnose, like a segfault in
the compiler (below). I don't expect anyone is going to support this
old version, so I'm thinking of installing Gnu COBOL. However I have a couple of questions maybe someone here can answer:
1. At sourceforge.net/projects/open-cobol/ it says "GnuCOBOL 2.0 is on
rc-2 close to release". Does this mean I should wait for release, or
install rc-2?
2. Is the package name still open-cobol or gnu-cobol? If the latter,
will apt-get simply install new executables and libraries without
checking for existing files of the same name? Should I uninstall
open-cobol first?
In case anyone's interested in seeing if the segfault still exists in
Gnu COBOL, here's a minimal source program that triggers it for me: --
id division.
program-id. cobcbug.
author. Hugh Sweeney.
environment division.
input-output section.
file-control.
select listing assign to "uin"
organization is line sequential.
data division.
file section.
fd listing.
01 inrec pic x(80).
working-storage section.
77 linenumber pic 99999 value 0 comp.
77 sub1 pic 9 comp.
01 value all "X".
10 pic x.
88 looks-like-statement-start value "T" False is "F".
01 grp6.
05 sgrp6 pic x(6). *> Extra lines I inserted...
05 filler redefines sgrp6. *> ...to work around segfault.
10 num6 pic 9 occurs 6.
procedure division.
if inrec(sub1:sub1) is numeric
move inrec(sub1:sub1) to num6(sub1)
else
if inrec(sub1:sub1) = space
if grp6(1:sub1) = linenumber + 1 *> Segfault.
* if sgrp6(1:sub1) = linenumber + 1 *> Compiles ok.
set looks-like-statement-start to true
end-if
end-if
end-if
.
--
and here's what I see when I try to compile it:
cobc -Ox cobcbug.cblSegmentation fault (core dumped)
Uncommenting the commented line in the proc div and commenting the
prior line results in a clean compile. Knowing this user, the prior
line is probably a user error, but the segfault is beyond my ability
to fix.
Hugh
--
Hello Hugh!
Monday June 12 2017 19:50, Hugh Sweeney wrote to All:
I have been using v2.0 for 6 or more years.
It is used to build my ACAS accounting system that consists of over 200 modules and programs and these have run solidly since with the only
problems being my code changes that have introduced bugs (in my code).
It now is used to to migrate ACAS into Mysql. I have also used it to run tests on Oracle and DB2 with success.
A large numerb of commercial shops have been using it in excess for two
years and I am saying that because I do not know the actual timeframe for them but I do know that is is used in thousands of sites / systems.
Is that good enough?
On Tuesday, 13 June 2017 00:25:57 UTC+1, Vince Coen wrote:gnu-cobol"
Hello Hugh!
Monday June 12 2017 19:50, Hugh Sweeney wrote to All:
I have been using v2.0 for 6 or more years.
(snip)
Thanks Vince. That's good enough evidence for me.
So I issued
apt-get remove open-cobol (completed ok)
apt-get install gnu-cobol
but the second command generated message "E: Unable to locate package
so it looks like I was wrong to assume that Gnu COBOL can be installed bythis method. Can anyone tell me what method to use on Ubuntu 12.04 please.
tia
Hugh
--
On Tuesday, 13 June 2017 00:25:57 UTC+1, Vince Coen wrote:
Hello Hugh!
Monday June 12 2017 19:50, Hugh Sweeney wrote to All:
I have been using v2.0 for 6 or more years.
It is used to build my ACAS accounting system that consists of over
200 modules and programs and these have run solidly since with the
only problems being my code changes that have introduced bugs (in my
code).
It now is used to to migrate ACAS into Mysql. I have also used it to
run tests on Oracle and DB2 with success.
A large numerb of commercial shops have been using it in excess for
two years and I am saying that because I do not know the actual
timeframe for them but I do know that is is used in thousands of
sites / systems.
Is that good enough?
Thanks Vince. That's good enough evidence for me.
So I issued
apt-get remove open-cobol (completed ok)
apt-get install gnu-cobol
but the second command generated message "E: Unable to locate package gnu-cobol" so it looks like I was wrong to assume that Gnu COBOL can
be installed by this method. Can anyone tell me what method to use on
Ubuntu 12.04 please.
On Tuesday, 13 June 2017 00:25:57 UTC+1, Vince Coen wrote:
Hello Hugh!
Monday June 12 2017 19:50, Hugh Sweeney wrote to All:
I have been using v2.0 for 6 or more years.
It is used to build my ACAS accounting system that consists of over
200 modules and programs and these have run solidly since with the
only problems being my code changes that have introduced bugs (in my
code).
It now is used to to migrate ACAS into Mysql. I have also used it to
run tests on Oracle and DB2 with success.
A large numerb of commercial shops have been using it in excess for
two years and I am saying that because I do not know the actual
timeframe for them but I do know that is is used in thousands of
sites / systems.
Is that good enough?
Thanks Vince. That's good enough evidence for me.
So I issued
apt-get remove open-cobol (completed ok)
apt-get install gnu-cobol
but the second command generated message "E: Unable to locate package gnu-cobol" so it looks like I was wrong to assume that Gnu COBOL can
be installed by this method. Can anyone tell me what method to use on
Ubuntu 12.04 please.
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 995 |
Nodes: | 10 (0 / 10) |
Uptime: | 200:04:50 |
Calls: | 13,023 |
Calls today: | 1 |
Files: | 186,574 |
Messages: | 3,284,751 |