Menu

New GnuCOBOL 3.1-rc1 MinGW Binaries, including 64-bit

2020-07-05
2020-07-08
  • Eugenio Di Lorenzo

    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.

     
    • Arnold Trembley

      Arnold Trembley - 2020-07-06

      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,

       
      • cdg

        cdg - 2020-07-06

        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/install
        
        if [ "$XML2" == "yes" ]; then
           ls /mingw/bin/libxml2*.dll > /dev/null
           if [ $? -gt 0 ]; then
              reply="y"
           else    
              yes_or_no "Re-install XML2"
           fi   
        else
           reply="n";   
        fi   
        
        if [ "$reply" == "y" ]; then
           if [ -d $msysfolder/$xml2version ]; then 
              echo "removing existing $xml2version folder - this may take a while"
              rm -R $msysfolder/$xml2version
           fi
           mkdir $msysfolder/$xml2version #start with a clean folder
           cd $msysfolder/$xml2version
        
           printf "\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 [ $? -gt 0 ]; then 
              printf "\nPlease download $tarfolder/$xml2version.tar.gz manually and restart\n"
              exit 8
           fi
        
           printf "\nUnpacking $tarfolder/$xml2version.tar.gz - this should take 1-2 minutes\n\n"
           echo " "
           tar xf $tarfolder/$xml2version.tar.gz  
           if [ $? -gt 0 ]; then
              printf "\nPlease download $tarfolder/$xml2version.tar.gz manually\n"
              exit 8
           fi
        
           rm -i $tarfolder/$xml2version.tar.gz
        
           printf "\nInstalling XML2 - This may take a while --- so "; grab_a_beer
        
           press-any-key
        
           cd $msysfolder/$xml2version/$xml2version #sic! this is how it got unpacked by tar!
           ./configure --prefix=/mingw  
           if [ $? -gt 0 ]; then check-for-errors; fi  
           make;         if [ $? -gt 0 ]; then check-for-errors; fi
           make check;   if [ $? -gt 0 ]; then check-for-errors; fi
           make install; if [ $? -gt 0 ]; then check-for-errors; fi
        
           ls /mingw/bin/libxml2*.dll > /dev/null
           if [ $? -gt 0 ]; then 
              echo "/mingw/bin/libxml2*.dll was not created - cancelling" 
              exit 8
           fi
        
           echo " "
        fi
        
         
        • Simon Sobisch

          Simon Sobisch - 2020-07-06

          I have no idea what is gained by including it in the COBOL build

          Runtime-support for GENERATE XML and improved compile-time checks for URIs to be valid.

           
          • cdg

            cdg - 2020-07-06

            Thank you. Where is GENERATE XMLdocumented or discussed, so we can learn how to use it?

             

            Last edit: cdg 2020-07-06
            • Simon Sobisch

              Simon Sobisch - 2020-07-06

              Sorry that I've got it wrong again, it is the XML GENERATE statement, 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
            • Arnold Trembley

              Arnold Trembley - 2020-07-06
               
              • cdg

                cdg - 2020-07-06

                Seems like it would be easier to just write the XML code from scratch. :-)

                 

Anonymous
Anonymous

Add attachments
Cancel