Menu

GnuCOBOL on Fedora 40 (FC40)

GnuCOBOL
2024-04-27
2024-05-02
  • Klaus Siebke

    Klaus Siebke - 2024-04-27

    Hello GnuCOBOL fans,

    as an early adopter of Fedora 40 (FC40) which came out this week, I have installed GnuCOBOL 3.2 with VBISAM 2.1.1 on it.

    Because there were some pitfalls, here are a few brief notes on installing the software.

    With release 40 Fedora is switching to a "modern C compiler" (as they call it): gcc 14.
    See:

    https://fedoraproject.org/wiki/Changes/PortingToModernC

    Since I found out that only VBISAM 2.1.1 (the version with some additonal changes applied by Ron Norman provided in this thread: https://sourceforge.net/p/gnucobol/discussion/help/thread/8910169768/423a/#423a) works absolutely error-free with GnuCOBOL 3.2, I compiled it.
    I got errors in two source members (isrecover.c + ischeck.c) and corrected them. Please find the updated VBISAM version attached. (file: vbisam-2.1.1_20240427.tar.gz). The changes in the sources are marked with "$$FC40".

    When compiling GnuCOBOL I got another error in source member ../libcob/common.c:

    Making all in libcob
    make[2]: Entering directory '/home/haegar/addons/gnucobol-3.2/libcob'
    /bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../lib -I../lib -I/usr/include/libxml2 -DWITH_GZFILEOP -I/usr/include/cjson -DLOCALEDIR=\"/usr/local/share/locale\"   -O2 -pipe -finline-functions -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -MT common.lo -MD -MP -MF .deps/common.Tpo -c -o common.lo common.c
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../lib -I/usr/include/libxml2 -DWITH_GZFILEOP -I/usr/include/cjson -DLOCALEDIR=\"/usr/local/share/locale\" -O2 -pipe -finline-functions -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -MT common.lo -MD -MP -MF .deps/common.Tpo -c common.c  -fPIC -DPIC -o .libs/common.o
    common.c: In function 'print_info_detailed':
    common.c:9714:17: error: implicit declaration of function 'xmlCleanupParser' [-Wimplicit-function-declaration]
     9714 |                 xmlCleanupParser ();
          |                 ^~~~~~~~~~~~~~~~
    make[2]: *** [Makefile:614: common.lo] Error 1
    make[2]: Leaving directory '/home/haegar/addons/gnucobol-3.2/libcob'
    make[1]: *** [Makefile:657: all-recursive] Error 1
    make[1]: Leaving directory '/home/haegar/addons/gnucobol-3.2'
    make: *** [Makefile:565: all] Error 2
    

    So you must either configure GnuCOBOL with the option --without-xml2 (if you do not need it) or correct the error by adding a declaration here:

    ../libcob/common.c

    #if defined (WITH_XML2)
    #include <libxml/xmlversion.h>
    #include <libxml/xmlwriter.h>
    void xmlCleanupParser(); //declaration of the function  $$FC40
    #endif
    

    At the end everything runs perfectly on the brand-new Fedora 40 (I am using the Fedora MATE+Compiz Spin), even the record locking works - see a screenshot of my desktop running a TUI test application developed in GnuCOBOL.

    Have a nice weekend,
    Klaus

     
    👍
    2

    Last edit: Klaus Siebke 2024-04-27
  • Simon Sobisch

    Simon Sobisch - 2024-05-02

    Thanks for the report. Note: the right fix for the inclusion was done with [r5240].
    Please post the VBISAM fixes in the referenced post (ideally as a patch file / diff) to enable us finding it later.

     
    👍
    1

    Related

    Commit: [r5240]

    • Klaus Siebke

      Klaus Siebke - 2024-05-02

      Thank you Simon for adding the GC fix!

      Never worked with diff before - I hope this is what's needed:

      isrecover.c

      diff -u ./old/isrecover.c ./new/isrecover.c
      --- ./old/isrecover.c   2010-05-01 14:51:10.000000000 +0200
      +++ ./new/isrecover.c   2024-04-26 21:31:20.000000000 +0200
      @@ -554,7 +554,8 @@
       ircvuniqueid (VB_CHAR *pcbuffer)
       {
           vb_rtd_t *vb_rtd =VB_GET_RTD;
      -    off_t   tuniqueid;
      + //   off_t   tuniqueid;        §§§KS
      +    long long int tuniqueid;
           int ihandle, ipid;
      
           ihandle = inl_ldint (pcbuffer);
      

      ischeck.c

      diff -u ./old/ischeck.c ./new/ischeck.c --color
      --- ./old/ischeck.c 2015-02-24 21:35:54.000000000 +0100
      +++ ./new/ischeck.c 2024-04-26 21:30:58.000000000 +0200
      @@ -144,8 +144,10 @@
           return 0;
       }
      
      +//static int              §§§KS
      +//ipreamble (ihandle)     §§§KS
       static int
      -ipreamble (ihandle)
      +ipreamble (int ihandle)
       {
           vb_rtd_t *vb_rtd =VB_GET_RTD;
           struct DICTINFO *psvbptr;
      

      And sorry, I marked the changes (deleted lines) in VBISAM with §§§KS instead of §§FC40, like in the GC source.

      I will add the diff output also in the old thread.

      btw. where can I dowloadd the latest versions of GC 3.x and GC 4 including the current fixes? Link?

       
      👍
      1
    • Mickey White

      Mickey White - 2024-05-02

      I am confused. Is this VBISAM fix in the next release of GnuCOBOL 3.3 ? Is it in the Nightly build? If we use " --with-vbisam Use VBISAM (libvbisam) (ISAM handler)" will we get the new VBISAM fix (for locking as menitioned above)? Is this fix in the VBISAM stand alone project? And lastly, is V-ISAM/VBISAM all the same product?

       
      • Simon Sobisch

        Simon Sobisch - 2024-05-02

        V*ISAM is an external library, similar to BDB. If you want to know more about that - please use the search option in this discussion board (possibly sorting by date not "relevance").

         
      • Klaus Siebke

        Klaus Siebke - 2024-05-02

        Mickey, neither one nor the other - this is a VBISAM version from an older post by Ron Norman:

        https://sourceforge.net/p/gnucobol/discussion/help/thread/8910169768/423a/#423a

        I have tried several versions of VBISAM with GC 3.2, including the latest version 2.2 from Ron Norman, available here:

        http://inglenet.ca/Products/GnuCOBOL/vbisam-2.2.tar.Z

        Only the version 2.1.1 works completely correctly in multiuser mode from my point of view.

        The changes shown here are exclusively related to making version 2.1.1 compatible with the new gcc 14 used in Fedora 40.

         
        👍
        1

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.