Skip to content

Commit 91125ff

Browse files
Merge branch 'develop-readme-update-instructions' into develop. Close #347.
**Description** The installation instructions include how to install Ogma from source, but not via the official repositories of Ubuntu and Debian. Because it's much more convenient to install the binary versions from the official repos, we should include that as the default installation method. **Type** - Feature: Update installation instructions based on new capabilities. **Additional context** None. **Requester** - Ivan Perez. **Method to check presence of bug** Not applicable (not a bug). **Expected result** The installation instructions describe how to install Ogma from the official repositories in Ubuntu/Debian first, before suggesting installation from source. **Solution implemented** Modify installation instructions to introduce Linux and Mac subsections. Add installation from binaries to the Linux section first, followed by installation from source. Adjust both Linux and Mac subsections to make them as consistent as possible. **Further notes** None.
2 parents 2291a0b + 41ebc61 commit 91125ff

File tree

2 files changed

+109
-16
lines changed

2 files changed

+109
-16
lines changed

ogma-cli/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Fix grammatical errors in ROS 2 tutorial (#341).
66
* Make example file consistent with associated tutorial (#343).
77
* Add syntax information to code blocks in tutorials (#345).
8+
* Update installation instructions for Linux, Mac (#347).
89

910
## [1.12.0] - 2026-01-21
1011

ogma-cli/README.md

Lines changed: 108 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ verification framework that generates hard real-time C99 code.
3939
## Table of Contents
4040

4141
- [Installation](#installation)
42-
- [Pre-requisites](#pre-requisites)
43-
- [Compilation](#compilation)
42+
- [Linux installation](#linux-installation)
43+
- [Mac installation](#mac-installation)
44+
- [Troubleshooting](#troubleshooting)
4445
- [Usage](#usage)
4546
- [cFS Application Generation](#cfs-application-generation)
4647
- [ROS Application Generation](#ros-application-generation)
@@ -55,45 +56,136 @@ verification framework that generates hard real-time C99 code.
5556
# Installation
5657
<sup>[(Back to top)](#table-of-contents)</sup>
5758

58-
## Pre-requisites
59+
## Linux Installation
5960
<sup>[(Back to top)](#table-of-contents)</sup>
6061

61-
To install Ogma from source, users must have the tools GHC and cabal-install,
62-
as well as the libraries `bz2` and `expat`. At this time, we recommend GHC 8.6
63-
and a version of cabal-install between 2.4 and 3.2. (Ogma has been tested with
64-
GHC versions up to 9.2 and cabal-install versions up to 3.6, although the
65-
installation steps may vary slightly depending on the version of cabal-install
66-
being used.)
62+
### Ubuntu 25.10 / Debian Forky or newer
63+
64+
On Ubuntu 25.10 / Debian Forky or newer, Ogma can be installed directly from
65+
the package repositories with:
66+
67+
```sh
68+
$ sudo apt-get install ogma
69+
```
70+
71+
To test that Ogma is available, execute the following to print the list of
72+
commands supported:
73+
74+
```sh
75+
$ ogma --help
76+
```
77+
78+
### Other Linux distributions
79+
80+
On other Linux distributions or older Debian-based distributions, to use Ogma
81+
you must compile it from source, for which you need a number of pre-requisites,
82+
such as a Haskell compiler (GHC) and the package manager Cabal
83+
(`cabal-install`), as well as the libraries `bz2` and `expat`. At this time, we
84+
recommend GHC 8.6 and a version of `cabal-install` between 2.4 and 3.2. (Ogma
85+
has been tested with GHC versions up to 9.2 and cabal-install versions up to
86+
3.6, although the installation steps may vary slightly depending on the version
87+
of `cabal-install` being used.)
6788

6889
On Debian or Ubuntu Linux, these dependencies can be installed with:
6990

7091
```sh
7192
$ apt-get install ghc cabal-install libz-dev libbz2-dev libexpat-dev
7293
```
7394

74-
On Mac, they can be installed with:
95+
Once the compiler is installed, install Ogma from
96+
[Hackage](https://hackage.haskell.org/package/ogma-cli) with:
7597

7698
```sh
77-
$ brew install ghc cabal-install bzip2 expat
99+
$ cabal update
100+
$ cabal install --lib copilot copilot-core copilot-c99 copilot-language \
101+
copilot-theorem copilot-libraries copilot-interpreter copilot-prettyprinter
102+
$ cabal install ogma-cli:ogma
78103
```
79104

80-
## Compilation
81-
<sup>[(Back to top)](#table-of-contents)</sup>
105+
After that, the `ogma` executable will be placed in the directory
106+
`$HOME/.local/bin/`, where `$HOME` represents your user's home directory.
107+
108+
To test that Ogma is available, execute the following to print the list of
109+
commands supported:
110+
111+
```sh
112+
$ ogma --help
113+
```
114+
115+
Alternatively, you may want to install the latest development version of Ogma
116+
from the official repository, which you can do as follows:
82117

83-
Once GHC and cabal are installed, the simplest way to install Ogma is with:
84118
```sh
85119
$ git clone https://github.com/nasa/ogma.git
86120
$ cd ogma
87121
$ export PATH="$HOME/.local/bin/:$PATH"
88122
$ cabal update
89-
$ cabal install --lib copilot copilot-c99 copilot-language copilot-theorem \
90-
copilot-libraries copilot-interpreter
123+
$ cabal install --lib copilot copilot-core copilot-c99 copilot-language \
124+
copilot-theorem copilot-libraries copilot-interpreter copilot-prettyprinter
125+
$ cabal install ogma-cli:ogma
126+
```
127+
128+
Like before, the `ogma` executable will be placed in the directory
129+
`$HOME/.local/bin/`, where `$HOME` represents your user's home directory.
130+
131+
## Mac installation
132+
<sup>[(Back to top)](#table-of-contents)</sup>
133+
134+
On macOS, to use Ogma you must compile it from source, for which you need a
135+
number of pre-requisites, such as a Haskell compiler (GHC) and the package
136+
manager Cabal (`cabal-install`), as well as the libraries `bz2` and `expat`.
137+
138+
```sh
139+
$ brew install ghc cabal-install bzip2 expat
140+
```
141+
142+
Once the compiler is installed, install Ogma from
143+
[Hackage](https://hackage.haskell.org/package/ogma-cli) with:
144+
145+
```sh
146+
$ cabal update
147+
$ cabal install --lib copilot copilot-core copilot-c99 copilot-language \
148+
copilot-theorem copilot-libraries copilot-interpreter copilot-prettyprinter
91149
$ cabal install ogma-cli:ogma
92150
```
93151

94152
After that, the `ogma` executable will be placed in the directory
95153
`$HOME/.local/bin/`, where `$HOME` represents your user's home directory.
96154

155+
To test that Ogma is available, execute the following to print the list of
156+
commands supported:
157+
158+
```sh
159+
$ ogma --help
160+
```
161+
162+
Alternatively, you may want to install the latest development version of Ogma
163+
from the official repository, which you can do as follows:
164+
165+
```sh
166+
$ git clone https://github.com/nasa/ogma.git
167+
$ cd ogma
168+
$ export PATH="$HOME/.local/bin/:$PATH"
169+
$ cabal update
170+
$ cabal install --lib copilot copilot-core copilot-c99 copilot-language \
171+
copilot-theorem copilot-libraries copilot-interpreter copilot-prettyprinter
172+
$ cabal install ogma-cli:ogma
173+
```
174+
175+
Like before, the `ogma` executable will be placed in the directory
176+
`$HOME/.local/bin/`, where `$HOME` represents your user's home directory.
177+
178+
## Troubleshooting
179+
<sup>[(Back to top)](#table-of-contents)</sup>
180+
181+
182+
Feel free to open an issue if you are unable to install Ogma following these
183+
instructions.
184+
185+
There is a `.github/` directory at the root of the repository that may help
186+
with troubleshooting the installation. Also, our issues often include comments
187+
with Dockerfiles listing the steps necessary to install Ogma from scratch.
188+
97189
# Usage
98190
<sup>[(Back to top)](#table-of-contents)</sup>
99191

0 commit comments

Comments
 (0)