Difference between revisions of "Apertium on Mac OS X (System)"
Jump to navigation
Jump to search
Popcorndude (talk | contribs) |
|||
(32 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
[[Installation système sur Mac OS X|En français]] |
|||
{{TOCD}} |
|||
These instructions will help you install Apertium on a system running Mac OS/X. |
|||
<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> |
|||
==Requirements== |
|||
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: |
|||
{{TOCD}} |
|||
<pre> |
|||
<span style="color: #f00;">You can run [https://apertium.projectjj.com/osx/install-release.sh install-release.sh] or [https://apertium.projectjj.com/osx/install-nightly.sh install-nightly.sh] to install the latest compiled version of apertium, lttoolbox, vislcg3 and HFST – that way you don't have to check out, build and install these by hand.</span> You will still need gawk, git, autoconf, automake, pkgconfig from MacPorts. |
|||
$ sudo port install autoconf automake expat flex gettext gperf help2man libiconv libtool \ |
|||
libxml2 libxslt m4 ncurses ncursesw p5-locale-gettext pcre perl5.8 pkgconfig zlib gawk |
|||
</pre> |
|||
(Some of them are necessary just because Macports wants it) |
|||
You will also need to edit the file <code>~/.bash_profile</code> and add <code>/opt/local/bin</code> to the <code>PATH</code> variable. This can also be done each time from the command line as follows: |
|||
<pre> |
|||
$ export PATH=/opt/local/bin:$PATH |
|||
</pre> |
|||
Note: you can now install lttoolbox from Macports: |
|||
$ sudo port install lttoolbox |
|||
==Downloading== |
|||
<pre> |
|||
$ svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk/lttoolbox |
|||
$ svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk/apertium |
|||
</pre> |
|||
Then choose a language package. |
|||
==Compilation== |
|||
For each package (i.e., within their directories lttoolbox, etc.), <code>lttoolbox</code>, <code>apertium</code> and a language package, do: |
|||
<pre> |
|||
$ ./autogen.sh --prefix /opt/local |
|||
$ make |
|||
$ sudo make install |
|||
</pre> |
|||
If the above does not work, try: |
|||
<pre> |
|||
$ aclocal -I /opt/local/share/aclocal |
|||
$ glibtoolize --force |
|||
$ aclocal -I /opt/local/share/aclocal |
|||
$ automake -a |
|||
$ autoconf |
|||
$ autoheader |
|||
$ automake -a |
|||
$ ./configure --prefix=/opt/local/ |
|||
$ make |
|||
$ sudo make install |
|||
</pre> |
|||
==Troubleshooting== |
|||
===syntax error near unexpected token=== |
|||
; Problem |
|||
The <code>configure</code> script cannot find the <code>PKG_CHECK_MODULES</code> macro |
|||
<pre> |
|||
checking for pcre_compile in -lpcrecpp... yes |
|||
./configure: line 19995: syntax error near unexpected token `APERTIUM,' |
|||
./configure: line 19995: `PKG_CHECK_MODULES(APERTIUM, dnl' |
|||
</pre> |
|||
;Solution |
|||
Run: |
|||
<pre> |
|||
$ aclocal -I /opt/local/share/aclocal |
|||
$ automake -a |
|||
$ autoconf |
|||
$ autoheader |
|||
$ automake -a |
|||
$ ./configure --prefix=/opt/local |
|||
</pre> |
|||
===modes not generated=== |
|||
; Problem |
|||
Everything works fine except the <code>.mode</code> files aren't being generated. |
|||
; Solution |
|||
These instructions will help you install Apertium on a system running Mac OS X. You can use this page if you have root access to your system. Otherwise (or if you don't want to install as root), follow [[Apertium on Mac OS X (Local)]]. |
|||
Try installing <code>gawk</code> |
|||
==The procedure== |
|||
===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). |
|||
# Install the [[Prerequisites for Mac OS X]]. |
|||
Or, do this when compiling: |
|||
# Follow [[Install Apertium core by compiling]], and disregard the stuff about prefixes. |
|||
# See [[Installation_troubleshooting]] if you have problems. |
|||
CPPFLAGS=" -Dfread_unlocked=fread " ./autogen.sh && make && sudo make install |
|||
==See also== |
==See also== |
||
Line 107: | Line 22: | ||
[[Category:Documentation]] |
[[Category:Documentation]] |
||
[[Category:Installation]] |
[[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 |
You can run install-release.sh or install-nightly.sh to install the latest compiled version of apertium, lttoolbox, vislcg3 and HFST – that way you don't have to check out, build and install these by hand. You will still need gawk, git, autoconf, automake, pkgconfig from MacPorts.
These instructions will help you install Apertium on a system running Mac OS X. You can use this page if you have root access to your system. Otherwise (or if you don't want to install as root), follow Apertium on Mac OS X (Local).
The procedure[edit]
- Install the Prerequisites for Mac OS X.
- Follow Install Apertium core by compiling, and disregard the stuff about prefixes.
- See Installation_troubleshooting if you have problems.
See also[edit]
- Apertium on Mac OS X (Local) — for instructions on how to do a local install.