| CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 17
Building
See https://github.com/camfort/camfort#building for a general overview. If you don't want to build from source, see https://github.com/camfort/camfort#obtaining (we likely build for your system).
CamFort can build using Cabal or Stack. Due to dependencies, you'll probably need at least 3GiBs RAM and 20 minutes from a fresh development environment.
CamFort depends on the following foreign libraries:
- FLINT >= 2.5
- LAPACK, BLAS (required by hmatrix)
These need to be reachable by Cabal/Stack at compile time, and the user at runtime (assuming dynamic linking). You may have to configure Cabal to include the necessary directories. (Especially likely if you're on Windows.)
We use the Z3 solver for some features. Version 4.5 or higher is required. We only need the main executable present at runtime.
Clone the CamFort Git repository:
git clone git@github.com:camfort/camfort.git
Alternatively, releases include a source archive.
We recommend ghcup for installing GHC on any supported OS. It can also install manage Stack and Cabal for you!
To build on Stack, run the following command in the CamFort source directory:
stack build
For Cabal:
cabal build
On Stack, you may wish to build a profiling version with:
stack build --enable-executable-profiling --enable-library-profiling --ghc-options="-fprof-auto -rtsopts"
You may use stack run, stack install, cabal run, cabal install to run CamFort once built. See the tools' respective documentation for usage.
apt install libflint-dev liblapack-dev libopenblas-dev z3
Install GHC, then build via regular Stack or Cabal commands.
pacman -S flint lapack openblas z3
Install GHC, then build via regular Stack or Cabal commands.
yum install lapack-devel gmp-devel mpfr-devel
Flint may need to be installed from source.
Via Homebrew:
brew install flint lapack openblas z3
Install GHC, then build via regular Stack or Cabal commands.
Stack may need pointing explicitly at the location in which brew puts flint which can be done by adding this to stack.yaml before building. E.g., for flint 2.9.0 placed at /opt/homebrew/Cellar/flint/2.9.0 then the following would be needed in stack.yaml.
extra-include-dirs:
- /opt/homebrew/Cellar/flint/2.9.0/include
extra-lib-dirs:
- /opt/homebrew/Cellar/flint/2.9.0/lib
- "I have linking problems with iconv". Some Mac OS configurations have problems due to multiple installations of libiconv. There is some very useful advice here: https://blog.omega-prime.co.uk/?p=96
See Building on Windows.