Difference between revisions of "Apertium on Mac OS X (System)"
Line 4: | Line 4: | ||
==Requirements== |
==Requirements== |
||
The requirements are |
|||
The requirements are a '''full installation of XCode (http://developer.apple.com/tools/xcode/)''' and '''Macports (http://www.macports.org/install.php)'''. Then install with Macports the following packages: |
|||
* a full installation of XCode (http://developer.apple.com/tools/xcode/) '''including the Command Line Tools''' |
|||
* '''Macports (http://www.macports.org/install.php)''' |
|||
Then install the following packages with Macports: |
|||
<pre> |
<pre> |
||
Line 13: | Line 17: | ||
</pre> |
</pre> |
||
(Some of them are necessary just because Macports wants it) |
|||
Note: |
(Note: it is technically possible to install apertium and lttoolbox from Macports, but the version there is very out of date. It is not recommended if you want to do development.) |
||
==Downloading== |
==Downloading== |
Revision as of 18:02, 20 November 2013
These instructions will help you install Apertium on a system running Mac OS X. Use this page if you have root access to your system.
Requirements
The requirements are
- a full installation of XCode (http://developer.apple.com/tools/xcode/) including the Command Line Tools
- Macports (http://www.macports.org/install.php)
Then install the following packages with Macports:
$ sudo port install autoconf automake expat flex \ gettext gperf help2man libiconv libtool \ libxml2 libxslt m4 ncurses p5-locale-gettext \ pcre perl5 pkgconfig zlib gawk subversion
(Note: it is technically possible to install apertium and lttoolbox from Macports, but the version there is very out of date. It is not recommended if you want to do development.)
Downloading
$ svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk/lttoolbox $ svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk/apertium
Then choose a language package and download it the same way, eg.
$ svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk/apertium-es-ca
Compilation
For each package (i.e., within their directories lttoolbox, etc.), lttoolbox
, apertium
and a language package, do:
$ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig $ export PKG_CONFIG_PATH $ ./autogen.sh $ make $ sudo make install
Troubleshooting
syntax error near unexpected token
- Problem
The configure
script cannot find the PKG_CHECK_MODULES
macro
checking for pcre_compile in -lpcrecpp... yes ./configure: line 19995: syntax error near unexpected token `APERTIUM,' ./configure: line 19995: `PKG_CHECK_MODULES(APERTIUM, dnl'
- Solution
Run:
$ aclocal -I /usr/local/share/aclocal $ automake -a $ autoconf $ autoheader $ automake -a $ ./configure
modes not generated
- Problem
Everything works fine except the .mode
files aren't being generated.
- Solution
Try installing gawk
(sudo port install gawk
)
No package 'lttoolbox-3.2' found
- Problem
No package 'lttoolbox-3.2' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.
- Solution
do
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig export PKG_CONFIG_PATH
before autogen.sh
autogen/make "does not work"
- Problem
- some problem during autogen/make (what was the problem?)
- Solution
$ aclocal -I /usr/local/share/aclocal $ glibtoolize --force $ aclocal -I /usr/local/share/aclocal $ automake -a $ autoconf $ autoheader $ automake -a $ ./configure --prefix=/usr/local/ $ make $ sudo make install
endian_double_util.cc:38: error: ‘fread_unlocked’ was not declared in this scope
Just change the code to use fread instead of fread_unlocked (the latter is just faster).
Or, do this when compiling:
CPPFLAGS=" -Dfread_unlocked=fread " ./autogen.sh && make && sudo make install
See also
- Apertium on Mac OS X (Local) — for instructions on how to do a local install.