Menu

Compiling GNU Cobol 3.1.12 with VBISAM

2021-01-08
2021-07-05
  • Sergio Samayoa

    Sergio Samayoa - 2021-01-08

    Hi Guys,

    I believe that this is a recurring topic and already read some posts about it but information is disperse and somewhat confusing for VBISAM. I gabbed VBISAM from here: https://sourceforge.net/projects/vbisam/files/vbisam2/vbisam-2.0.tar.gz
    But that does not compiles, gave me errors this errors:

    ishelper.c:147:1: error: conflicting types for 'isrelrec'
    147 | isrelrec (const int ihandle, const off_t trownumber)
    | ^~~~~~~~
    In file included from isinternal.h:123,
    from ishelper.c:20:
    ../vbisam.h:221:12: note: previous declaration of 'isrelrec' was here
    221 | extern int isrelrec (const int ihandle, const vbisam_off_t trownumber);
    | ^~~~~~~~
    ishelper.c:195:1: error: conflicting types for 'issetunique'
    195 | issetunique (const int ihandle, const off_t tuniqueid)
    | ^~~~~~~~~~~
    In file included from isinternal.h:123,
    from ishelper.c:20:
    ../vbisam.h:229:12: note: previous declaration of 'issetunique' was here
    229 | extern int issetunique (const int ihandle, const vbisam_off_t tuniqueid);
    | ^~~~~~~~~~~
    ishelper.c:226:1: error: conflicting types for 'isuniqueid'
    226 | isuniqueid (const int ihandle, off_t ptuniqueid)
    | ^~~~~~~~~~
    In file included from isinternal.h:123,
    from ishelper.c:20:
    ../vbisam.h:232:12: note: previous declaration of 'isuniqueid' was here
    232 | extern int isuniqueid (const int ihandle, vbisam_off_t
    ptuniqueid);
    | ^~~~~~~~~~

    Poking around I found and used VBISAM's source included here:
    https://www.arnoldtrembley.com/vbisam_install_guide_v5.1.zip
    I got them compiled & installed, got cobc compiled but when I run "make check" I get ~4 errors related to ISAM access:

    728: OUTPUT on INDEXED file to missing directory FAILED (run_file.at:372)
    783: SEQUENTIAL file with SHARING READ ONLY FAILED (run_file.at:5484)
    799: INDEXED partial keys FAILED (run_file.at:6718)

    728 & 783 may be caused because I'm compiling in Windows 10's wsl but 799 seems a bigger problem because partial keys are supposed to work, right?

    So, questions:
    1. What VBISAM's sources should use for COBC 3.1.2?
    2. Error in test #799 may be caused because I'm not using the correct VBISAM's source?

    I'm compiling in Ubunty 20.04 inside Windows 10's wsl.

    Regards!

     
    • Brian Tiffin

      Brian Tiffin - 2021-02-01

      There are, or should be better instructions, but yeah, VBISAM fails some tests, Sergio. I usually ./configure --with-vbisam, but haven't snagged Ron's latest, And don't know the link at the moment.

      There will be a better link. If I get it figured out before someone in the know, link will be here, soonish. And perhaps an explanation of the edge cases the test compares are bumping into, and which ones are warnings to developers or actual fatals to be avoided.

      Cheers,
      Blue

       
  • Simon Sobisch

    Simon Sobisch - 2021-02-02

    The version you've grabbed is the version from Roger While. It is a good version but does miss some features.
    Test 799 fails because GnuCOBOL expect the ISAM handler to have full working support for partial keys, which the old version does not have. So it tests and reports the correct result "doesn't work".

    One note in general: Ron worked hard to produce the best VBISAM version ever. After discussion with Trevor I can now say that this is the new official version to come and will also be available at the "original" place (with a new name), as the source code repository will be, too. I can also say that it is believed to be 100% C-ISAM compatible while still being able to read/write files in the VB-ISAM format, too.

    It is expected that this new version is finished before GnuCOBOL 3.2 and will be the suggested handler to use (GnuCOBOL 4 will use this as default). GnuCOBOL 3.2 is expected around end of March 2021 so the new VBISAM version is expected to come earlier (its code is nearly finished).

    Therefore if you don't need support for partial keys now: just ignore that failing test, otherwise the BDB interface for now and later use either unload/load programs or GCSORT (I haven't checked but assume partial keys would work there, too) to convert them to VBISAM later.

     
    • Brian Tiffin

      Brian Tiffin - 2021-02-02

      Sorry to pester, Simon. Where can I snag a recent tarball for trials?

      Cheers,
      Blue

       
      • Simon Sobisch

        Simon Sobisch - 2021-02-02

        In this case I did not wanted to post one (because of the changes and their copyright and stuff) expect one to be available in the next 6 weeks at https://sourceforge.net/projects/vbisam/files/

         
        • Andrea

          Andrea - 2021-07-01

          Any news ? I checked the link but I find only the old archives.
          Bye.

           
          • Simon Sobisch

            Simon Sobisch - 2021-07-01

            The only news is that this is still quite a high priority on my TODO pile, either end of this month or in September.

            But the version from Roger is definitely reasonable to use and the files created by it will also be readable (and can be updated) by the new version.

             

            Last edit: Simon Sobisch 2021-07-01
  • Nikos

    Nikos - 2021-07-05

    I have ready to use binaries for Debian based distros for vbisam_2.0.1-1_amd64, gnucobol_3.1.2-1_amd64 with clang-10.

    • download the gnucobol-vbisam-clang.tar.gz

    • extract it to a folder

    • open terminal to that folder

    • execute the following commands

    sudo dpkg -i *.deb
    
    sudo apt update 
    
    sudo apt upgrade
    
    sudo apt install clang --install-suggests
    
    cobc -x -Xref -ftsymbols -Tvarrec.lst varrec.cbl
    
    ./varrec
    

    Bye.

     
    👍
    1

Anonymous
Anonymous

Add attachments
Cancel