Discussion:
[Aspell-user] English Dictionary Install Problem
Zhu, Harry
2017-01-29 14:42:01 UTC
Permalink
My OS: Mac Sierra
Install file: aspell6-en-2017.01.22-0.tar.bz2
Problem: ./config trying to locate files in /usr/bin and /usr/lib, but my files are in /usr/local/bin (and lib)


The 2007-01-22 English dictionary tar file’s ./configure command outputs this:

Finding Dictionary file location ... /usr/lib/aspell-0.60
Finding Data file location ... /usr/lib/aspell-0.60

When I run make, I get the following error:
/usr/local/bin/prezip-bin -d < en-common.cwl | /usr/local/bin/aspell --lang=en create master ./en-common.rws
Error: The file "/usr/lib/aspell-0.60/iso-8859-1.cset" can not be opened for reading.
make: *** [en-common.rws] Error 1


On my Mac, the file that make tries to locate is in this directory:
/usr/local/lib/aspell-0.60

The aspell program is at /usr/local/bin

And I do not have any directory/file related to aspell in either /usr/share or /usr/local/share

Is there any way for me to tell make where to look for the files?
Thank you.
- Harry Zhu
Kevin Atkinson
2017-01-29 15:14:34 UTC
Permalink
Hi,
Post by Zhu, Harry
My OS: Mac Sierra
Install file: aspell6-en-2017.01.22-0.tar.bz2
Problem: ./config trying to locate files in /usr/bin and /usr/lib, but my files are in /usr/local/bin (and lib)
Finding Dictionary file location ... /usr/lib/aspell-0.60
Finding Data file location ... /usr/lib/aspell-0.60
/usr/local/bin/prezip-bin -d < en-common.cwl | /usr/local/bin/aspell --lang=en create master ./en-common.rws
Error: The file "/usr/lib/aspell-0.60/iso-8859-1.cset" can not be opened for reading.
make: *** [en-common.rws] Error 1
It looks like Aspell is somehow misconfiguration. What is the output of
"/usr/local/bin/aspell dump config"?


Kevin
Zhu, Harry
2017-01-29 15:25:06 UTC
Permalink
Hi Kevin,
Hi,
Post by Zhu, Harry
My OS: Mac Sierra
Install file: aspell6-en-2017.01.22-0.tar.bz2
Problem: ./config trying to locate files in /usr/bin and /usr/lib, but my files are in /usr/local/bin (and lib)
Finding Dictionary file location ... /usr/lib/aspell-0.60
Finding Data file location ... /usr/lib/aspell-0.60
/usr/local/bin/prezip-bin -d < en-common.cwl | /usr/local/bin/aspell --lang=en create master ./en-common.rws
Error: The file "/usr/lib/aspell-0.60/iso-8859-1.cset" can not be opened for reading.
make: *** [en-common.rws] Error 1
It looks like Aspell is somehow misconfiguration. What is the output of "/usr/local/bin/aspell dump config"?
Kevin
[Not sure I am using the mailing list correctly, i.e., if a thread will be created and archived when I hit reply in my email client…If not, please kindly let me know and I will repost the dump so it gets archived and shared with the community. ]
The dump is shown below. I see that my /usr/local is directory is not in the dump. Help of correcting the problem is greatly appreciated.
Thank you. - Harry Zhu

Here is the dump of config:

# conf (string)
# main configuration file
# default: aspell.conf

# conf-dir (string)
# location of main configuration file
# default: <prefix:etc> = /usr/etc

# data-dir (string)
# location of language data files
# default: <prefix:lib/aspell-0.60> = /usr/lib/aspell-0.60

# dict-alias (list)
# create dictionary aliases

# dict-dir (string)
# location of the main word list
# default: <data-dir> = /usr/lib/aspell-0.60

# encoding (string)
# encoding to expect data to be in
# default: !encoding = UTF-8

# filter (list)
# add or removes a filter

# filter-path (list)
# path(s) aspell looks for filters

# mode (string)
# filter mode
# default: url

# extra-dicts (list)
# extra dictionaries to use

# home-dir (string)
# location for personal files
# default: <$HOME|./> = /Users/mrzhu

# ignore (integer)
# ignore words <= n chars
# default: 1

# ignore-case (boolean)
# ignore case when checking words
# default: false

# ignore-repl (boolean)
# ignore commands to store replacement pairs
# default: false

# keyboard (string)
# keyboard definition to use for typo analysis
# default: standard

# lang (string)
# language code
# default: <language-tag> = en_US

# local-data-dir (string)
# location of local language data files
# default: <actual-dict-dir> = /usr/lib/aspell-0.60/

# master (string)
# base name of the main dictionary to use
# default: <lang> = en_US

# normalize (boolean)
# enable Unicode normalization
# default: true

# norm-required (boolean)
# Unicode normalization required for current lang
# default: false

# norm-form (string)
# Unicode normalization form: none, nfd, nfc, comp
# default: nfc

# norm-strict (boolean)
# avoid lossy conversions when normalization
# default: false

# per-conf (string)
# personal configuration file
# default: .aspell.conf

# personal (string)
# personal dictionary file name
# default: .aspell.<lang>.pws = .aspell.en_US.pws

# prefix (string)
# prefix directory
# default: /usr

# repl (string)
# replacements list file name
# default: .aspell.<lang>.prepl = .aspell.en_US.prepl

# run-together (boolean)
# consider run-together words legal
# default: false

# run-together-limit (integer)
# maximum number that can be strung together
# default: 2

# run-together-min (integer)
# minimal length of interior words
# default: 3

# save-repl (boolean)
# save replacement pairs on save all
# default: true

# set-prefix (boolean)
# set the prefix based on executable location
# default: true

# size (string)
# size of the word list
# default: +60

# sug-mode (string)
# suggestion mode
# default: normal

# sug-edit-dist (integer)
# edit distance to use, override sug-mode default
# default: 1

# sug-typo-analysis (boolean)
# use typo analysis, override sug-mode default
# default: true

# sug-repl-table (boolean)
# use replacement tables, override sug-mode default
# default: true

# sug-split-char (list)
# characters to insert when a word is split

# use-other-dicts (boolean)
# use personal, replacement & session dictionaries
# default: true

# variety (list)
# extra information for the word list

# warn (boolean)
# enable warnings
# default: true

# affix-compress (boolean)
# use affix compression when creating dictionaries
# default: false

# clean-affixes (boolean)
# remove invalid affix flags
# default: true

# clean-words (boolean)
# attempts to clean words so that they are valid
# default: false

# invisible-soundslike (boolean)
# compute soundslike on demand rather than storing
# default: false

# partially-expand (boolean)
# partially expand affixes for better suggestions
# default: false

# skip-invalid-words (boolean)
# skip invalid words
# default: true

# validate-affixes (boolean)
# check if affix flags are valid
# default: true

# validate-words (boolean)
# check if words are valid
# default: true

# backup (boolean)
# create a backup file by appending ".bak"
# default: true

# byte-offsets (boolean)
# use byte offsets instead of character offsets
# default: false

# guess (boolean)
# create missing root/affix combinations
# default: false

# keymapping (string)
# keymapping for check mode: "aspell" or "ispell"
# default: aspell

# reverse (boolean)
# reverse the order of the suggest list
# default: false

# suggest (boolean)
# suggest possible replacements
# default: true

# time (boolean)
# time load time and suggest time in pipe mode
# default: false
Kevin Atkinson
2017-01-29 15:44:12 UTC
Permalink
Post by Zhu, Harry
Hi Kevin,
Hi,
Post by Zhu, Harry
My OS: Mac Sierra
Install file: aspell6-en-2017.01.22-0.tar.bz2
Problem: ./config trying to locate files in /usr/bin and /usr/lib, but my files are in /usr/local/bin (and lib)
Finding Dictionary file location ... /usr/lib/aspell-0.60
Finding Data file location ... /usr/lib/aspell-0.60
/usr/local/bin/prezip-bin -d < en-common.cwl | /usr/local/bin/aspell --lang=en create master ./en-common.rws
Error: The file "/usr/lib/aspell-0.60/iso-8859-1.cset" can not be opened for reading.
make: *** [en-common.rws] Error 1
It looks like Aspell is somehow misconfiguration. What is the output of "/usr/local/bin/aspell dump config"?
Kevin
[Not sure I am using the mailing list correctly, i.e., if a thread will be
created and archived when I hit reply in my email client…If not, please
kindly let me know and I will repost the dump so it gets archived and shared
with the community. ]
You are using it just fine, just be sure aspell-***@gnu.org is always in the
CC field.
Post by Zhu, Harry
The dump is shown below. I see that my /usr/local is directory is not in the
dump. Help of correcting the problem is greatly appreciated.
It looks like Aspell was compiled with a prefix of "/usr" and then moved into
"/usr/local". If you compiled it yourself then the best bet it to recompile
it.

If recompiling is not an option then you will need to somehow set the "prefix"
option to "/usr/local". The best way to test this is to set the ASPELL_CONF
environmental variable to "prefix /usr/local". On GNU Linux/bash I will do
that with
export ASPELL_CONFIG="prefix /usr/local"
and would possible add the line to the ~/.bashrc file. For the Mac Sierra I am
not sure of the correct procedure to set an environmental variable.

Kevin
Zhu, Harry
2017-01-29 16:33:58 UTC
Permalink
Hi Kevin,

On Jan 29, 2017, at 10:44 AM, Kevin Atkinson <***@gnu.org<mailto:***@gnu.org>> wrote:

On Sun, 29 Jan 2017, Zhu, Harry wrote:

Hi Kevin,

On Jan 29, 2017, at 10:14 AM, Kevin Atkinson <***@gnu.org<mailto:***@gnu.org>> wrote:

Hi,

On 01/29/2017 09:42 AM, Zhu, Harry wrote:

My OS: Mac Sierra
Install file: aspell6-en-2017.01.22-0.tar.bz2
Problem: ./config trying to locate files in /usr/bin and /usr/lib, but my files are in /usr/local/bin (and lib)


The 2007-01-22 English dictionary tar file’s ./configure command outputs this:

Finding Dictionary file location ... /usr/lib/aspell-0.60
Finding Data file location ... /usr/lib/aspell-0.60

When I run make, I get the following error:
/usr/local/bin/prezip-bin -d < en-common.cwl | /usr/local/bin/aspell --lang=en create master ./en-common.rws
Error: The file "/usr/lib/aspell-0.60/iso-8859-1.cset" can not be opened for reading.
make: *** [en-common.rws] Error 1


It looks like Aspell is somehow misconfiguration. What is the output of "/usr/local/bin/aspell dump config"?


Kevin

[Not sure I am using the mailing list correctly, i.e., if a thread will be created and archived when I hit reply in my email client…If not, please kindly let me know and I will repost the dump so it gets archived and shared with the community. ]

You are using it just fine, just be sure aspell-***@gnu.org<mailto:aspell-***@gnu.org> is always in the CC field.

The dump is shown below. I see that my /usr/local is directory is not in the dump. Help of correcting the problem is greatly appreciated.

It looks like Aspell was compiled with a prefix of "/usr" and then moved into "/usr/local". If you compiled it yourself then the best bet it to recompile it.

If recompiling is not an option then you will need to somehow set the "prefix" option to "/usr/local". The best way to test this is to set the ASPELL_CONF environmental variable to "prefix /usr/local". On GNU Linux/bash I will do that with
export ASPELL_CONFIG="prefix /usr/local"
and would possible add the line to the ~/.bashrc file. For the Mac Sierra I am not sure of the correct procedure to set an environmental variable.

Kevin

Thanks for your help! I recompiled/installed aspell and the the problem is solved.
I document my steps here, in case it is useful to other Mac OS Sierra users:

To install aspell
Step 1:
./configure --disable-static --prefix=/usr/local
Note the prefix option must be there

Step 2: To avoid errors in make, edit interfaces/cc/aspell.h to surround the error block starting line 237:
#ifndef __cplusplus
extern const struct AspellErrorInfo * const aerror_other;
...snip...
extern const struct AspellErrorInfo * const aerror_invalid_expression;
#endif

See http://stackoverflow.com/questions/25395685/aspell-wont-build-on-os-x-10-9-mavericks

Step 3:
make

Step 4:
sudo make install

Then, install the English dictionary.
./configure
make
sudo make install

To use aspell in Emacs, make sure your .emacs file contains this line:
(setq ispell-program-name "/usr/local/bin/aspell”)

Thanks again, Kevin!
- Harry
Kevin Atkinson
2017-01-30 02:50:48 UTC
Permalink
I'm glad you got it working. One note below.
Post by Zhu, Harry
Step 2: To avoid errors in make, edit interfaces/cc/aspell.h to surround
#ifndef __cplusplus
extern const struct AspellErrorInfo * const aerror_other;
...snip...
extern const struct AspellErrorInfo * const aerror_invalid_expression;
#endif
This should now be fixed in 0.60.7-rc1 that I just released. Please see
http://aspell.net for details.

Kevin

Loading...