diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2016-11-12 10:23:00 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2016-11-12 10:23:00 +0200 |
commit | 7470ca0d04f82c7b79f0ef2f4d71f3f8c32b88dc (patch) | |
tree | 96361d803979c6f28088995cfe07a4e598670beb | |
parent | a527b0991ddbd8ac3f0ef438c285cb11dd08901b (diff) | |
download | dico-7470ca0d04f82c7b79f0ef2f4d71f3f8c32b88dc.tar.gz dico-7470ca0d04f82c7b79f0ef2f4d71f3f8c32b88dc.tar.bz2 |
WordNet-related changes.
* README: Document how to rebuild WordNet to produce position-independent
code, suitable for linking with Dico.
* modules/wordnet/wordnet.c: Trivial patch.
-rw-r--r-- | README | 28 | ||||
-rw-r--r-- | modules/wordnet/wordnet.c | 2 |
2 files changed, 24 insertions, 6 deletions
@@ -157,13 +157,31 @@ If you do not wish to use Guile, use `--without-guile' to disable it. ** WordNet database ------------------- -If you plan to use WordNet database, you will most probably need the -`--with-wordnet' option to inform the script about the location where -WordNet libraries and headers can be found. For example, the command +If you plan to use WordNet database, there are several points to be +observed. First of all, WordNet provides static libraries, usually +with position-dependent code, which makes it difficult (or impossible, +on 64-bit architectures) to use from the shared dico modules. So, +first of all you will need to rebuild WordNet so that it contains +position-independent code. To do so, reconfigure it as follows: + + ./configure CFLAGS=-fPIC [other_options] + +where [other_options] stands for any other options you might wish to +pass to configure. + +If you are going to run this command in a source directory that has +been previously configured, it is advised to run "make distclean" +beforehand. + +After configuring, run make and make install, as usual. + +Once this step done, configure dico with the `--with-wordnet' option, +to inform the it about the location where WordNet libraries and +headers can be found. For example, the command ./configure --with-wordnet=/usr/local/WordNet-3.0 -instructs the script to look for WordNet library files in +will instruct the configure script to look for WordNet library files in /usr/local/WordNet-3.0/lib and for include files in /usr/local/WordNet-3.0/include. @@ -184,7 +202,7 @@ Send bug reports to <bug-dico@gnu.org>. * Copyright information: -Copyright (C) 2008-2010, 2012 Sergey Poznyakoff +Copyright (C) 2008-2016 Sergey Poznyakoff Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the diff --git a/modules/wordnet/wordnet.c b/modules/wordnet/wordnet.c index 61dc2c9..ed2d37c 100644 --- a/modules/wordnet/wordnet.c +++ b/modules/wordnet/wordnet.c @@ -684,7 +684,7 @@ wn_exact_match(struct wndb *db, const char *hw) { struct result *res; - if (!wn_is_defined(db, hw)) + if (!wn_is_defined(db, (char*)hw)) return NULL; res = wn_create_match_result(db); dico_list_append(res->list, strdup(hw)); |