diff options
| author | hallgren <hallgren@chalmers.se> | 2014-06-17 14:17:59 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2014-06-17 14:17:59 +0000 |
| commit | 6f8e52c944e807eb5e122b35b68dfafc20b6c54f (patch) | |
| tree | 6e0e3b9ff1e5a9a64b5a74770748f8369d583395 /doc | |
| parent | 1668eb17e5b14fa64cac069c53250aadb50d5e9b (diff) | |
doc/gf-developers.t2t: quick note on how to compile the C run-time system
Also a few other minor updates.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/gf-developers.html | 142 | ||||
| -rw-r--r-- | doc/gf-developers.t2t | 34 |
2 files changed, 158 insertions, 18 deletions
diff --git a/doc/gf-developers.html b/doc/gf-developers.html index 0355c4ca0..e2ffa2329 100644 --- a/doc/gf-developers.html +++ b/doc/gf-developers.html @@ -9,7 +9,7 @@ <CENTER> <H1><a href="../"><IMG src="../doc/Logos/gf0.png"></a>GF Developers Guide</H1> <FONT SIZE="4"><I>Authors: Björn Bringert, Krasimir Angelov and Thomas Hallgren</I></FONT><BR> -<FONT SIZE="4">Last update: 2013-01-30, 15:11</FONT> +<FONT SIZE="4">Last update: 2014-06-17, 16:14</FONT> </CENTER> <P></P> @@ -30,15 +30,23 @@ <LI><A HREF="#toc8">Read-write access</A> <LI><A HREF="#toc9">Further information about Darcs</A> </UL> - <LI><A HREF="#toc10">Compilation from source</A> + <LI><A HREF="#toc10">Compilation from source with Cabal</A> <UL> <LI><A HREF="#toc11">Configure</A> <LI><A HREF="#toc12">Build</A> <LI><A HREF="#toc13">Install</A> <LI><A HREF="#toc14">Clean</A> + <LI><A HREF="#toc15">Known problems with Cabal</A> </UL> - <LI><A HREF="#toc15">Compilation with make</A> - <LI><A HREF="#toc16">Running the testsuite</A> + <LI><A HREF="#toc16">Compilation with make</A> + <LI><A HREF="#toc17">Compiling GF with C run-time system support</A> + <LI><A HREF="#toc18">Creating .deb packages for Ubuntu</A> + <UL> + <LI><A HREF="#toc19">Preparations</A> + <LI><A HREF="#toc20">Creating the package</A> + </UL> + <LI><A HREF="#toc21">Creating .rpm packages for Fedora</A> + <LI><A HREF="#toc22">Running the testsuite</A> </UL> <P></P> @@ -85,7 +93,7 @@ web sites, as described below. <P> GF is written in Haskell, so first of all you need -the <I>Haskell Platform</I>, version 2012.4.0.0. Downloads +the <I>Haskell Platform</I>, version 2012.4.0.0 or 2013.2.0.0. Downloads and installation instructions are available from here: </P> <P> @@ -106,12 +114,13 @@ of the Haskell Platform was successful you should see a message like: </P> <PRE> - The Glorious Glasgow Haskell Compilation System, version 7.4.2 + The Glorious Glasgow Haskell Compilation System, version 7.6.3 </PRE> <P> Other required tools included in the Haskell Platform are -<A HREF="http://www.haskell.org/cabal/">Cabal</A> +<A HREF="http://www.haskell.org/cabal/">Cabal</A>, +<A HREF="http://www.haskell.org/alex/">Alex</A> and <A HREF="http://www.haskell.org/happy/">Happy</A>. </P> @@ -123,7 +132,7 @@ and To get the GF source code, you also need <I>Darcs</I>, version 2 or later. Darcs is a distributed version control system, see <A HREF="http://darcs.net/">http://darcs.net/</A> for more information. There are precompiled packages for many platforms -available at and source code if you want to compile it yourself. Darcs +available and source code if you want to compile it yourself. Darcs is also written in Haskell and so you can use GHC to compile it. </P> @@ -138,7 +147,7 @@ are installed. Here is one way to do this: </P> <UL> -<LI>On Ubuntu: <CODE>sudo apt-get install libghc6-haskeline-dev</CODE> +<LI>On Ubuntu: <CODE>sudo apt-get install libghc-haskeline-dev</CODE> <LI>On Fedora: <CODE>sudo yum install ghc-haskeline-devel</CODE> </UL> @@ -333,7 +342,7 @@ For more info about what you can do with darcs, see <A HREF="http://darcs.net/ma </P> <A NAME="toc10"></A> -<H2>Compilation from source</H2> +<H2>Compilation from source with Cabal</H2> <P> The build system of GF is based on <I>Cabal</I>, which is part of the @@ -470,6 +479,33 @@ sources. Use the clean command for this purpose: </PRE> <A NAME="toc15"></A> +<H3>Known problems with Cabal</H3> + +<P> +Some versions of Cabal (at least version 1.16) seem to have a bug that can +cause the following error: +</P> + +<PRE> + Configuring gf-3.x... + setup: Distribution/Simple/PackageIndex.hs:124:8-13: Assertion failed +</PRE> + +<P> +The exact cause of this problem is unclear, but it seems to happen +during the configure phase if the same version of GF is already installed, +so a workaround is to remove the existing installation with +</P> + +<PRE> + ghc-pkg unregister gf +</PRE> + +<P> +You can check with <CODE>ghc-pkg list gf</CODE> that it is gone. +</P> + +<A NAME="toc16"></A> <H2>Compilation with make</H2> <P> @@ -507,7 +543,91 @@ For cleaning: $ make clean </PRE> -<A NAME="toc16"></A> +<A NAME="toc17"></A> +<H2>Compiling GF with C run-time system support</H2> + +<P> +The C run-time system is separate implementation of the PGF run-time services +that makes it possible to work with very large, ambiguous grammars, using +probabilistic models to obtain probable parses. +</P> +<P> +Support for calling the C run-time library is available in the web API +provided by <CODE>gf -server</CODE>, if C run-time support is enabled. +</P> +<P> +To enable the C run-time system, first go to the <CODE>src/runtime/c</CODE> directory +and follow the instructions in the <CODE>INSTALL</CODE> file to install the C run-time +system. Once this is done, you can install GF with C run-time support by +doing +</P> + +<PRE> + cabal install -fserver -fc-runtime +</PRE> + +<P> +from the top directory. +</P> + +<A NAME="toc18"></A> +<H2>Creating .deb packages for Ubuntu</H2> + +<P> +This was tested on Ubuntu 14.04 for the release of GF 3.6, and the +resulting <CODE>.deb</CODE> packages appears to work on Ubuntu 12.04, 13.10 and 14.04. +</P> +<P> +Under Ubuntu, Haskell executables are statically linked against other Haskell +libraries, so the .deb packages are fairly self-contained. +</P> + +<A NAME="toc19"></A> +<H3>Preparations</H3> + +<PRE> + sudo apt-get install dpkg-dev debhelper +</PRE> + +<A NAME="toc20"></A> +<H3>Creating the package</H3> + +<P> +Make sure the <CODE>debian/changelog</CODE> starts with an entry that describes the +version you are building. Then run +</P> + +<PRE> + make deb +</PRE> + +<A NAME="toc21"></A> +<H2>Creating .rpm packages for Fedora</H2> + +<P> +This is possible, but the procedure has not been automated. +It involves using the cabal-rpm tool, +</P> + +<PRE> + sudo yum install cabal-rpm +</PRE> + +<P> +and following the Fedora guide +<A HREF="http://fedoraproject.org/wiki/How_to_create_an_RPM_package">How to create an RPM package</A>. +</P> +<P> +Under Fedora, Haskell executables are dynamically linked against other Haskell +libraries, so <CODE>.rpm</CODE> packages for all Haskell libraries that GF depends on +are required. Most of them are already available in the Fedora distribution, +but a few of them might have to be built and distributed along with +the GF <CODE>.rpm</CODE> package. +When building <CODE>.rpm</CODE> packages for GF 3.4, we also had to build <CODE>.rpm</CODE>s for +<CODE>fst</CODE> and <CODE>httpd-shed</CODE>. +</P> + +<A NAME="toc22"></A> <H2>Running the testsuite</H2> <P> diff --git a/doc/gf-developers.t2t b/doc/gf-developers.t2t index 3dba43508..82e02cb50 100644 --- a/doc/gf-developers.t2t +++ b/doc/gf-developers.t2t @@ -40,7 +40,7 @@ web sites, as described below. === The Haskell Platform === GF is written in Haskell, so first of all you need -the //Haskell Platform//, version 2012.4.0.0. Downloads +the //Haskell Platform//, version 2012.4.0.0 or 2013.2.0.0. Downloads and installation instructions are available from here: http://hackage.haskell.org/platform/ @@ -54,12 +54,12 @@ This command should show you which version of GHC you have. If the installation of the Haskell Platform was successful you should see a message like: ``` -The Glorious Glasgow Haskell Compilation System, version 7.4.2 +The Glorious Glasgow Haskell Compilation System, version 7.6.3 ``` Other required tools included in the Haskell Platform are -[Cabal http://www.haskell.org/cabal/] -%,[Alex http://www.haskell.org/alex/] +[Cabal http://www.haskell.org/cabal/], +[Alex http://www.haskell.org/alex/] and [Happy http://www.haskell.org/happy/]. @@ -79,7 +79,7 @@ This should work automatically on Mac OS and Windows, but on Linux one extra step is needed to make sure the C libraries required by //haskeline// are installed. Here is one way to do this: -- On Ubuntu: ``sudo apt-get install libghc6-haskeline-dev`` +- On Ubuntu: ``sudo apt-get install libghc-haskeline-dev`` - On Fedora: ``sudo yum install ghc-haskeline-devel`` @@ -401,10 +401,30 @@ $ make clean %$ make sdist %``` +== Compiling GF with C run-time system support == + +The C run-time system is separate implementation of the PGF run-time services +that makes it possible to work with very large, ambiguous grammars, using +probabilistic models to obtain probable parses. + +Support for calling the C run-time library is available in the web API +provided by ``gf -server``, if C run-time support is enabled. + +To enable the C run-time system, first go to the ``src/runtime/c`` directory +and follow the instructions in the ``INSTALL`` file to install the C run-time +system. Once this is done, you can install GF with C run-time support by +doing + +``` +cabal install -fserver -fc-runtime +``` +from the top directory. + + == Creating .deb packages for Ubuntu == -This has been tested on Ubuntu 12.04, and the resulting ``.deb`` packages -appears to work on Ubuntu 12.04, 12.10 and 13.04. +This was tested on Ubuntu 14.04 for the release of GF 3.6, and the +resulting ``.deb`` packages appears to work on Ubuntu 12.04, 13.10 and 14.04. Under Ubuntu, Haskell executables are statically linked against other Haskell libraries, so the .deb packages are fairly self-contained. |
