Menu

Contributing

GnuCOBOL
2012-05-19
1 day ago
  • Brian Tiffin

    Brian Tiffin - 2012-05-19

    Sign up on the forge, then post a note in the Contributions channel to get started.

    Cheers,
    Brian

     

    Last edit: Brian Tiffin 2012-09-25
  • Juan Carlos Escartí

    To Simon or Brian

    In order to start contributing we have downloaded GNU COBOL from source and compiled it on a clean OpenSuse 15.6 machine.

    We know there is a SVN that is continuously being updated

    What scripts do we have/can we run to keep this version fully up to date?
    Is there a method in place to keep our modified version in parallel with the official version until our changes are incorporated into it?

    Is there an easy way to have versions with BDB VBISAM NCURSES and NCURSESW etc. running simultaneously, i.e. different versions of cobc and different runtimes?

    The cobc -i dump is:

    build environment        : x86_64-pc-linux-gnu
    CC                       : gcc
    C version                : "7.5.0"
    CPPFLAGS                 : 
    CFLAGS                   : -O0 -ggdb3 -fasynchronous-unwind-tables -pipe
                               -fsigned-char -Wall -Wwrite-strings
                               -Wmissing-prototypes -Wno-format-y2k
    LD                       : /usr/x86_64-suse-linux/bin/ld -m elf_x86_64
    LDFLAGS                  :  -Wl,-z,relro,-z,now,-O1
    
    GnuCOBOL information
    COB_CC                   : gcc
    COB_CFLAGS               : -pipe -I/usr/local/include -Wno-unused
                               -fsigned-char -Wno-pointer-sign
    COB_DEBUG_FLAGS          : -ggdb3 -fasynchronous-unwind-tables
    COB_LDFLAGS              : 
    COB_LIBS                 : -L/usr/local/lib64 -lcob
    COB_CONFIG_DIR           : /usr/local/share/gnucobol/config
    COB_COPY_DIR             : /usr/local/share/gnucobol/copy
    COB_MSG_FORMAT           : GCC
    COB_OBJECT_EXT           : o
    COB_MODULE_EXT           : so
    COB_EXE_EXT              : 
    64bit-mode               : yes
    BINARY-C-LONG            : 8 bytes
    endianness               : little-endian
    native EBCDIC            : no
    extended screen I/O      : ncursesw
    variable file format     : 0
    sequential file handler  : built-in
    indexed file handler     : BDB
    mathematical library     : GMP
    XML library              : libxml2
    JSON library             : json-c
    

    cobc -V

    cobc (GnuCOBOL) 3.3-dev.0
    Copyright (C) 2024 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    Written by Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch, Edward Hart
    Built     Sep 12 2024 05:43:49
    Packaged  Sep 12 2024 03:42:46 UTC
    C version "7.5.0"
    

    Is this the correct build for migrating from MF to GNUCOBOL ?

    There is a repository for SuSE maintained by ellessar which seems quite up to date. Can we build on this repository ?

    How do I know exactly what SVN number I am on?

    Thanks

    Note:
    It would be interesting to update the README because until you discover that the script made by Simon is the easy way to install, it takes you a while to fight with the application.

     

    Last edit: Simon Sobisch 2 days ago
    • Mickey White

      Mickey White - 3 days ago

      All good questions. I know you can run different versions on the same box See FAQ section : 3.2 What are the configure options available for building GnuCOBOL?

       
  • Simon Sobisch

    Simon Sobisch - 2 days ago

    The whole process you've described gets down to:

    • get svn version via svn (so you can update any time later)
    • create additional build parts (you need more of the standard dependencies, see HACKING)
    • create multiple build environments using that source
    • don't install but use a "pre install" environment
    $> svn checkout https://svn.code.sf.net/p/gnucobol/code/branches/gnucobol-3.x
    $> cd gnucobol-3.x
    $> ./autogen.sh   # use "./autogen.sh install" if you get version mismatch during make
    
    $> mkdir build
    $> pushd $_
    $> ../configure --enable-debug -with-db
    $> make -j $(nproc)
    $> popd
    
    $> mkdir build_optim
    $> pushd $_
    $> ../configure -with-db CC="gcc -mtune=native -march=native"
    $> make -j $(nproc)
    $> popd
    
    $> mkdir build_isam
    $> pushd $_
    $> ../configure --enable-debug -with-vbisam
    $> make -j $(nproc)
    $> popd
    
    $> mkdir build_ncurses
    $> pushd $_
    $> ../configure --enable-debug -with-curses=ncurses CURSES_LIBS="-L/path/to/libncurses -lncurses" CURSES_CFLAGS="-I/path/to/ncurses.h"
    $> make -j $(nproc)
    $> popd
    
    $> build/pre-inst-env  # you now use that until...
    $> exit                # you leave the shell session
    
    $> svn info    # full info check out
    $> svn status  # full info on current changes
    $> svnversion  # revision and "modified" info
    $> svn update  # to get the current updates with keeping local changes
    $> make -C build -j $(nproc)
    $> make -C build_optim -j $(nproc)
    $> make -C build_isam -j $(nproc)
    $> make -C build_isam -j $(nproc)
    

    Note: I don't know of a distro that distributes ncursesw and has ncurses as well and not as a symlink to the former - if you really want that you likely have to build it on your own and therefore pass the information as noted above.

     
    👍
    2
  • Juan Carlos Escartí

    Thanks Simon, as always clear and informative

    Another question, if it's not a bother, since I haven't programmed in C for over 30 years, I used to use ctrace for debugging, now I think GDB is being used.

    What debugging is more interesting for studying how to trace GNUCOBOL code?

    What do you use?

     

Log in to post a comment.