Difference between revisions of "Apertium on Mac OS X (Local)"
		
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
		
		
		
		
		
	
| Line 40: | Line 40: | ||
| :''Note: This is likely to fail in more than one place, check the troubleshooting info below!'' | :''Note: This is likely to fail in more than one place, check the troubleshooting info below!'' | ||
| <pre> | |||
| $ cd lttoolbox | $ cd lttoolbox | ||
| Line 46: | Line 47: | ||
| $ make | $ make | ||
| $ make install | $ make install | ||
| </pre> | |||
| ===libpcre=== | |||
| <pre> | |||
| $ cd pcre-7.8 | |||
| $ ./configure --prefix=/Users/spectie/Local/ | |||
| $ make | |||
| $ make install | |||
| </pre> | |||
| ===apertium=== | ===apertium=== | ||
| <pre> | |||
| $ cd apertium | |||
| $ sh autogen.sh --prefix=/Users/spectie/Local/ | |||
| $ make | |||
| $ make install | |||
| </pre> | |||
| ==Troubleshooting== | ==Troubleshooting== | ||
Revision as of 09:50, 27 September 2008
Preparation
$ pwd $ mkdir Local $ mkdir Source
Downloading
svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk/lttoolbox svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk/apertium curl ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.8.tar.gz > pcre-7.8.tar.gz curl http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz > pkg-config-0.23.tar.gz curl ftp://xmlsoft.org/libxml2/libxml2-2.7.1.tar.gz > libxml2-2.7.1.tar.gz
Compiling
$ export PATH=/Users/spectie/Local/bin/:$PATH $ export PKG_CONFIG_PATH=/Users/spectie/Local/lib/pkgconfig $ export LD_LIBRARY_PATH=/Users/spectie/Local/lib $ cd Source
pkg-config
$ cd pkg-config-0.23 $ ./configure --prefix=/Users/spectie/Local/ $ make $ make install
lttoolbox
- Note: This is likely to fail in more than one place, check the troubleshooting info below!
$ cd lttoolbox $ sh autogen.sh --prefix=/Users/spectie/Local/ $ make $ make install
libpcre
$ cd pcre-7.8 $ ./configure --prefix=/Users/spectie/Local/ $ make $ make install
apertium
$ cd apertium $ sh autogen.sh --prefix=/Users/spectie/Local/ $ make $ make install
Troubleshooting
Undefined macro
- Problem
$ sh autogen.sh --prefix=/Users/spectie/Local/
- libtoolize.
You should add the contents of `/usr/share/aclocal/libtool.m4' to `aclocal.m4'.
- aclocal.
- autoconf.
configure.ac:109: error: possibly undefined macro: dnl
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
- Solution
Re-run the autogen.sh command until it works.
syntax error near unexpected token
- Problem
The configure script cannot find the PKG_CHECK_MODULES macro
checking for pkg-config... /Users/spectie/Local/bin//pkg-config ./configure: line 19355: syntax error near unexpected token `LTTOOLBOX,' ./configure: line 19355: `PKG_CHECK_MODULES(LTTOOLBOX, dnl'
- Solution
Run:
$ aclocal -I /Users/spectie/Local/share/aclocal $ automake -a $ autoconf
Undefined macro
- Problem
The autogen.sh script complains about an undefined macro when encountering the dnl (comment) string.
configure.ac:112: error: possibly undefined macro: dnl
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
- Solution
Run automake -a then autoconf, then sh autogen.sh --prefix=/Users/spectie/Local/ again.

