Skip to content

Instantly share code, notes, and snippets.

@dariusf
Last active March 20, 2024 02:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dariusf/74899646a63bf64431d220a3cc841153 to your computer and use it in GitHub Desktop.
Save dariusf/74899646a63bf64431d220a3cc841153 to your computer and use it in GitHub Desktop.

Using Apron on macOS

Install PPL.

brew install ppl

For some reason, installing from opam doesn't pick up the presence of PPL. We run ./configure manually to fix that.

git clone https://github.com/antoinemine/apron.git
cd apron
opam install --deps-only .

# https://github.com/antoinemine/apron/issues/36
./configure -no-strip
# PPL support should be enabled (1)
make
make install

Curiously, after this ocamlfind will be aware of the library, but opam will not:

$ opam list | grep apron

$ ocamlfind list | grep apron
apron               (version: 0.9.14)
apron.apron         (version: n/a)
apron.avoD          (version: n/a)
apron.avoMPQ        (version: n/a)
apron.boxD          (version: n/a)
apron.boxMPFR       (version: n/a)
apron.boxMPQ        (version: n/a)
apron.fppD          (version: n/a)
apron.octD          (version: n/a)
apron.octMPQ        (version: n/a)
apron.polkaGrid     (version: n/a)
apron.polkaMPQ      (version: n/a)
apron.polkaRll      (version: n/a)
apron.ppl           (version: n/a)
apron.t1pD          (version: n/a)
apron.t1pMPFR       (version: n/a)
apron.t1pMPQ        (version: n/a)

To run the hello world, use the findlib names in your dune file:

(executable
 (name main)
 (libraries apron.apron apron.boxMPQ apron.octMPQ apron.polkaMPQ apron.ppl apron.polkaGrid))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment