Menu

gnuCobol Install MacOS M4

2026-08-21
2026-08-23
  • Damon Hermann

    Damon Hermann - 2026-08-21

    Man am I having trouble install on a MacBook air M4.
    When I did the dowload for mac and ran it. Sadly it ran and placed it in a bottle only to find out when coc was rab itr only generates a .exe app. I wanted to generate apple m4 apps.

    This really needs to addressed since many Windows users are getting out of windows permantly and buying MacOS with Mx series chips.

    The MX series adds many levels of frustration.

    I've already installed cobol to run on a linux box, Planning on installing to raspberry or orangeberry PI when I decide which pi to purchase.

    IS there a way to run on linux and run the THAT coiler fro MACOS M4 and produce apps are native to that OS?
    Or am I limited to apps only complied to that specific Hardware? Very Frustrated.

    My goal to get rid of MS permantly which I have done, I know I generate .EXE files if I instrall gnuCobol into a bottle.

    HELP!

     
    • Ralph Linkletter

      Your goal is to get rid of MS permantly which I have done ?
      I thought you were building a COBOL educational project ?
      I think you will find that Windows and a 3270 terminal emulator own the zOS COBOL world.

      Look at the job listings for COBOL programmers.
      Virtually all want zOS COBOL experience. Not Mac - Not Linux.

      Your previous post indicated a project to educate newbies to COBOL.

      "Making a Noob to GnuCOBOL and developing in COBOL based on the fact that so many young people have considered or ARE considering interest in COBOL as a career move. MANY companies ARE looking COBOL programmers since older folks are now retiring."

      "Hello World" Linux / Mac COBOL is not educating anything worthwhile if your intent was to enhance the possibility of training COBOL programmers for professional employment.

      I think you need to revisit your plan. Or at a minimum change the focus to game writing with GnuCOBOL and your prospective students.

       
      • Damon Hermann

        Damon Hermann - 2026-08-22

        Thanks for the input. All you've pointed out is being addressed in a Project I've proposed in The Lounge. I"ll be that over to the CONTRIB Forum soon. Basically, I will be taking people from "I don't know anything about COBOL language." To hopefully gain enough knowledge throug gnuCOBOL to moving onto a MainFrame zOS or IBM system 3270. This course WILL hopefull take them through the simple "Hello world" exampled to a full funcioning app like Rental Management/Inventory . But this does not resolve my issue I am having I posted about.

        Again thank you for your input.

         
  • Michael Del Solio

    One way to install GnuCOBOL on macOS is via Homebrew: https://brew.sh/

    Once Homebrew is installed, running brew install gnucobol should be enough to get cobc up and running on your machine.

    https://formulae.brew.sh/formula/gnucobol#default

    Then, for example,
    cobc -x hello.cob
    ./hello
    should also work.

     
    • Damon Hermann

      Damon Hermann - 2026-08-22

      Yes I am well aware of the two ways to easily install gnuCOBOL via the Installer through gnuCOBOL download, and HomeBrew.

      Both methods install gnuCobol in to bottles. So when the compiler is run it produces a .EXE file.

      Running an .EXE files on a mac simple throws that app into a bottle. That produces an issue of, Where are the files located on my Mac? Not everyone is familiar with using Bottles. So, I am seeking a way to run gnuCOBOL natively on the MacOS and proces COBOL apps that be run and tested on the MAC.

      Cheers.

       
  • Simon Sulser

    Simon Sulser - 2026-08-23

    Not sure I fully understand - but Homebrew just keeps everything in order. The executables, libs, includes and docs of installed Bottles.

    After having installed GnuCOBOL with Homebrew you compile your programm as usally with cobc -x myprog.cbland that will produce a binary executable in the corresponding file format of your machine. In your case aarch64 for Apple Silicon. It is not placed anywhere else or even in a Homebrew Bottle.

     

Anonymous
Anonymous

Add attachments
Cancel