GF 3.8 was released on 22 June 2016.
What's new? See the Release notes.
Platform | Download | Features | How to install |
---|---|---|---|
Mac OS X | gf-3.8.pkg | GF+S+C+P | Double-click on the package icon (*) |
Mac OS X | gf-3.8-bin-intel-mac.tar.gz | GF+S+C+P | sudo tar -C /usr/local -zxf gf-3.8-bin-intel-mac.tar.gz |
Ubuntu (32-bit) | gf_3.8-1_i386.deb | GF+S+C+J+P | sudo dpkg -i gf_3.8-1_i386.deb |
Ubuntu (64-bit) | gf_3.8-1_amd64.deb | GF+S+C+J+P | sudo dpkg -i gf_3.8-1_amd64.deb |
Windows | gf-3.8-bin-windows.zip | GF+S | unzip gf-3.8-bin-windows.zip |
Features: GF = GF shell and grammar compiler and the Resource Grammar Library, S = gf -server
mode, C = C run-time system, J/P = Java/Python binding to the C run-time system
The Windows package is installed by just unpacking it anywhere. You will probably need to set the PATH
and GF_LIB_PATH
environment variables, see Inari's notes on Installing GF on Windows.
The .deb
packages should work on Ubuntu 12.04, 14.04 and 16.04 and similar Linux distributions.
The packages for Mac OS X should work on at least 10.9, 10.10 and 10.11 (Mavericks, Yosemite and El Capitan).
(*) Note that for compatibility with OS X 10.11, gf-3.8.pkg
will install the gf
executable in /usr/local/bin
instead of /usr/bin
, so make sure /usr/local/bin
is in your $PATH
. Also, if you still have an older version of GF installed in /usr/bin
, remove it and/or make sure /usr/local/bin
comes before /usr/bin
in your $PATH
so you don't accidentally run the old version.
The Mac OS and Linux .tar.gz
packages are designed to be installed in /usr/local
. You can install them in other locations, but then you need to set the GF_LIB_PATH
environment variable:
export GF_LIB_PATH=/usr/local/share/gf-3.8/lib
where /usr/local
should be replaced with the path to the location where you unpacked the package.
GF is on Hackage, so under normal circumstances the prodedure is fairly simple:
cabal update
cabal install gf
You can also download the full source package from here: gf-3.8.tar.gz
.
The above steps installs GF for a single user. The executables are put in $HOME/.cabal/bin
(or, with recent versions of the Haskell platform on Mac OS X, in $HOME/Library/Haskell/bin
), so it is a good idea to put a line in your .bash_profile
or .profile
to add that directory to you path:
PATH=$HOME/.cabal/bin:$PATH
or
PATH=$HOME/Library/Haskell/bin:$PATH
Note 1. GF uses haskeline
, which on Linux depends on some non-Haskell libraries that won't be installed automatically by cabal, and therefore need to be installed manually. Here is one way to do this:
sudo apt-get install libghc-haskeline-dev
sudo yum install ghc-haskeline-devel
Note 2. The GF source code has been updated to compile with GHC 8.0.1. Using older versions of GHC (7.10.3, 7.10.2, 7.8, 7.6) should work too.
There seems to be a bug in some versions of Cabal that can cause
Distribution/Simple/PackageIndex.hs:124:8-13: Assertion failed
if the same version of GF is already installed. If you encounter this, you can use ghc-pkg unregister gf
to remove the installed version of GF and ghc-pkg list gf
to verify that it is gone.
The first time:
darcs get --lazy http://www.grammaticalframework.org/ GF
cd GF
cabal install
Subsequently:
cd GF
darcs pull -a
cabal install
Alternatively, you can get the code from the GF GitHub mirror, which is updated nightly.
The above notes for installing from source apply also in these cases. For more info on working with the GF source code, see the GF Developers Guide.