Equipe-projet Alpage: Nos logiciels: Documentation d'Alpage Installer
alpi.pl -- Alpage Installer
alpi is a Perl script designed to ease a local installation of software developped by Alpage project team (INRIA-University of Paris 7). While not perfect, it is quite useful because it detects dependencies and installs them automatically.
It can also be used to install a full linguistic processing chain for French based on DyALog (a parser compiler and logic programming enviromnent), FRMG (a French Meta Grammar), Lefff (a French Morphological and Syntactic Lexicon) and SxPipe (a pre-parsing chain). Parserd, a server of parsers, is also installed allowing to process whole corpus with the perl scripts callparser or dispatch.pl.
To install a specific Alpage package, you just need to type in a terminal:
./alpi.pl --pkg=packagename
To install the whole Alpage linguistic processing chain, just type './alpi.pl'. See below for more details and examples.
Please note that you do not need be root to launch alpi because the software is installed locally (by default under ~/exportbuild). In future development it will be also possible to install as root.
There are three possibilities to download Alpage software with alpi:
1. [Default behaviour] alpi retrieves the stable version downloading the tar.gz releases through FTP.
Example : install DyALog with alpi from FTP:
./alpi.pl --pkg=DyALog
2. OR you can retrieve the version based on the latest sources (from our Subversion repositories)
2.1. You don't have an INRIA GForge account. You can retrieve the sources with anonymous checkout.
./alpi.pl --svn=anonymous --pkg=DyALog
Note: when retrieving the sources anonymously, you will not be able to contribute to the code, and a few packages that belong to private projects will be downloaded by FTP.
2.2. You have an INRIA GForge account and are registered to our GForge projects. (See information about option svn below for more details.)
./alpi.pl --svn=mylogin --pkg=DyALog
When install is finished, alpi sets up your environment variables so that you can use Alpage software directly. You can set up that environment yourself typing :
source ${PREFIX}/sbin/setenv.sh
This environment is set for that session only. In order to keep it permanently, you need to add the content of setenv.sh in the file .bashrc (in your homedir).
It is strongly recommended to look at file alpi.log (which is in same directory as alpi script) to search for errors, because alpi does not explicitly mention them !
In case of trouble and when contacting the maintainers of the alpi script, please attach a copy of alpi.log.
You can write a small configuration script called alpi.conf and placed in the same directory as alpi.pl. This script could look like this:
svn= mylogin pkg= DyALog pkg= lefff force prefix= /home/toto/somedir
Then you only need to type ./alpi.pl to run the script. If you want to add an option, place it in this configuration file.
Everything is installed under the path specified with option --prefix [the default is ${HOME}/exportbuild].
Where you can find the packages sources. The default location is ${HOME}/exportbuild/src.
These options are useful if you install parserd which provides a server of parsers. This server will run under user and group. When the values are not provided by the user, the script retrieves user name under which it runs, and the first group the user belongs to.
alpi can either download the latest stable releases from FTP, or retrieve the latest sources from the Subversion repository (svn) on Inria Gforge.
The stable version is retrieved by default.
To retrieve the last sources from the Subversion repository, there are two possibilities.
1. Get the sources anonymously:
./alpi.pl --svn=anonymous
2. If you are a developper among our projects on INRIA GForge, provide your gforge login:
./alpi --svn=mylogin
If you do not have a GForge account yet, you can create one filling the following form: https://gforge.inria.fr/account/register.php. Then you should contact the author of this script to get access to the sources (some are public, other private). You will be registered in our GForge projects Alpage Linguistic Workbench, DyALog, Metagrammar Toolkit, Syntax and Alexina.
Then you need to set up ssh (this section comes from the GForge FAQ http://siteadmin.gforge.inria.fr/FAQ.html#Q6):
Generate a pair of rsa public/private keys:
ssh-keygen -t rsa
Paste your public key (/.ssh/id_rsa.pub) in the gforge website. To do this, you need to go to your account and then go to the Account maintainance tab. At the bottom of the Account maintainance tab, you should see a Shell Account Information section which contains an [Edit keys] link. Paste your public key(s) in the empty field below and click the Update button.
! A common problem is that the Shell Account Information field does not appear in your account page. This usually happens because you do not belong to any gforge project.
! Please, be aware that uploading your ssh public key on the server will not allow you to connect to the server immediately through ssh. To do so, you will need to wait at most 24h. If your connection is impossible 24h later, please, contact the server administrators.
Finally you should set up a ssh agent, so that you will not be prompted to type your passphrase each time alpi accesses the Subversion repository:
eval `ssh-agent` cp /etc/ssh/ssh_config .ssh/config # ForwardAgent variable is set to``yes'' ssh-add
The ssh-agent is started in the beginning of an X-session or a login session.
Retrieve revisions of the sources at a specific date. This is the syntax:
./alpi --svn=toto --date=2006-02-17
If you don't specify option svn, there will be an anonymous checkout. Option date is global (not package specific).
To install a specific package: --package=somepkg (or --pkg=somepkg) Examples:
./alpi --package=DyALog ./alpi --pkg=DyALog --pkg=frmg
To install a special revision of the Subversion repository for a package, type:
./alpi --pkg=<package name>-r<revision number>
For example, get revision 1144 of package sxpipe:
./alpi --pkg=sxpipe-r1144 --svn=mylogin ./alpi --pkg=sxpipe-r1144
Note that if you have a GForge account and forget to provide it, the checkout will be anonymous.
You can specify which packages you don't want to be installed.
./alpi --skippkg=mgtools
This option may be used to force the 32bit emulation mode on 64b machines. The ALPAGE tools are now 64bit-compatible and this option is therefore no longer necessary.
force causes the script to start from 'autoreconf' instead of 'make' when the sources are retrieved from the Subversion repository. When the sources are retrieved by FTP, the tarball is downloaded and decompressed again.
With this option alpi will run tests before installing any package ('make check' for packages using autotools, 'make test' for Perl packages). This is recommended if you are a developper.
This option may be used to add a new prefix path used to search programs and libraries. This option may be used more than once.
This option may be used to skip the SVN or FTP update phase for the packages, when already present.
If you retrieve the sources from the Subversion repository:
Optional dependencies:
Installing the Perl modules recursively with all their dependencies may be a difficult task, so you may instead consider using cpan as a non-root user, possibly after installing local::libhttp://perl.jonallen.info/writing/articles/install-perl-modules-without-root and answering cpan's questions if it is your first use of cpan.
The latest release can be retrieved from the following WEB page: https://gforge.inria.fr/frs/?group_id=481
The latest version of this script can also be retrieved from the Subversion repository typing:
svn co svn://scm.gforge.inria.fr/svn/lingwb/alpi/trunk alpi
If you have already made a checkout of alpi, in order to check that you have the latest version, cd in its directory and type
svn update
A short FAQ about common problems. Please feel free to send us information about your own problems.
The problem may come from expat not being found. Check that the expat shared library is installed, also also the header file expat.h (possibly by installing a devel package with your distribution). If these files are not installed in a standard place, you can use either the --expat_prefix option of alpi.pl or the shell environment variable EXPATINCPATH and EXPATLIBPATH.