Menu

Success on MAC OS X

2021-09-24
2021-09-27
  • Damon Hermann

    Damon Hermann - 2021-09-24

    In case anyone is interested in installing on MAC OS X Catalina
    1. Download latest version of GNUCobol
    2. untar into directory of your choice
    3. download BerkelyDB from oracle
    * untar
    * cd into the BerkelyDB/build_unix folder
    * run '../dist/config'
    * run 'make'
    4. Change to the GNUCobol Folder
    You may have to BREW install a couple of libraries. I found I had to install GMP and MPIR libraries with brew
    5. run ./configure --with-db=/usr/local/BerkeleyDB.18.1
    * or the version of BerkeleyDB you downloaded
    6. run 'make'
    7. run 'make install'
    8. cobc -v

    AND YOU'RE DONE!
    ~/gnucobol-3.1.2
    $ cobc -v
    cobc (GnuCOBOL) 3.1.2.0
    Built Sep 24 2021 12:31:22 Packaged Dec 23 2020 12:04:58 UTC
    C version "4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.32.62)"
    loading standard configuration file 'default.conf'
    cobc: error: no input files

     
    • Simon Sobisch

      Simon Sobisch - 2021-09-25

      You possibly want to check with cobc --info if you have a full-featured compiler - or need to add curses, libxml2, libjson-c / cJSON to achieve this.
      Note: these (ok all but curses) are new optional dependencies - looking at DEPENDENCIES gives a good picture.

       
  • Damon Hermann

    Damon Hermann - 2021-09-27
     $  cobc --info
    cobc (GnuCOBOL) 3.1.2.0
    Copyright (C) 2020 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 24 2021 12:31:22
    Packaged  Dec 23 2020 12:04:58 UTC
    C version "4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.32.62)"
    
    build information
    build environment        : x86_64-apple-darwin19.6.0
    CC                       : gcc
    C version                : "4.2.1 Compatible Apple LLVM 11.0.3
                               (clang-1103.0.32.62)"
    CPPFLAGS                 : -I/usr/local/opt/node@10/include
                               -I/usr/local/Cellar/gmp/6.2.1_1/include
    CFLAGS                   : -O2 -pipe
    LD                       : /Volumes/BigBlue/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
    LDFLAGS                  : -L/usr/local/opt/node@10/lib
    
    GnuCOBOL information
    COB_CC                   : gcc
    COB_CFLAGS               : -pipe -I/usr/local/opt/node@10/include
                               -I/usr/local/Cellar/gmp/6.2.1_1/include
                               -I/usr/local/include -Wno-unused
                               -fsigned-char -Wno-pointer-sign
                               -Qunused-arguments
    COB_DEBUG_FLAGS          : -ggdb3 -fasynchronous-unwind-tables
    COB_LDFLAGS              : -L/usr/local/opt/node@10/lib
    COB_LIBS                 : -L/usr/local/lib -lcob -lm
    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           : dylib
    COB_EXE_EXT              : 
    64bit-mode               : yes
    BINARY-C-LONG            : 8 bytes
    endianness               : little-endian
    native EBCDIC            : no
    extended screen I/O      : ncurses
    variable file format     : 0
    sequential file handler  : built-in
    indexed file handler     : disabled
    mathematical library     : GMP
    XML library              : libxml2
    JSON library             : not found
    
     
    • Simon Sobisch

      Simon Sobisch - 2021-09-27

      So you likely want to add libjson-c (or just place cJSON.c+h into the libcob folder before running configure) and include BDB or one of the other handlers for ORGANIZATION INDEXED - in any case see DEPENDENCIES file for details.

       
      • Damon Hermann

        Damon Hermann - 2021-09-27

        Thanks for the heads up. Reconfigured and all is good.

         

Anonymous
Anonymous

Add attachments
Cancel