While the 64-bit build was actually easier (due to the upgraded MinGW64/MSYS2 installer), there were some minor problems with the package. I had to manually correct several small files that reflected older GC3.0 rather than current GC3.1-rc1:
a, Sorry but it is not clear to me what is the difference between the "typical" version and the "special diagnostic" version ?
b. The new release 3.1 of the compiler supports the JSON GENERATE / PARSE and XML GENERATE / PARSE statements but only if you have the libraries available (eg libxml2). Don't you think it would be useful to have already included this library directly in the installation file? (as for example the pdcurses library is already included).
c. Perhaps it would be useful to also have an already executable version of GCSORT in the installation file. Or as a separate installation file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Eugenio,
Please accept my apologies for taking so long to reply.
A) The "special diagnostic" version was built at Simon Sobisch's request and includes "--enable-debug -–enable-cobc-internal-checks" in the GnuCOBOL ./configure step. Also, during the packaging of the binary, I omit the step to run strip.exe to remove extraneous objects (in order to make the downloadable binary smaller). So if the compiler abends with a SIGSEV it will be much easier to diagnose with the special diagnostic version rather than with a typical binary build.
B) I don't know how one would even use XML in a typical COBOL program, but I am not opposed to including libxml2. Unfortunately, I don't know how to build it. I did a little checking up and it looks like it would be very difficult to build.
C) I would VERY much like to include an executable GCSORT in the binary, but I am not able to build GCSORT in MinGW. I tried twice and nobody seemed to have a solution. https://sourceforge.net/p/open-cobol/discussion/help/thread/1b090f6307/
Kind regards,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Arnold,
Here is how I build libxml2, but I have no idea what is gained by including it in the COBOL build. (Note that the code is "bash", not Windoze "cmd", and needs to run under MSYS)
xml2version="libxml2-2.9.10"#has 4 errors during configure/make/installif["$XML2"=="yes"];thenls/mingw/bin/libxml2*.dll>/dev/nullif[$?-gt0];thenreply="y"elseyes_or_no"Re-install XML2"fielsereply="n";fiif["$reply"=="y"];thenif[-d$msysfolder/$xml2version];thenecho"removing existing $xml2version folder - this may take a while"rm-R$msysfolder/$xml2versionfimkdir$msysfolder/$xml2version#start with a clean foldercd$msysfolder/$xml2versionprintf"\nDownloading $xml2version.tar.gz - this should take less than a minute\n\n"wget-O"$tarfolder/$xml2version.tar.gz""ftp://xmlsoft.org/libxml2/$xml2version.tar.gz"if[$?-gt0];thenprintf"\nPlease download $tarfolder/$xml2version.tar.gz manually and restart\n"exit8fiprintf"\nUnpacking $tarfolder/$xml2version.tar.gz - this should take 1-2 minutes\n\n"echo" "tarxf$tarfolder/$xml2version.tar.gzif[$?-gt0];thenprintf"\nPlease download $tarfolder/$xml2version.tar.gz manually\n"exit8firm-i$tarfolder/$xml2version.tar.gzprintf"\nInstalling XML2 - This may take a while --- so ";grab_a_beerpress-any-keycd$msysfolder/$xml2version/$xml2version#sic! this is how it got unpacked by tar!./configure--prefix=/mingwif[$?-gt0];thencheck-for-errors;fimake;if[$?-gt0];thencheck-for-errors;fimakecheck;if[$?-gt0];thencheck-for-errors;fimakeinstall;if[$?-gt0];thencheck-for-errors;fils/mingw/bin/libxml2*.dll>/dev/nullif[$?-gt0];thenecho"/mingw/bin/libxml2*.dll was not created - cancelling"exit8fiecho" "fi
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I now have typical 32-bit GnuCOBOL MinGW binaries available for download, in addition to the special diagnostic version.
These were all built with GnuCOBOL rc1 (30JUN2020), GMP 6.2.0, and PDCurses 4.1.99.
https://www.arnoldtrembley.com/GC31-rc1-BDB-rename-7z-to-exe.7z
https://www.arnoldtrembley.com/GC31-rc1-VBI-rename-7z-to-exe.7z
https://www.arnoldtrembley.com/GC31-rc1-NODB-rename-7z-to-exe.7z
I've also built a 64-bit version of GC31-rc1 using MSYS2:
https://www.arnoldtrembley.com/GC31B-64bit-rename-7z-to-exe.7z
https://www.arnoldtrembley.com/GnuCOBOL-3.1-MSYS2-64-bit-Build-Guide-draft.docx
https://www.arnoldtrembley.com/GnuCOBOL-3.1-MSYS2-64-bit-Build-Guide-draft.pdf
While the 64-bit build was actually easier (due to the upgraded MinGW64/MSYS2 installer), there were some minor problems with the package. I had to manually correct several small files that reflected older GC3.0 rather than current GC3.1-rc1:
"C:\GC31B-64\share\doc\gnucobol\GnuCOBOL 3.1-RC1 Manual.pdf"
C:\GC31B-64\share\doc\gnucobol\NEWS.txt
C:\GC31B-64\share\doc\gnucobol\README.txt
C:\GC31B-64\share\doc\gnucobol\DEPENDENCIES.txt
C:\GC31B-64\share\licenses\gnucobol\COPYING.txt
C:\GC31B-64\share\licenses\gnucobol\COPYING_DOC.txt
C:\GC31B-64\share\licenses\gnucobol\COPYING_LESSER.txt
Simon, you may want to review the package that is served by MSYS2 pacman, in order to correct these files.
Kind regards,
Thanks but the version number using the above 64-bit link is 3.0, not 3.1
Last edit: Tom Lake 2020-07-08
A question and some requests.
a, Sorry but it is not clear to me what is the difference between the "typical" version and the "special diagnostic" version ?
b. The new release 3.1 of the compiler supports the JSON GENERATE / PARSE and XML GENERATE / PARSE statements but only if you have the libraries available (eg libxml2). Don't you think it would be useful to have already included this library directly in the installation file? (as for example the pdcurses library is already included).
c. Perhaps it would be useful to also have an already executable version of GCSORT in the installation file. Or as a separate installation file.
Eugenio,
Please accept my apologies for taking so long to reply.
A) The "special diagnostic" version was built at Simon Sobisch's request and includes "--enable-debug -–enable-cobc-internal-checks" in the GnuCOBOL ./configure step. Also, during the packaging of the binary, I omit the step to run strip.exe to remove extraneous objects (in order to make the downloadable binary smaller). So if the compiler abends with a SIGSEV it will be much easier to diagnose with the special diagnostic version rather than with a typical binary build.
B) I don't know how one would even use XML in a typical COBOL program, but I am not opposed to including libxml2. Unfortunately, I don't know how to build it. I did a little checking up and it looks like it would be very difficult to build.
C) I would VERY much like to include an executable GCSORT in the binary, but I am not able to build GCSORT in MinGW. I tried twice and nobody seemed to have a solution.
https://sourceforge.net/p/open-cobol/discussion/help/thread/1b090f6307/
Kind regards,
Arnold,
Here is how I build libxml2, but I have no idea what is gained by including it in the COBOL build. (Note that the code is "bash", not Windoze "cmd", and needs to run under MSYS)
Runtime-support for
GENERATE XMLand improved compile-time checks for URIs to be valid.Thank you. Where is
GENERATE XMLdocumented or discussed, so we can learn how to use it?Last edit: cdg 2020-07-06
Sorry that I've got it wrong again, it is the
XML GENERATEstatement, of course.... and you've likely guessed it, cJSON is used for runtime support of
JSON GENERATE.I do hope that the PG have those either covered now or will in the future.
Maybe @vcoen can say something about the state of this in the PG?
...and maybe we should try to further discuss this in a separate thread (at least I won't click this one when shown in the search results for XML).
Last edit: Simon Sobisch 2020-07-06
Found this with google:
https://www.ibm.com/support/knowledgecenter/SS6SG3_4.2.0/com.ibm.entcobol.doc_4.2/PGandLR/tasks/tpxgn02.htm
Seems like it would be easier to just write the XML code from scratch. :-)