Difference between revisions of "Apertium on Mac OS X (Local)"
Jump to navigation
Jump to search
m (Apertium on Mac OSX moved to Apertium on Mac OS X) |
Popcorndude (talk | contribs) (add link to updated instructions) |
||
(53 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
[[Installation locale sur Mac OS X|En français]] |
|||
{{TOCD}} |
|||
$ pwd |
|||
$ mkdir Local |
|||
$ mkdir Source |
|||
<div style="background-color:pink; text-align:center; line-height:2.5; border: 1px solid crimson;">Are you sure this is the page you want?<br/>If not, you probably actually want [[Apertium_on_Mac_OS_X]]<br/>If you're here because the instructions on that page didn't work for you, log on to [[IRC]] and describe what went wrong.</div> |
|||
==Downloading== |
|||
<pre> |
|||
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 |
|||
</pre> |
|||
{{TOCD}} |
|||
==Compiling== |
|||
This page gives instructions on compiling Apertium on Mac OS X. It will presume you are installing into a directory called <code>Local</code> inside your home directory (your home directory will be in <code>/Users/<your user name></code>). This is slightly more complicated than [[Apertium on Mac OS X (System)]], but more contained, and doesn't require root. |
|||
$ 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 |
|||
== |
==The procedure== |
||
First, we create the directories to hold our source and the installed binaries. Then we export these environment variables so that binaries and libraries from your local installation are taken before those from the system installation. |
|||
$ 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 |
|||
===apertium=== |
|||
==Troubleshooting== |
|||
===Undefined macro=== |
|||
;Problem |
|||
<pre> |
<pre> |
||
mkdir Local |
|||
$ sh autogen.sh --prefix=/Users/spectie/Local/ |
|||
mkdir Source |
|||
- libtoolize. |
|||
PATH=$HOME/Local/bin/:$PATH |
|||
You should add the contents of `/usr/share/aclocal/libtool.m4' to `aclocal.m4'. |
|||
export PATH |
|||
- aclocal. |
|||
PKG_CONFIG_PATH=$HOME/Local/lib/pkgconfig |
|||
- autoconf. |
|||
export PKG_CONFIG_PATH |
|||
configure.ac:109: error: possibly undefined macro: dnl |
|||
LD_LIBRARY_PATH=$HOME/Local/lib |
|||
If this token and others are legitimate, please use m4_pattern_allow. |
|||
export LD_LIBRARY_PATH |
|||
See the Autoconf documentation. |
|||
cd Source |
|||
</pre> |
</pre> |
||
Also, put this in your ~/.bashrc so you don't have to paste it in every time you open a new terminal: |
|||
;Solution |
|||
Re-run the <code>autogen.sh</code> command until it works. |
|||
===syntax error near unexpected token=== |
|||
; Problem |
|||
The <code>configure</code> script cannot find the <code>PKG_CHECK_MODULES</code> macro |
|||
<pre> |
<pre> |
||
PATH=$HOME/Local/bin/:$PATH |
|||
checking for pkg-config... /Users/spectie/Local/bin//pkg-config |
|||
export PATH |
|||
./configure: line 19355: syntax error near unexpected token `LTTOOLBOX,' |
|||
PKG_CONFIG_PATH=$HOME/Local/lib/pkgconfig |
|||
./configure: line 19355: `PKG_CHECK_MODULES(LTTOOLBOX, dnl' |
|||
export PKG_CONFIG_PATH |
|||
LD_LIBRARY_PATH=$HOME/Local/lib |
|||
export LD_LIBRARY_PATH |
|||
</pre> |
</pre> |
||
Now the standard steps: |
|||
;Solution |
|||
# Install the [[Prerequisites for Mac OS X]]. |
|||
# Follow [[Install Apertium core by compiling]], using <code>$HOME/Local</code> as your $prefix. |
|||
# See [[Installation_troubleshooting]] if you have problems. |
|||
== See also== |
|||
Run: |
|||
<pre> |
|||
$ aclocal -I /Users/spectie/Local/share/aclocal |
|||
$ automake -a |
|||
$ autoconf |
|||
</pre> |
|||
===Undefined macro=== |
|||
; Problem |
|||
The <code>autogen.sh</code> script complains about an undefined macro when encountering the <code>dnl</code> (comment) string. |
|||
<pre> |
|||
configure.ac:112: error: possibly undefined macro: dnl |
|||
If this token and others are legitimate, please use m4_pattern_allow. |
|||
See the Autoconf documentation. |
|||
</pre> |
|||
* [[Apertium on Mac OS X (System)]] — for installation in the main system. |
|||
; Solution |
|||
[[Category:Documentation]] |
|||
Run automake -a then autoconf, then <code>sh autogen.sh --prefix=/Users/spectie/Local/</code> again. |
|||
[[Category:Installation]] |
|||
[[Category:Documentation in English]] |
Latest revision as of 19:35, 12 May 2019
Are you sure this is the page you want?
If not, you probably actually want Apertium_on_Mac_OS_X
If you're here because the instructions on that page didn't work for you, log on to IRC and describe what went wrong.
If not, you probably actually want Apertium_on_Mac_OS_X
If you're here because the instructions on that page didn't work for you, log on to IRC and describe what went wrong.
Contents |
This page gives instructions on compiling Apertium on Mac OS X. It will presume you are installing into a directory called Local
inside your home directory (your home directory will be in /Users/<your user name>
). This is slightly more complicated than Apertium on Mac OS X (System), but more contained, and doesn't require root.
The procedure[edit]
First, we create the directories to hold our source and the installed binaries. Then we export these environment variables so that binaries and libraries from your local installation are taken before those from the system installation.
mkdir Local mkdir Source PATH=$HOME/Local/bin/:$PATH export PATH PKG_CONFIG_PATH=$HOME/Local/lib/pkgconfig export PKG_CONFIG_PATH LD_LIBRARY_PATH=$HOME/Local/lib export LD_LIBRARY_PATH cd Source
Also, put this in your ~/.bashrc so you don't have to paste it in every time you open a new terminal:
PATH=$HOME/Local/bin/:$PATH export PATH PKG_CONFIG_PATH=$HOME/Local/lib/pkgconfig export PKG_CONFIG_PATH LD_LIBRARY_PATH=$HOME/Local/lib export LD_LIBRARY_PATH
Now the standard steps:
- Install the Prerequisites for Mac OS X.
- Follow Install Apertium core by compiling, using
$HOME/Local
as your $prefix. - See Installation_troubleshooting if you have problems.
See also[edit]
- Apertium on Mac OS X (System) — for installation in the main system.